Vergleich jscripts/general.js - 1.8.17 - 1.8.22

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 17Zeile 17
		$('[name="allbox"]').each(function(key, value) {
var allbox = this;
var checked = $(this).is(':checked');

		$('[name="allbox"]').each(function(key, value) {
var allbox = this;
var checked = $(this).is(':checked');

			var checkboxes = $(this).closest('form').find(':checkbox');
checkboxes.change(function() {


			var checkboxes = $(this).closest('form').find(':checkbox').not('[name="allbox"]');

checkboxes.on('change', function() {

				if(checked && !$(this).prop('checked'))
{
checked = false;

				if(checked && !$(this).prop('checked'))
{
checked = false;

					$(allbox).prop('checked', checked);
}
});
$(this).change(function() {
checked = $(this).is(':checked');
checkboxes.prop('checked', checked);











					$(allbox).trigger('change', ['item']);
}
});

$(this).on('change', function(event, origin) {
checked = $(this).is(':checked');

if(typeof(origin) == "undefined")
{
checkboxes.each(function() {
if(checked != $(this).is(':checked'))
{
$(this).prop('checked', checked).trigger('change');
}
});
}

			});
});


			});
});


Zeile 35Zeile 46
		var initialfocus = $(".initial_focus");
if(initialfocus.length)
{

		var initialfocus = $(".initial_focus");
if(initialfocus.length)
{

			initialfocus.focus();

			initialfocus.trigger('focus');

		}

if(typeof(use_xmlhttprequest) != "undefined" && use_xmlhttprequest == 1)

		}

if(typeof(use_xmlhttprequest) != "undefined" && use_xmlhttprequest == 1)

Zeile 45Zeile 56
			{
var element = $(this);
if(element.hasClass('forum_off') || element.hasClass('forum_offclose') || element.hasClass('forum_offlink') || element.hasClass('subforum_minioff') || element.hasClass('subforum_minioffclose') || element.hasClass('subforum_miniofflink') || (element.attr("title") && element.attr("title") == lang.no_new_posts)) return;

			{
var element = $(this);
if(element.hasClass('forum_off') || element.hasClass('forum_offclose') || element.hasClass('forum_offlink') || element.hasClass('subforum_minioff') || element.hasClass('subforum_minioffclose') || element.hasClass('subforum_miniofflink') || (element.attr("title") && element.attr("title") == lang.no_new_posts)) return;


element.click(function()
{


element.on('click', function()
{

					MyBB.markForumRead(this);
});

element.css("cursor", "pointer");
if(element.attr("title"))

					MyBB.markForumRead(this);
});

element.css("cursor", "pointer");
if(element.attr("title"))

				{

				{

					element.attr("title", element.attr("title") + " - ");
}
element.attr("title", element.attr("title") + lang.click_mark_read);

					element.attr("title", element.attr("title") + " - ");
}
element.attr("title", element.attr("title") + lang.click_mark_read);

			});
}


			});
}


		if(typeof $.modal !== "undefined")
{
$(document).on($.modal.OPEN, function(event, modal) {
$("body").css("overflow", "hidden");
if(initialfocus.length > 0)
{

		if(typeof $.modal !== "undefined")
{
$(document).on($.modal.OPEN, function(event, modal) {
$("body").css("overflow", "hidden");
if(initialfocus.length > 0)
{

					initialfocus.focus();

					initialfocus.trigger('focus');

				}
});

$(document).on($.modal.CLOSE, function(event, modal) {
$("body").css("overflow", "auto");

				}
});

$(document).on($.modal.CLOSE, function(event, modal) {
$("body").css("overflow", "auto");

 
			});
}

$("a.referralLink").on('click', MyBB.showReferrals);

if($('.author_avatar').length)
{
$(".author_avatar img").on('error', function () {
$(this).unbind("error").closest('.author_avatar').remove();

			});
}
},

			});
}
},

Zeile 86Zeile 106
		{
$(html).appendTo('body').modal(options);
});

		{
$(html).appendTo('body').modal(options);
});

 
	},

prompt: function(message, options)
{
var defaults = { fadeDuration: 250, zIndex: (typeof modal_zindex !== 'undefined' ? modal_zindex : 9999) };
var buttonsText = '';

for (var i in options.buttons)
{
buttonsText += templates.modal_button.replace('__title__', options.buttons[i].title);
}

var html = templates.modal.replace('__buttons__', buttonsText).replace('__message__', message);
var modal = $(html);
modal.modal($.extend(defaults, options));
var buttons = modal.find('.modal_buttons > .button');
buttons.on('click', function(e)
{
e.preventDefault();
var index = $(this).index();
if (options.submit(e, options.buttons[index].value) == false)
return;

$.modal.close();
});

if (buttons[0])
{
modal.on($.modal.OPEN, function()
{
$(buttons[0]).trigger('focus');
});
}

return modal;

	},

deleteEvent: function(eid)
{

	},

deleteEvent: function(eid)
{

		$.prompt(deleteevent_confirm, {

		MyBB.prompt(deleteevent_confirm, {

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

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

Zeile 104Zeile 159
									action: "calendar.php",
style: "display: none;"
});

									action: "calendar.php",
style: "display: none;"
});


form.append(


form.append(

						$("<input />",
{
name: "action",

						$("<input />",
{
name: "action",

Zeile 132Zeile 187
							name: "eid",
type: "hidden",
value: eid

							name: "eid",
type: "hidden",
value: eid

						})

						})

					);

form.append(

					);

form.append(

Zeile 145Zeile 200
					);

$("body").append(form);

					);

$("body").append(form);

					form.submit();

					form.trigger('submit');

				}
}
});

				}
}
});

