Vergleich jscripts/general.js - 1.8.20 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 19Zeile 19
			var checked = $(this).is(':checked');
var checkboxes = $(this).closest('form').find(':checkbox').not('[name="allbox"]');


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


			checkboxes.change(function() {

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

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

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

Zeile 35Zeile 35
					checkboxes.each(function() {
if(checked != $(this).is(':checked'))
{

					checkboxes.each(function() {
if(checked != $(this).is(':checked'))
{

							$(this).prop('checked', checked).change();

							$(this).prop('checked', checked).trigger('change');

						}
});
}

						}
});
}

Zeile 46Zeile 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 57Zeile 57
				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);
});

				{
MyBB.markForumRead(this);
});

Zeile 77Zeile 77
				$("body").css("overflow", "hidden");
if(initialfocus.length > 0)
{

				$("body").css("overflow", "hidden");
if(initialfocus.length > 0)
{

					initialfocus.focus();

					initialfocus.trigger('focus');

				}
});


				}
});


Zeile 86Zeile 86
			});
}


			});
}


		$("a.referralLink").click(MyBB.showReferrals);

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


if($('.author_avatar').length)
{


if($('.author_avatar').length)
{

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

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

		var buttonsText = '';

		var buttonsText = '', title = '';


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



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);









		// Support passing custom title
if ($.isArray(message)) {
title = message[0];
message = message[1];
} else {
title = lang.confirm_title;
}

var html = templates.modal.replace('__buttons__', buttonsText).replace('__message__', message).replace('__title__', title);

		var modal = $(html);
modal.modal($.extend(defaults, options));
var buttons = modal.find('.modal_buttons > .button');

		var modal = $(html);
modal.modal($.extend(defaults, options));
var buttons = modal.find('.modal_buttons > .button');

		buttons.click(function(e)

		buttons.on('click', function(e)

		{
e.preventDefault();
var index = $(this).index();

		{
e.preventDefault();
var index = $(this).index();

Zeile 136Zeile 144
		{
modal.on($.modal.OPEN, function()
{

		{
modal.on($.modal.OPEN, function()
{

				buttons[0].focus();

				$(buttons[0]).trigger('focus');

			});
}


			});
}


Zeile 200Zeile 208
					);

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

					);

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

					form.submit();

					form.trigger('submit');

				}
}
});

				}
}
});

Zeile 279Zeile 287
					);

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

					);

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

					form.submit();

					form.trigger('submit');

				}
}
});

				}
}
});

Zeile 392Zeile 400
		{
return false;
}

		{
return false;
}

		form.submit();

		form.trigger('submit');

	},

changeTheme: function()

	},

changeTheme: function()

Zeile 402Zeile 410
		{
return false;
}

		{
return false;
}

		form.submit();

		form.trigger('submit');

	},

detectDSTChange: function(timezone_with_dst)

	},

detectDSTChange: function(timezone_with_dst)

Zeile 437Zeile 445
						);

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

						);

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

						form.submit();

						form.trigger('submit');

	                }
}
});

	                }
}
});

Zeile 640Zeile 648
};

var expandables = {

};

var expandables = {



 
	init: function()
{
var expanders = $(".expcolimage .expander");

	init: function()
{
var expanders = $(".expcolimage .expander");

Zeile 649Zeile 656
			expanders.each(function()
{
var expander = $(this);

			expanders.each(function()
{
var expander = $(this);

				if(expander.attr("id") == false)

				if(!expander || expander.attr("id") == false)

				{
return;
}


				{
return;
}


				expander.click(function()

				expander.on('click', function()

				{

				{

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

					expandables.expandCollapse($(this));


				});


				});


				if(MyBB.browser == "ie")
{
expander.css("cursor", "hand");
}
else
{
expander.css("cursor", "pointer");
}

				expander.css("cursor", MyBB.browser == "ie" ? "hand" : "pointer");








			});
}
},


			});
}
},


	expandCollapse: function(e, controls)

	expandCollapse: function(element)

	{

	{

		element = $(e);


		var controls = element.attr("id").replace("_img", ""),
expandedItem = $("#"+controls+"_e");





		if(!element || controls == false)

		if(expandedItem.length)

		{

		{

			return false;
}
var expandedItem = $("#"+controls+"_e");
var collapsedItem = $("#"+controls+"_c");

			var expState = + !expandedItem.is(":hidden"),
expcolImg = element.attr("src"),
expText = [lang.expcol_collapse, lang.expcol_expand];






		if(expandedItem.length && collapsedItem.length)
{
// Expanding
if(expandedItem.is(":hidden"))
{
expandedItem.toggle("fast");
collapsedItem.toggle("fast");
this.saveCollapsed(controls);
}
// Collapsing
else
{
expandedItem.toggle("fast");
collapsedItem.toggle("fast");
this.saveCollapsed(controls, 1);
}
}
else if(expandedItem.length && !collapsedItem.length)
{
// Expanding
if(expandedItem.is(":hidden"))
{
expandedItem.toggle("fast");
element.attr("src", element.attr("src").replace(/collapse_collapsed\.(gif|jpg|jpeg|bmp|png)$/i, "collapse.$1"))
.attr("alt", "[-]")
.attr("title", "[-]");
element.parent().parent('td').removeClass('tcat_collapse_collapsed');
element.parent().parent('.thead').removeClass('thead_collapsed');
this.saveCollapsed(controls);
}
// Collapsing
else
{
expandedItem.toggle("fast");
element.attr("src", element.attr("src").replace(/collapse\.(gif|jpg|jpeg|bmp|png)$/i, "collapse_collapsed.$1"))
.attr("alt", "[+]")
.attr("title", "[+]");
element.parent().parent('td').addClass('tcat_collapse_collapsed');
element.parent().parent('.thead').addClass('thead_collapsed');
this.saveCollapsed(controls, 1);
}

			expandedItem.toggle("fast", this.expCallback(controls, expState));

element.attr({
"alt": expText[expState],
"title": expText[expState],
"src": expState ? expcolImg.replace('collapse.', 'collapse_collapsed.') : expcolImg.replace('collapse_collapsed.', 'collapse.')
})
.parents(':eq(1)').toggleClass(element.parents(':eq(1)').hasClass('thead') ? 'thead_collapsed' : 'tcat_collapse_collapsed');
this.saveCollapsed(controls, expState);

































		}
return true;
},

		}
return true;
},

Zeile 752Zeile 719
			newCollapsed[newCollapsed.length] = id;
}
Cookie.set('collapsed', newCollapsed.join("|"));

			newCollapsed[newCollapsed.length] = id;
}
Cookie.set('collapsed', newCollapsed.join("|"));

 
	},

// Dummy callback function to override by theme developers
expCallback: function(id, state)
{
//console.log("id:"+id+" state:"+state);

	}
};


	}
};