Vergleich jscripts/general.js - 1.8.25 - 1.8.33

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
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');

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",

						{
name: "action",
type: "hidden",

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

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

						})
);


						})
);


					form.append(
$("<input />",
{
name: "delete",
type: "hidden",
value: 1

					form.append(
$("<input />",
{
name: "delete",
type: "hidden",
value: 1

						})
);


						})
);


					$("body").append(form);
form.trigger('submit');
}

					$("body").append(form);
form.trigger('submit');
}

Zeile 207Zeile 215
	},

reputation: function(uid, pid)

	},

reputation: function(uid, pid)

	{

	{

		if(!pid)
{
var pid = 0;

		if(!pid)
{
var pid = 0;

Zeile 224Zeile 232
	getIP: function(pid)
{
MyBB.popupWindow("/moderation.php?action=getip&pid="+pid+"&modal=1");

	getIP: function(pid)
{
MyBB.popupWindow("/moderation.php?action=getip&pid="+pid+"&modal=1");

	},


	},


	getPMIP: function(pmid)
{
MyBB.popupWindow("/moderation.php?action=getpmip&pmid="+pmid+"&modal=1");

	getPMIP: function(pmid)
{
MyBB.popupWindow("/moderation.php?action=getpmip&pmid="+pmid+"&modal=1");

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

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

							{

							{

								name: "my_post_key",
type: "hidden",
value: my_post_key

								name: "my_post_key",
type: "hidden",
value: my_post_key

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

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

				{
return;
}

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");
}
});
}
},

expandCollapse: function(e, controls)

				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;
},





	saveCollapsed: function(id, add)
{
var saved = [];

	saveCollapsed: function(id, add)
{
var saved = [];

Zeile 745Zeile 712
					newCollapsed[newCollapsed.length] = objValue;
}
});

					newCollapsed[newCollapsed.length] = objValue;
}
});

		}


		}


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

		if(add == 1)
{
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);

	}
};


	}
};