Zeile 159Zeile 214
		}

MyBB.popupWindow("/reputation.php?action=add&uid="+uid+"&pid="+pid+"&modal=1");

		}

MyBB.popupWindow("/reputation.php?action=add&uid="+uid+"&pid="+pid+"&modal=1");

	},


	},


	viewNotes: function(uid)
{
MyBB.popupWindow("/member.php?action=viewnotes&uid="+uid+"&modal=1");
},

getIP: function(pid)

	viewNotes: function(uid)
{
MyBB.popupWindow("/member.php?action=viewnotes&uid="+uid+"&modal=1");
},

getIP: function(pid)

	{

	{

		MyBB.popupWindow("/moderation.php?action=getip&pid="+pid+"&modal=1");
},


		MyBB.popupWindow("/moderation.php?action=getip&pid="+pid+"&modal=1");
},


Zeile 178Zeile 233

deleteReputation: function(uid, rid)
{


deleteReputation: function(uid, rid)
{

		$.prompt(delete_reputation_confirm, {

		MyBB.prompt(delete_reputation_confirm, {

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

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

Zeile 187Zeile 242
				if(v == true)
{
var form = $("<form />",

				if(v == true)
{
var form = $("<form />",

					{

					{

						method: "post",
action: "reputation.php?action=delete",
style: "display: none;"
});

						method: "post",
action: "reputation.php?action=delete",
style: "display: none;"
});


form.append(


form.append(

						$("<input />",
{
name: "rid",
type: "hidden",
value: rid

						$("<input />",
{
name: "rid",
type: "hidden",
value: rid

						})

						})

					);

if(my_post_key)

					);

if(my_post_key)

Zeile 224Zeile 279
					);

$("body").append(form);

					);

$("body").append(form);

					form.submit();

					form.trigger('submit');

				}
}
});

				}
}
});

Zeile 239Zeile 294
		if(typeof sortby === "undefined")
{
sortby = "";

		if(typeof sortby === "undefined")
{
sortby = "";

		}

if(sortby == "username")

		}

if(sortby == "username")

		{
sort = "&sort=" + sortby;
}

		{
sort = "&sort=" + sortby;
}

Zeile 337Zeile 392
		{
return false;
}

		{
return false;
}

		form.submit();

		form.trigger('submit');

	},

changeTheme: function()
{
form = $("#theme_select");
if(!form.length)

	},

changeTheme: function()
{
form = $("#theme_select");
if(!form.length)

		{
return false;
}
form.submit();
},


		{
return false;
}
form.trigger('submit');
},


	detectDSTChange: function(timezone_with_dst)
{
var date = new Date();

	detectDSTChange: function(timezone_with_dst)
{
var date = new Date();

Zeile 382Zeile 437
						);

$("body").append(form);

						);

$("body").append(form);

						form.submit();

						form.trigger('submit');

	                }
}
});

	                }
}
});

Zeile 403Zeile 458
		}

$.ajax(

		}

$.ajax(

		{

		{

			type: 'post',
url: bburl + 'private.php?action=dismiss_notice',
data: { ajax: 1, my_post_key: my_post_key },
async: true
});
pm_notice.remove();

			type: 'post',
url: bburl + 'private.php?action=dismiss_notice',
data: { ajax: 1, my_post_key: my_post_key },
async: true
});
pm_notice.remove();

		return false;

		return false;

	},

submitReputation: function(uid, pid, del)
{
// Get form, serialize it and send it
var datastring = $(".reputation_"+uid+"_"+pid).serialize();

	},

submitReputation: function(uid, pid, del)
{
// Get form, serialize it and send it
var datastring = $(".reputation_"+uid+"_"+pid).serialize();





		if(del == 1)
datastring = datastring + '&delete=1';


		if(del == 1)
datastring = datastring + '&delete=1';


Zeile 436Zeile 491
			},
error: function(){
alert(lang.unknown_error);

			},
error: function(){
alert(lang.unknown_error);

			}
});


			}
});


		return false;
},

deleteAnnouncement: function(data)

		return false;
},

deleteAnnouncement: function(data)

	{
$.prompt(announcement_quickdelete_confirm, {

	{
MyBB.prompt(announcement_quickdelete_confirm, {

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

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

Zeile 458Zeile 513
		});

return false;

		});

return false;

 
	},

showReferrals: function(e)
{
var idPieces, uid;

e.preventDefault();

if(typeof this.id == "undefined")
{
return false;
}

idPieces = this.id.split("_");
uid = parseInt(idPieces[idPieces.length - 1], 10);

if(uid <= 0)
{
return false;
}

MyBB.popupWindow("/xmlhttp.php?action=get_referrals&uid="+uid);

	},

// Fixes https://github.com/mybb/mybb/issues/1232

	},

// Fixes https://github.com/mybb/mybb/issues/1232

Zeile 577Zeile 654
					return;
}


					return;
}


				expander.click(function()

				expander.on('click', function()

				{
controls = expander.attr("id").replace("_img", "");
expandables.expandCollapse(this, controls);

				{
controls = expander.attr("id").replace("_img", "");
expandables.expandCollapse(this, controls);