Zeile 15 | Zeile 15 |
---|
/* Create the Check All feature */ $('[name="allbox"]').each(function(key, value) {
|
/* Create the Check All feature */ $('[name="allbox"]').each(function(key, value) {
|
$(this).change(function() { var checkboxes = $(this).closest('form').find(':checkbox'); if($(this).is(':checked')) { checkboxes.prop('checked', true); } else { checkboxes.removeAttr('checked');
| var allbox = this; var checked = $(this).is(':checked'); var checkboxes = $(this).closest('form').find(':checkbox'); checkboxes.change(function() { if(checked && !$(this).prop('checked')) { checked = false; $(allbox).prop('checked', checked);
|
}
|
}
|
| }); $(this).change(function() { checked = $(this).is(':checked'); checkboxes.prop('checked', checked);
|
}); });
// Initialise "initial focus" field if we have one var initialfocus = $(".initial_focus");
|
}); });
// Initialise "initial focus" field if we have one var initialfocus = $(".initial_focus");
|
if(initialfocus.length > 0)
| if(initialfocus.length)
|
{ initialfocus.focus(); }
| { initialfocus.focus(); }
|
Zeile 72 | Zeile 78 |
---|
popupWindow: function(url, options, root) {
|
popupWindow: function(url, options, root) {
|
if(!options) options = { fadeDuration: 250, zIndex: 5 }
| if(!options) options = { fadeDuration: 250, zIndex: (typeof modal_zindex !== 'undefined' ? modal_zindex : 9999) }
|
if(root != true) url = rootpath + url;
| if(root != true) url = rootpath + url;
|
Zeile 104 | Zeile 110 |
---|
{ name: "action", type: "hidden",
|
{ name: "action", type: "hidden",
|
value: "do_editevent"
| value: "do_deleteevent"
|
}) );
| }) );
|
Zeile 152 | Zeile 158 |
---|
var pid = 0; }
|
var pid = 0; }
|
MyBB.popupWindow("/reputation.php?action=add&uid="+uid+"&pid="+pid);
| MyBB.popupWindow("/reputation.php?action=add&uid="+uid+"&pid="+pid+"&modal=1");
|
},
viewNotes: function(uid) {
|
},
viewNotes: function(uid) {
|
MyBB.popupWindow("/member.php?action=viewnotes&uid="+uid);
| MyBB.popupWindow("/member.php?action=viewnotes&uid="+uid+"&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");
|
},
deleteReputation: function(uid, rid)
| },
deleteReputation: function(uid, rid)
|
Zeile 171 | Zeile 187 |
---|
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;"
|
Zeile 181 | Zeile 197 |
---|
$("<input />", { name: "rid",
|
$("<input />", { name: "rid",
|
type: "hidden",
| type: "hidden",
|
value: rid }) );
| value: rid }) );
|
Zeile 214 | Zeile 230 |
---|
});
return false;
|
});
return false;
|
},
whoPosted: function(tid) { MyBB.popupWindow("/misc.php?action=whoposted&tid="+tid); },
| },
whoPosted: function(tid, sortby) { var sort = "", url, body;
if(typeof sortby === "undefined") { sortby = ""; }
if(sortby == "username") { sort = "&sort=" + sortby; } url = "/misc.php?action=whoposted&tid="+tid+sort+"&modal=1";
// if the modal is already open just replace the contents if($.modal.isActive()) { // don't waste a query if we are already sorted correctly if(sortby == MyBB.whoPostedSort) { return; }
MyBB.whoPostedSort = sortby;
$.get(rootpath + url, function(html) { // just replace the inner div body = $(html).children("div"); $("div.modal").children("div").replaceWith(body); }); return; } MyBB.whoPostedSort = ""; MyBB.popupWindow(url); },
|
markForumRead: function(event) { var element = $(event);
|
markForumRead: function(event) { var element = $(event);
|
if(!element)
| if(!element.length)
|
{ return false; } var fid = element.attr("id").replace("mark_read_", ""); if(!fid)
|
{ return false; } var fid = element.attr("id").replace("mark_read_", ""); if(!fid)
|
{
| {
|
return false; }
| return false; }
|
Zeile 248 | Zeile 297 |
---|
forumMarkedRead: function(fid, request) { if(request == 1)
|
forumMarkedRead: function(fid, request) { if(request == 1)
|
{ if($("#mark_read_"+fid).hasClass('subforum_minion'))
| { var markreadfid = $("#mark_read_"+fid); if(markreadfid.hasClass('subforum_minion'))
|
{
|
{
|
$("#mark_read_"+fid).removeClass('subforum_minion').addClass('subforum_minioff');
| markreadfid.removeClass('subforum_minion').addClass('subforum_minioff');
|
} else {
|
} else {
|
$("#mark_read_"+fid).removeClass('forum_on').addClass('forum_off');
| markreadfid.removeClass('forum_on').addClass('forum_off');
|
}
|
}
|
$("#mark_read_"+fid).css("cursor", "default").attr("title", lang.no_new_posts);
| markreadfid.css("cursor", "default").attr("title", lang.no_new_posts);
|
} },
| } },
|
Zeile 283 | Zeile 333 |
---|
changeLanguage: function() { form = $("#lang_select");
|
changeLanguage: function() { form = $("#lang_select");
|
if(!form)
| if(!form.length)
|
{ return false; }
| { return false; }
|
Zeile 293 | Zeile 343 |
---|
changeTheme: function() { form = $("#theme_select");
|
changeTheme: function() { form = $("#theme_select");
|
if(!form)
| if(!form.length)
|
{ return false; }
| { return false; }
|
Zeile 341 | Zeile 391 |
---|
dismissPMNotice: function(bburl) {
|
dismissPMNotice: function(bburl) {
|
var pm_notice = $("#content").find("#pm_notice"); if(!pm_notice)
| var pm_notice = $("#pm_notice"); if(!pm_notice.length)
|
{ return false; }
| { return false; }
|
Zeile 373 | Zeile 423 |
---|
$.ajax({ type: "POST",
|
$.ajax({ type: "POST",
|
url: "reputation.php",
| url: "reputation.php?modal=1",
|
data: datastring, dataType: "html", success: function(data) {
| data: datastring, dataType: "html", success: function(data) {
|
Zeile 381 | Zeile 431 |
---|
$(".modal_"+uid+"_"+pid).fadeOut('slow', function() { $(".modal_"+uid+"_"+pid).html(data); $(".modal_"+uid+"_"+pid).fadeIn('slow');
|
$(".modal_"+uid+"_"+pid).fadeOut('slow', function() { $(".modal_"+uid+"_"+pid).html(data); $(".modal_"+uid+"_"+pid).fadeIn('slow');
|
| $(".modal").fadeIn('slow');
|
}); }, error: function(){
| }); }, error: function(){
|
Zeile 402 | Zeile 453 |
---|
if(v == true) { window.location=data.href.replace('action=delete_announcement','action=do_delete_announcement');
|
if(v == true) { window.location=data.href.replace('action=delete_announcement','action=do_delete_announcement');
|
} }
| } }
|
});
return false;
| });
return false;
|
Zeile 419 | Zeile 470 |
---|
if(matches == 1) { return lang.select2_match;
|
if(matches == 1) { return lang.select2_match;
|
}
| }
|
else { return lang.select2_matches.replace('{1}',matches);
| else { return lang.select2_matches.replace('{1}',matches);
|
Zeile 437 | Zeile 488 |
---|
else { return lang.select2_inputtooshort_plural.replace('{1}', n);
|
else { return lang.select2_inputtooshort_plural.replace('{1}', n);
|
}
| }
|
}, formatInputTooLong: function (input, max) { var n = input.length - max; if( n == 1)
|
}, formatInputTooLong: function (input, max) { var n = input.length - max; if( n == 1)
|
{
| {
|
return lang.select2_inputtoolong_single;
|
return lang.select2_inputtoolong_single;
|
} else {
| } else {
|
return lang.select2_inputtoolong_plural.replace('{1}', n); } },
| return lang.select2_inputtoolong_plural.replace('{1}', n); } },
|
Zeile 475 | Zeile 526 |
---|
get: function(name) { name = cookiePrefix + name;
|
get: function(name) { name = cookiePrefix + name;
|
return $.cookie(name); },
set: function(name, value, expires) { name = cookiePrefix + name; if(!expires)
| return Cookies.get(name); },
set: function(name, value, expires) { name = cookiePrefix + name; if(!expires)
|
{ expires = 315360000; // 10*365*24*60*60 => 10 years }
| { expires = 315360000; // 10*365*24*60*60 => 10 years }
|
Zeile 492 | Zeile 543 |
---|
options = { expires: expire, path: cookiePath,
|
options = { expires: expire, path: cookiePath,
|
domain: cookieDomain
| domain: cookieDomain, secure: cookieSecureFlag == true,
|
};
|
};
|
return $.cookie(name, value, options);
| return Cookies.set(name, value, options);
|
},
unset: function(name)
| },
unset: function(name)
|
Zeile 506 | Zeile 558 |
---|
path: cookiePath, domain: cookieDomain };
|
path: cookiePath, domain: cookieDomain };
|
return $.removeCookie(name, options);
| return Cookies.remove(name, options);
|
} };
| } };
|
Zeile 577 | Zeile 629 |
---|
if(expandedItem.is(":hidden")) { expandedItem.toggle("fast");
|
if(expandedItem.is(":hidden")) { expandedItem.toggle("fast");
|
element.attr("src", element.attr("src").replace("collapse_collapsed.png", "collapse.png"))
| 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');
| .attr("alt", "[-]") .attr("title", "[-]"); element.parent().parent('td').removeClass('tcat_collapse_collapsed');
|
Zeile 588 | Zeile 640 |
---|
else { expandedItem.toggle("fast");
|
else { expandedItem.toggle("fast");
|
element.attr("src", element.attr("src").replace("collapse.png", "collapse_collapsed.png"))
| 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');
| .attr("alt", "[+]") .attr("title", "[+]"); element.parent().parent('td').addClass('tcat_collapse_collapsed');
|
Zeile 630 | Zeile 682 |
---|
var lang = {
};
|
var lang = {
};
|
| /* add keepelement to jquery-modal plugin */ (function($) { if(typeof $.modal != 'undefined') { $.modal.defaults.keepelement = false;
$.modal.prototype.oldCloseFunction = $.modal.prototype.close; $.modal.prototype.close = function() { this.oldCloseFunction();
// Deletes the element (multi-modal feature: e.g. when you click on multiple report buttons, you will want to see different content for each) if(!this.options.keepelement) { this.$elm.remove(); } }; } })(jQuery);
|
MyBB.init();
| MyBB.init();
|