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();
if (options.submit(e, options.buttons[index].value) == false)
return;

		{
e.preventDefault();
var index = $(this).index();
if (options.submit(e, options.buttons[index].value) == false)
return;





			$.modal.close();
});


			$.modal.close();
});


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

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

				buttons[0].focus();

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

			});
}


			});
}


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

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


form.append(
$("<input />",
{


form.append(
$("<input />",
{

							name: "action",
type: "hidden",
value: "do_deleteevent"

							name: "action",
type: "hidden",
value: "do_deleteevent"

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

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

						})
);

form.append(

						})
);

form.append(

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

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

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 334Zeile 342
		}
var fid = element.attr("id").replace("mark_read_", "");
if(!fid)

		}
var fid = element.attr("id").replace("mark_read_", "");
if(!fid)

		{

		{

			return false;
}


			return false;
}


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 551Zeile 559
					else
{
return lang.select2_matches.replace('{1}',matches);

					else
{
return lang.select2_matches.replace('{1}',matches);

					}
},

					}
},

				formatNoMatches: function () {
return lang.select2_nomatches;
},
formatInputTooShort: function (input, min) {
var n = min - input.length;

				formatNoMatches: function () {
return lang.select2_nomatches;
},
formatInputTooShort: function (input, min) {
var n = min - input.length;

					if( n == 1)
{

					if( n == 1)
{

						return lang.select2_inputtooshort_single;
}
else

						return lang.select2_inputtooshort_single;
}
else

Zeile 576Zeile 584
					else
{
return lang.select2_inputtoolong_plural.replace('{1}', n);

					else
{
return lang.select2_inputtoolong_plural.replace('{1}', n);

					}
},

					}
},

				formatSelectionTooBig: function (limit) {
if( limit == 1)
{

				formatSelectionTooBig: function (limit) {
if( limit == 1)
{

Zeile 595Zeile 603
					return lang.select2_searching;
}
});

					return lang.select2_searching;
}
});

		}

		}

	}
};


	}
};


Zeile 613Zeile 621
		{
expires = 315360000; // 10*365*24*60*60 => 10 years
}

		{
expires = 315360000; // 10*365*24*60*60 => 10 years
}





		expire = new Date();
expire.setTime(expire.getTime()+(expires*1000));


		expire = new Date();
expire.setTime(expire.getTime()+(expires*1000));


Zeile 622Zeile 630
			path: cookiePath,
domain: cookieDomain,
secure: cookieSecureFlag == true,

			path: cookiePath,
domain: cookieDomain,
secure: cookieSecureFlag == true,

		};

		};


return Cookies.set(name, value, options);
},


return Cookies.set(name, value, options);
},

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()
{
controls = expander.attr("id").replace("_img", "");
expandables.expandCollapse(this, controls);
});

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

expandCollapse: function(e, controls)

				}

expander.on('click', function()
{
expandables.expandCollapse($(this));
});

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

expandCollapse: function(element)









	{

	{

		element = $(e);


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





		if(!element || controls == false)
{
return false;
}
var expandedItem = $("#"+controls+"_e");
var collapsedItem = $("#"+controls+"_c");

if(expandedItem.length && collapsedItem.length)

		if(expandedItem.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);
}

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

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 737Zeile 704
		if(collapsed)
{
saved = collapsed.split("|");

		if(collapsed)
{
saved = collapsed.split("|");





			$.each(saved, function(intIndex, objValue)
{
if(objValue != id && objValue != "")

			$.each(saved, function(intIndex, objValue)
{
if(objValue != id && objValue != "")

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

	}
};


	}
};