Vergleich jscripts/usercp.js - 1.8.1 - 1.8.25

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 5Zeile 5

openBuddySelect: function(field)
{


openBuddySelect: function(field)
{

		if(!$("#"+field))

		if(!$("#"+field).length)

		{
return false;
}
this.buddy_field = '#'+field;

		{
return false;
}
this.buddy_field = '#'+field;

		if($("#buddyselect_container").length > 0)

		if($("#buddyselect_container").length)

		{
UserCP.buddySelectLoaded();
return false;

		{
UserCP.buddySelectLoaded();
return false;

Zeile 36Zeile 36
		if(request)
{
try {

		if(request)
{
try {

				var json = $.parseJSON(request.responseText);

				var json = JSON.parse(request.responseText);

				if(json.hasOwnProperty("errors"))
{
$.each(json.errors, function(i, message)
{

				if(json.hasOwnProperty("errors"))
{
$.each(json.errors, function(i, message)
{

					  $.jGrowl(lang.buddylist_error+message);

					  $.jGrowl(lang.buddylist_error + message, {theme:'jgrowl_error'});

					});
return false;
}
} catch (e) {
if(request.responseText)
{

					});
return false;
}
} catch (e) {
if(request.responseText)
{

					if(buddyselect_container.length > 0)

					if(buddyselect_container.length)

					{
buddyselect_container.remove();
}
var container = $("<div />");
container.attr("id", "buddyselect_container");

					{
buddyselect_container.remove();
}
var container = $("<div />");
container.attr("id", "buddyselect_container");

					container.css("display", "none");

					container.hide();

					container.html(request.responseText);
$("body").append(container);
}

					container.html(request.responseText);
$("body").append(container);
}

Zeile 96Zeile 96
		var buddyselect_buddies_uid = $("#buddyselect_buddies_"+uid);
var buddyselect_buddies = $("#buddyselect_buddies");
// Buddy already in list - remove

		var buddyselect_buddies_uid = $("#buddyselect_buddies_"+uid);
var buddyselect_buddies = $("#buddyselect_buddies");
// Buddy already in list - remove

		if(buddyselect_buddies_uid.length > 0)

		if(buddyselect_buddies_uid.length)

		{
buddyselect_buddies_uid.remove();
var buddies = buddyselect_buddies.text();

		{
buddyselect_buddies_uid.remove();
var buddies = buddyselect_buddies.text();

Zeile 127Zeile 127
		{
var buddies = $("#buddyselect_buddies").text();
existing_buddies = $(this.buddy_field).select2("data");

		{
var buddies = $("#buddyselect_buddies").text();
existing_buddies = $(this.buddy_field).select2("data");

			if(existing_buddies.length > 0)

			if(existing_buddies.length)

			{
// We already have stuff in our text box we must merge it with the new array we're going to create from the selected buddies
// We don't need to care about having dupes because Select2 treats items by ID and we two items have the same ID, there are no dupes because only one exists

			{
// We already have stuff in our text box we must merge it with the new array we're going to create from the selected buddies
// We don't need to care about having dupes because Select2 treats items by ID and we two items have the same ID, there are no dupes because only one exists

Zeile 199Zeile 199
			type: 'post',
url: 'usercp.php?action=do_editlists&my_post_key='+my_post_key+'&manage='+type,
data: { ajax: 1, add_username: type_add_username.val() },

			type: 'post',
url: 'usercp.php?action=do_editlists&my_post_key='+my_post_key+'&manage='+type,
data: { ajax: 1, add_username: type_add_username.val() },

			async: false,

			async: true,

	        complete: function (request)
{
if(request.responseText.indexOf("buddy_count") >= 0 || request.responseText.indexOf("ignored_count") >= 0)

	        complete: function (request)
{
if(request.responseText.indexOf("buddy_count") >= 0 || request.responseText.indexOf("ignored_count") >= 0)

Zeile 211Zeile 211
					$("#sentrequests").html(request.responseText);
}


					$("#sentrequests").html(request.responseText);
}


		        type_submit.removeAttr("disabled");
type_add_username.removeAttr("disabled");

		        type_submit.prop("disabled", false);
type_add_username.prop("disabled", false);

		        type_submit.attr("value", old_value);
type_add_username.val("");

		        type_submit.attr("value", old_value);
type_add_username.val("");

		        type_add_username.focus();

		        type_add_username.trigger('focus');

				type_add_username.select2('data', null);
}
});

				type_add_username.select2('data', null);
}
});

Zeile 234Zeile 234
			var message = lang.remove_buddy;
}


			var message = lang.remove_buddy;
}


		$.prompt(message, {

		MyBB.prompt(message, {

			buttons:[
{title: yes_confirm, value: true},
{title: no_confirm, value: false}

			buttons:[
{title: yes_confirm, value: true},
{title: no_confirm, value: false}

Zeile 247Zeile 247
						type: 'post',
url: 'usercp.php?action=do_editlists&my_post_key='+my_post_key+'&manage='+type+'&delete='+uid,
data: { ajax: 1 },

						type: 'post',
url: 'usercp.php?action=do_editlists&my_post_key='+my_post_key+'&manage='+type+'&delete='+uid,
data: { ajax: 1 },

						async: false

						async: true

					});
}
}

					});
}
}