From 2c4c7125f766de795581ee1435cf7bcde02a78eb Mon Sep 17 00:00:00 2001 From: "woltlab.com" Date: Sun, 8 Feb 2015 11:11:46 +0100 Subject: [PATCH] Updating minified JavaScript files --- wcfsetup/install/files/js/WCF.Combined.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WCF.Combined.min.js b/wcfsetup/install/files/js/WCF.Combined.min.js index ed7183b9d3..ee8335a59a 100755 --- a/wcfsetup/install/files/js/WCF.Combined.min.js +++ b/wcfsetup/install/files/js/WCF.Combined.min.js @@ -79,7 +79,7 @@ window.matchMedia||(window.matchMedia=function(){var c=window.styleMedia||window (function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?a(require("jquery")):a(jQuery)})(function(d){function b(h){return"string"==typeof h?parseInt(h,10):~~h}var f={wheelSpeed:1,wheelPropagation:!1,swipePropagation:!0,minScrollbarLength:null,maxScrollbarLength:null,useBothWheelAxes:!1,useKeyboard:!0,suppressScrollX:!1,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0,includePadding:!1},g=0,c=function(){var h=g++;return function(e){var i=".perfect-scrollbar-"+h;return e===void 0?i:e+i}},a="WebkitAppearance" in document.documentElement.style;d.fn.perfectScrollbar=function(h,e){return this.each(function(){function aS(m,p){var q=m+p,k=aq-ac;aK=0>q?0:q>k?k:q;var j=b(aK*(l-aq)/(aq-ac));ah.scrollTop(j)}function aD(m,p){var q=m+p,k=ap-aI;o=0>q?0:q>k?k:q;var j=b(o*(ar-ap)/(ap-aI));ah.scrollLeft(j)}function aQ(j){return ae.minScrollbarLength&&(j=Math.max(j,ae.minScrollbarLength)),ae.maxScrollbarLength&&(j=Math.min(j,ae.maxScrollbarLength)),j}function aC(){var k={width:al};k.left=at?ah.scrollLeft()+ap-ar:ah.scrollLeft(),ag?k.bottom=aT-ah.scrollTop():k.top=ad+ah.scrollTop(),am.css(k);var j={top:ah.scrollTop(),height:au};i?j.right=at?ar-ah.scrollLeft()-r-ak.outerWidth():r-ah.scrollLeft():j.left=at?ah.scrollLeft()+2*ap-ar-aw-ak.outerWidth():aw+ah.scrollLeft(),an.css(j),t.css({left:o,width:aI-ax}),ak.css({top:aK,height:ac-aF})}function aP(){ah.removeClass("ps-active-x"),ah.removeClass("ps-active-y"),ap=ae.includePadding?ah.innerWidth():ah.width(),aq=ae.includePadding?ah.innerHeight():ah.height(),ar=ah.prop("scrollWidth"),l=ah.prop("scrollHeight"),!ae.suppressScrollX&&ar>ap+ae.scrollXMarginOffset?(n=!0,al=ap-ao,aI=aQ(b(al*ap/ar)),o=b(ah.scrollLeft()*(al-aI)/(ar-ap))):(n=!1,aI=0,o=0,ah.scrollLeft(0)),!ae.suppressScrollY&&l>aq+ae.scrollYMarginOffset?(af=!0,au=aq-aN,ac=aQ(b(au*aq/l)),aK=b(ah.scrollTop()*(au-ac)/(l-aq))):(af=!1,ac=0,aK=0,ah.scrollTop(0)),o>=al-aI&&(o=al-aI),aK>=au-ac&&(aK=au-ac),aC(),n&&ah.addClass("ps-active-x"),af&&ah.addClass("ps-active-y")}function aG(){var j,m,p=function(q){aD(j,q.pageX-m),aP(),q.stopPropagation(),q.preventDefault()},k=function(){am.removeClass("in-scrolling"),d(aE).unbind(aj("mousemove"),p)};t.bind(aj("mousedown"),function(q){m=q.pageX,j=t.position().left,am.addClass("in-scrolling"),d(aE).bind(aj("mousemove"),p),d(aE).one(aj("mouseup"),k),q.stopPropagation(),q.preventDefault()}),j=m=null}function aO(){var j,m,p=function(q){aS(j,q.pageY-m),aP(),q.stopPropagation(),q.preventDefault()},k=function(){an.removeClass("in-scrolling"),d(aE).unbind(aj("mousemove"),p)};ak.bind(aj("mousedown"),function(q){m=q.pageY,j=ak.position().top,an.addClass("in-scrolling"),d(aE).bind(aj("mousemove"),p),d(aE).one(aj("mouseup"),k),q.stopPropagation(),q.preventDefault()}),j=m=null}function aB(k,j){var m=ah.scrollTop();if(0===k){if(!af){return !1}if(0===m&&j>0||m>=l-aq&&0>j){return !ae.wheelPropagation}}var p=ah.scrollLeft();if(0===j){if(!n){return !1}if(0===p&&0>k||p>=ar-ap&&k>0){return !ae.wheelPropagation}}return !0}function aM(p,k){var q=ah.scrollTop(),s=ah.scrollLeft(),m=Math.abs(p),j=Math.abs(k);if(j>m){if(0>k&&q===l-aq||k>0&&0===q){return !ae.swipePropagation}}else{if(m>j&&(0>p&&s===ar-ap||p>0&&0===s)){return !ae.swipePropagation}}return !0}function aR(){function k(q){var p=q.originalEvent.deltaX,s=-1*q.originalEvent.deltaY;return(p===void 0||s===void 0)&&(p=-1*q.originalEvent.wheelDeltaX/6,s=q.originalEvent.wheelDeltaY/6),q.originalEvent.deltaMode&&1===q.originalEvent.deltaMode&&(p*=10,s*=10),p!==p&&s!==s&&(p=0,s=q.originalEvent.wheelDelta),[p,s]}function j(q){if(a||!(ah.find("select:focus").length>0)){var u=k(q),s=u[0],p=u[1];m=!1,ae.useBothWheelAxes?af&&!n?(p?ah.scrollTop(ah.scrollTop()-p*ae.wheelSpeed):ah.scrollTop(ah.scrollTop()+s*ae.wheelSpeed),m=!0):n&&!af&&(s?ah.scrollLeft(ah.scrollLeft()+s*ae.wheelSpeed):ah.scrollLeft(ah.scrollLeft()-p*ae.wheelSpeed),m=!0):(ah.scrollTop(ah.scrollTop()-p*ae.wheelSpeed),ah.scrollLeft(ah.scrollLeft()+s*ae.wheelSpeed)),aP(),m=m||aB(s,p),m&&(q.stopPropagation(),q.preventDefault())}}var m=!1;window.onwheel!==void 0?ah.bind(aj("wheel"),j):window.onmousewheel!==void 0&&ah.bind(aj("mousewheel"),j)}function aL(){var j=!1;ah.bind(aj("mouseenter"),function(){j=!0}),ah.bind(aj("mouseleave"),function(){j=!1});var k=!1;d(aE).bind(aj("keydown"),function(s){if((!s.isDefaultPrevented||!s.isDefaultPrevented())&&j){for(var q=document.activeElement?document.activeElement:aE.activeElement;q.shadowRoot;){q=q.shadowRoot.activeElement}if(!d(q).is(":input,[contenteditable]")){var m=0,p=0;switch(s.which){case 37:m=-30;break;case 38:p=30;break;case 39:m=30;break;case 40:p=-30;break;case 33:p=90;break;case 32:case 34:p=-90;break;case 35:p=s.ctrlKey?-l:-aq;break;case 36:p=s.ctrlKey?ah.scrollTop():aq;break;default:return}ah.scrollTop(ah.scrollTop()-p),ah.scrollLeft(ah.scrollLeft()+m),k=aB(m,p),k&&s.preventDefault()}}})}function aA(){function j(k){k.stopPropagation()}ak.bind(aj("click"),j),an.bind(aj("click"),function(p){var q=b(ac/2),s=p.pageY-an.offset().top-q,m=aq-ac,k=s/m;0>k?k=0:k>1&&(k=1),ah.scrollTop((l-aq)*k)}),t.bind(aj("click"),j),am.bind(aj("click"),function(p){var q=b(aI/2),s=p.pageX-am.offset().left-q,m=ap-aI,k=s/m;0>k?k=0:k>1&&(k=1),ah.scrollLeft((ar-ap)*k)})}function aH(){function m(){var u=window.getSelection?window.getSelection():document.getSlection?document.getSlection():{rangeCount:0};return 0===u.rangeCount?null:u.getRangeAt(0).commonAncestorContainer}function q(){p||(p=setInterval(function(){return az()?(ah.scrollTop(ah.scrollTop()+j.top),ah.scrollLeft(ah.scrollLeft()+j.left),aP(),void 0):(clearInterval(p),void 0)},50))}function s(){p&&(clearInterval(p),p=null),am.removeClass("in-scrolling"),an.removeClass("in-scrolling")}var p=null,j={top:0,left:0},k=!1;d(aE).bind(aj("selectionchange"),function(){d.contains(ah[0],m())?k=!0:(k=!1,s())}),d(window).bind(aj("mouseup"),function(){k&&(k=!1,s())}),d(window).bind(aj("mousemove"),function(x){if(k){var v={x:x.pageX,y:x.pageY},w=ah.offset(),u={left:w.left,right:w.left+ah.outerWidth(),top:w.top,bottom:w.top+ah.outerHeight()};v.xu.right-3?(j.left=5,am.addClass("in-scrolling")):j.left=0,v.yu.top+3-v.y?-5:-20,an.addClass("in-scrolling")):v.y>u.bottom-3?(j.top=5>v.y-u.bottom+3?5:20,an.addClass("in-scrolling")):j.top=0,0===j.top&&0===j.left?s():q()}})}function aa(H,m){function q(s,p){ah.scrollTop(ah.scrollTop()-p),ah.scrollLeft(ah.scrollLeft()-s),aP()}function j(){z=!0}function x(){z=!1}function y(p){return p.originalEvent.targetTouches?p.originalEvent.targetTouches[0]:p.originalEvent}function D(s){var p=s.originalEvent;return p.targetTouches&&1===p.targetTouches.length?!0:p.pointerType&&"mouse"!==p.pointerType&&p.pointerType!==p.MSPOINTER_TYPE_MOUSE?!0:!1}function I(s){if(D(s)){E=!0;var p=y(s);k.pageX=p.pageX,k.pageY=p.pageY,A=(new Date).getTime(),null!==C&&clearInterval(C),s.stopPropagation()}}function B(J){if(!z&&E&&D(J)){var u=y(J),K={pageX:u.pageX,pageY:u.pageY},w=K.pageX-k.pageX,p=K.pageY-k.pageY;q(w,p),k=K;var v=(new Date).getTime(),L=v-A;L>0&&(F.x=w/L,F.y=p/L,A=v),aM(w,p)&&(J.stopPropagation(),J.preventDefault())}}function G(){!z&&E&&(E=!1,clearInterval(C),C=setInterval(function(){return az()?0.01>Math.abs(F.x)&&0.01>Math.abs(F.y)?(clearInterval(C),void 0):(q(30*F.x,30*F.y),F.x*=0.8,F.y*=0.8,void 0):(clearInterval(C),void 0)},10))}var k={},A=0,F={},C=null,z=!1,E=!1;H&&(d(window).bind(aj("touchstart"),j),d(window).bind(aj("touchend"),x),ah.bind(aj("touchstart"),I),ah.bind(aj("touchmove"),B),ah.bind(aj("touchend"),G)),m&&(window.PointerEvent?(d(window).bind(aj("pointerdown"),j),d(window).bind(aj("pointerup"),x),ah.bind(aj("pointerdown"),I),ah.bind(aj("pointermove"),B),ah.bind(aj("pointerup"),G)):window.MSPointerEvent&&(d(window).bind(aj("MSPointerDown"),j),d(window).bind(aj("MSPointerUp"),x),ah.bind(aj("MSPointerDown"),I),ah.bind(aj("MSPointerMove"),B),ah.bind(aj("MSPointerUp"),G)))}function ay(){ah.bind(aj("scroll"),function(){aP()})}function ai(){ah.unbind(aj()),d(window).unbind(aj()),d(aE).unbind(aj()),ah.data("perfect-scrollbar",null),ah.data("perfect-scrollbar-update",null),ah.data("perfect-scrollbar-destroy",null),t.remove(),ak.remove(),am.remove(),an.remove(),ah=am=an=t=ak=n=af=ap=aq=ar=l=aI=o=aT=ag=ad=ac=aK=r=i=aw=at=aj=null}function ab(){aP(),ay(),aG(),aO(),aA(),aH(),aR(),(av||aJ)&&aa(av,aJ),ae.useKeyboard&&aL(),ah.data("perfect-scrollbar",ah),ah.data("perfect-scrollbar-update",aP),ah.data("perfect-scrollbar-destroy",ai)}var ae=d.extend(!0,{},f),ah=d(this),az=function(){return !!ah};if("object"==typeof h?d.extend(!0,ae,h):e=h,"update"===e){return ah.data("perfect-scrollbar-update")&&ah.data("perfect-scrollbar-update")(),ah}if("destroy"===e){return ah.data("perfect-scrollbar-destroy")&&ah.data("perfect-scrollbar-destroy")(),ah}if(ah.data("perfect-scrollbar")){return ah.data("perfect-scrollbar")}ah.addClass("ps-container");var ap,aq,ar,l,n,aI,o,al,af,ac,aK,au,at="rtl"===ah.css("direction"),aj=c(),aE=this.ownerDocument||document,am=d("
").appendTo(ah),t=d("
").appendTo(am),aT=b(am.css("bottom")),ag=aT===aT,ad=ag?null:b(am.css("top")),ax=b(am.css("borderLeftWidth"))+b(am.css("borderRightWidth")),ao=b(am.css("marginLeft"))+b(am.css("marginRight")),an=d("
").appendTo(ah),ak=d("
").appendTo(an),r=b(an.css("right")),i=r===r,aw=i?null:b(an.css("left")),aF=b(an.css("borderTopWidth"))+b(an.css("borderBottomWidth")),aN=b(an.css("marginTop"))+b(an.css("marginBottom")),av="ontouchstart" in window||window.DocumentTouch&&document instanceof window.DocumentTouch,aJ=null!==window.navigator.msMaxTouchPoints;return ab(),ah})}}); })(this); // WCF.js -(function (window, undefined) {"use strict";(function(){var c=jQuery.fn.data;jQuery.fn.data=function(f,h){if(f){switch(typeof f){case"object":for(var g in f){if(g.match(/ID$/)){var e=f[g];delete f[g];g=g.replace(/ID$/,"-id");f[g]=e}}arguments[0]=f;break;case"string":if(f.match(/ID$/)){arguments[0]=f.replace(/ID$/,"-id")}break}}var d=c.apply(this,arguments);if(f===undefined){for(var g in d){if(g.match(/Id$/)){d[g.replace(/Id$/,"ID")]=d[g];delete d[g]}}}return d};if(!window.console){window.console={}}var b=["log","info","warn","exception","assert","dir","dirxml","trace","group","groupEnd","groupCollapsed","profile","profileEnd","count","clear","time","timeEnd","timeStamp","table","error"];for(var a=0;a0));jQuery.browser.smartphone=($("html").css("caption-side")=="bottom");if(jQuery.browser.mozilla&&d.match(/trident/)){jQuery.browser.mozilla=false;jQuery.browser.msie=true}jQuery.browser.iOS=/\((ipad|iphone|ipod);/.test(d);if(jQuery.browser.iOS){$("html").addClass("iOS")}jQuery.browser.android=(d.indexOf("android")!==-1);jQuery.browser.editor="redactor";jQuery.browser.ckeditor=false;jQuery.browser.redactor=true})();window.WCF={};$.extend(true,{removeArrayValue:function(b,a){return $.grep(b,function(d,c){return a!==d})},wcfEscapeID:function(a){return a.replace(/(:|\.)/g,"\\$1")},wcfIsset:function(a){return !!$("#"+$.wcfEscapeID(a)).length},getLength:function(a){var c=0;for(var b in a){if(a.hasOwnProperty(b)){c++}}return c}});$.fn.extend({getTagName:function(){return(this.length)?this.get(0).tagName.toLowerCase():""},getDimensions:function(c){var b={};var d={};var a=false;if(this.is(":hidden")){b=WCF.getInlineCSS(this);a=true;this.css({display:"block",visibility:"hidden"})}switch(c){case"inner":d={height:this.innerHeight(),width:this.innerWidth()};break;case"outer":d={height:this.outerHeight(),width:this.outerWidth()};break;default:d={height:this.height(),width:this.width()};break}if(a){WCF.revertInlineCSS(this,b,["display","visibility"])}return d},getOffsets:function(c){var b={};var d={};var a=false;if(this.is(":hidden")){b=WCF.getInlineCSS(this);a=true;this.css({display:"block",visibility:"hidden"})}switch(c){case"offset":d=this.offset();break;case"position":default:d=this.position();break}if(a){WCF.revertInlineCSS(this,b,["display","visibility"])}return d},makePositioned:function(a,b){if(a!="absolute"&&a!="fixed"){a="absolute"}var c=this.getOffsets("position");this.css({position:a,left:c.left,margin:0,top:c.top});if(b){this.remove().appentTo("body")}return this},disable:function(){return this.attr("disabled","disabled")},enable:function(){return this.removeAttr("disabled")},wcfIdentify:function(){if(!this.attr("id")){this.attr("id",WCF.getRandomID())}return this.attr("id")},getCaret:function(){if(this.is("input")){if(this.attr("type")!="text"&&this.attr("type")!="password"){return -1}}else{if(!this.is("textarea")){return -1}}var c=0;var b=this.get(0);if(document.selection){this.focus();var a=document.selection.createRange();a.moveStart("character",-this.val().length);c=a.text.length}else{if(b.selectionStart||b.selectionStart=="0"){c=parseInt(b.selectionStart)}}return c},setCaret:function(b){if(this.is("input")){if(this.attr("type")!="text"&&this.attr("type")!="password"){return false}}else{if(!this.is("textarea")){return false}}var c=this.get(0);this.focus();if(document.selection){var a=document.selection.createRange();a.moveStart("character",b);a.moveEnd("character",0);a.select()}else{if(c.selectionStart||c.selectionStart=="0"){c.selectionStart=b;c.selectionEnd=b}}return true},wcfDropIn:function(b,c,a){if(!b){b="up"}if(!a||!parseInt(a)){a=200}return this.show(WCF.getEffect(this,"drop"),{direction:b},a,c)},wcfDropOut:function(b,c,a){if(!b){b="down"}if(!a||!parseInt(a)){a=200}return this.hide(WCF.getEffect(this,"drop"),{direction:b},a,c)},wcfBlindIn:function(b,c,a){if(!b){b="vertical"}if(!a||!parseInt(a)){a=200}return this.show(WCF.getEffect(this,"blind"),{direction:b},a,c)},wcfBlindOut:function(b,c,a){if(!b){b="vertical"}if(!a||!parseInt(a)){a=200}return this.hide(WCF.getEffect(this,"blind"),{direction:b},a,c)},wcfHighlight:function(a,b){return this.effect("highlight",a,600,b)},wcfFadeIn:function(b,a){if(!a||!parseInt(a)){a=200}return this.show(WCF.getEffect(this,"fade"),{},a,b)},wcfFadeOut:function(b,a){if(!a||!parseInt(a)){a=200}return this.hide(WCF.getEffect(this,"fade"),{},a,b)},cssAsNumber:function(b){if(this.length){var a=this.css(b);if(a!==undefined){return parseInt(a.replace(/px$/,""))}}return 0}});$.extend(WCF,{activeDialogs:0,_idCounter:0,getRandomID:function(){var a="";do{a="wcf"+this._idCounter++}while($.wcfIsset(a));return a},inArray:function(b,a){return($.inArray(b,a)!=-1)},getEffect:function(a,b){if(a.is("tr")){return"highlight"}return b},getInlineCSS:function(b){var c={};var a=b.attr("style");if(!a){return{}}a=a.split(";");for(var f=0,d=a.length;f').appendTo(document.body)}var a=this;$(".dropdownToggle:not(.jsDropdownEnabled)").each(function(b,c){a.initDropdown($(c),false)});if(!this._didInit){this._didInit=true;WCF.CloseOverlayHandler.addCallback("WCF.Dropdown",$.proxy(this._closeAll,this));WCF.DOMNodeInsertedHandler.addCallback("WCF.Dropdown",$.proxy(this.init,this));$(document).on("scroll",$.proxy(this._scroll,this))}},_dialogScroll:function(b){var a=$(b.currentTarget);a.find(".dropdown.dropdownOpen").each(function(d,f){var i=$(f);var e=i.wcfIdentify();var g=i.offset();var c=a.offset();var h=$(f).height()/2;if(g.top+h<=c.top){WCF.Dropdown.toggleDropdown(e)}else{if(g.top>=c.top+a.height()){WCF.Dropdown.toggleDropdown(e)}else{if(g.left<=c.left){WCF.Dropdown.toggleDropdown(e)}else{if(g.left>=c.left+a.width()){WCF.Dropdown.toggleDropdown(e)}else{WCF.Dropdown.setAlignmentByID(i.wcfIdentify())}}}}})},_scroll:function(b){for(var a in this._dropdowns){var c=this._dropdowns[a];if(c.data("isOverlayDropdownButton")&&c.hasClass("dropdownOpen")){this.setAlignmentByID(a)}}},initDropdown:function(b,d){if(b.hasClass("jsDropdownEnabled")||b.data("target")){return}var e=b.parents(".dropdown");if(!e.length){console.debug("[WCF.Dropdown] Invalid dropdown passed, button '"+b.wcfIdentify()+"' does not have a parent with .dropdown, aborting.");return}var a=b.next(".dropdownMenu");if(!a.length){console.debug("[WCF.Dropdown] Invalid dropdown passed, dropdown '"+e.wcfIdentify()+"' does not have a dropdown menu, aborting.");return}a.detach().appendTo(this._menuContainer);var c=e.wcfIdentify();if(!this._dropdowns[c]){b.addClass("jsDropdownEnabled").click($.proxy(this._toggle,this));this._dropdowns[c]=e;this._menus[c]=a;if(!c.match(/^wcf\d+$/)){a.attr("data-source",c)}}b.data("target",c);if(d){b.trigger("click")}},removeDropdown:function(a){if(this._menus[a]){$(this._menus[a]).remove();delete this._menus[a];delete this._dropdowns[a]}},initDropdownFragment:function(c,a){var b=c.wcfIdentify();if(this._dropdowns[b]){console.debug("[WCF.Dropdown] Cannot register dropdown identified by '"+b+"' as a fragement.");return}this._dropdowns[b]=c;this._menus[b]=a.detach().appendTo(this._menuContainer)},registerCallback:function(a,b){if(!$.isFunction(b)){console.debug("[WCF.Dropdown] Callback for '"+a+"' is invalid");return false}if(!this._callbacks[a]){this._callbacks[a]=[]}this._callbacks[a].push(b)},_toggle:function(g,e){var b=(g===null)?e:$(g.currentTarget).data("target");var a=this._dropdowns[b];if(a&&a.data("isOverlayDropdownButton")===undefined){var d=a.parents(".dialogContent");a.data("isOverlayDropdownButton",d.length>0);if(d.length){d.on("scroll",this._dialogScroll)}}for(var f in this._dropdowns){var h=this._dropdowns[f];var c=this._menus[f];if(h.hasClass("dropdownOpen")){h.removeClass("dropdownOpen");c.removeClass("dropdownOpen");this._notifyCallbacks(f,"close")}else{if(f===b&&c[0].children.length>0){h.addClass("dropdownOpen");c.addClass("dropdownOpen");this._notifyCallbacks(f,"open");this.setAlignment(h,c)}}}WCF.Dropdown.Interactive.Handler.closeAll();if(g!==null){g.stopPropagation();return false}},toggleDropdown:function(a){this._toggle(null,a)},getDropdown:function(a){if(this._dropdowns[a]){return this._dropdowns[a]}return null},getDropdownMenu:function(a){if(this._menus[a]){return this._menus[a]}return null},setAlignmentByID:function(a){var c=this.getDropdown(a);if(c===null){console.debug("[WCF.Dropdown] Unable to find dropdown identified by '"+a+"'")}var b=this.getDropdownMenu(a);if(b===null){console.debug("[WCF.Dropdown] Unable to find dropdown menu identified by '"+a+"'")}this.setAlignment(c,b)},setAlignment:function(t,u){if(!u.data("isInitialized")){u.data("isInitialized",true).css({left:0,top:0})}var p=t.getDimensions("outer");var g=t.getOffsets("offset");var s=u.getDimensions("outer");var i=$(window).width();var d=t.find(".dropdownToggle");if(d.hasClass("dropdownCaptionTextarea")){p=d.getDimensions("outer")}var f="left";if((g.left+s.width)>i){f="right"}var j="auto";var l="auto";if(f==="left"){u.removeClass("dropdownArrowRight");j=g.left}else{u.addClass("dropdownArrowRight");l=(i-(g.left+p.width))}if(WCF.Language.get("wcf.global.pageDirection")=="rtl"){var r=j;var n=l;if(j=="auto"){u.removeClass("dropdownArrowRight")}else{l=i-(g.left+p.width);j="auto";if(l+s.width>i){j=r;l=n;u.addClass("dropdownArrowRight")}}}if(j=="auto"){l+="px"}else{j+="px"}var q=true;if(u.hasClass("dropdownOpen")){q=false;u.removeClass("dropdownOpen")}var m="auto";var v=g.top+p.height+7;if($.browser.smartphone){var f="bottom";var c=false;var e=$(window).height();var h=v+s.height;if(h>e){var b=g.top+10-s.height;if(b>=0){f="top"}else{c=true;var a=Math.abs(b);var o=Math.abs(h-e);if(o<=a){f="bottom"}else{f="top"}}}if(f=="top"){m=$(window).height()-g.top+10;v="auto";if(c){v=0;u.children("ul.scrollableDropdownMenu").css("max-height",m)}u.addClass("dropdownArrowBottom")}else{if(c){m=0;var k=u.children("ul.scrollableDropdownMenu");k.css("max-height",Math.min(k.css("max-height").replace(/px$/,""),e-v))}u.removeClass("dropdownArrowBottom")}}else{if(v+s.height>$(window).height()+$(document).scrollTop()){m=$(window).height()-g.top+10;v="auto";u.addClass("dropdownArrowBottom")}else{u.removeClass("dropdownArrowBottom")}}if(!q){u.addClass("dropdownOpen")}u.css({bottom:m,left:j,right:l,top:v})},_closeAll:function(){for(var a in this._dropdowns){var b=this._dropdowns[a];if(b.hasClass("dropdownOpen")){b.removeClass("dropdownOpen");this._menus[a].removeClass("dropdownOpen");this._notifyCallbacks(a,"close")}}},close:function(a){if(!this._dropdowns[a]){return}this._dropdowns[a].removeClass("dropdownOpen");this._menus[a].removeClass("dropdownOpen")},_notifyCallbacks:function(a,b){if(!this._callbacks[a]){return}for(var d=0,c=this._callbacks[a].length;d').appendTo(document.body);WCF.CloseOverlayHandler.addCallback("WCF.Dropdown.Interactive.Handler",$.proxy(this.closeAll,this))}var c=new WCF.Dropdown.Interactive.Instance(this._dropdownContainer,d,b,a);this._dropdownMenus[b]=c;return c},open:function(a){if(this._dropdownMenus[a]){this._dropdownMenus[a].open();return true}return false},close:function(a){if(this._dropdownMenus[a]){this._dropdownMenus[a].close();return true}return false},closeAll:function(){$.each(this._dropdownMenus,function(b,a){a.close()})}};WCF.Dropdown.Interactive.Instance=Class.extend({_container:null,_itemList:null,_linkList:null,_options:{},_pointer:null,_triggerElement:null,init:function(e,d,c,b){this._options=b||{};this._triggerElement=d;var f=null;if(b.staticDropdown===true){this._container=this._triggerElement.find(".interactiveDropdownStatic:eq(0)").data("source",c).click(function(g){g.stopPropagation()})}else{this._container=$('
').click(function(g){g.stopPropagation()});var a=$('
').appendTo(this._container);$(''+b.title+"").appendTo(a);this._linkList=$('').appendTo(a);f=$('
').appendTo(this._container);this._itemList=$('
    ').appendTo(f);$(''+WCF.Language.get("wcf.user.panel.showAll")+"").appendTo(this._container)}this._pointer=$('').appendTo(this._container);if(!$.browser.mobile&&f!==null){f.perfectScrollbar({suppressScrollX:true})}this._container.appendTo(e)},getContainer:function(){return this._container},getItemList:function(){return this._itemList},getLinkList:function(){return this._linkList},open:function(){WCF.Dropdown._closeAll();this._container.addClass("open");this.render()},close:function(){this._container.removeClass("open")},toggle:function(){if(this._container.hasClass("open")){this.close();return false}else{WCF.Dropdown.Interactive.Handler.closeAll();this.open();return true}},resetItems:function(){this._itemList.empty();this.close()},render:function(){var a=WCF.Language.get("wcf.global.pageDirection");if($("html").css("caption-side")==="bottom"){this._renderMobile(a)}else{this._renderDesktop(a)}},rebuildScrollbar:function(){if(!$.browser.mobile){var a=this._itemList.parent();a.perfectScrollbar("destroy");a.perfectScrollbar({suppressScrollX:true})}},_renderMobile:function(b){var d=this._triggerElement.getDimensions("outer");var c=Math.floor(d.width/2);var e=this._triggerElement.getOffsets("offset");var a=Math.floor(this._pointer.outerWidth()/2);this._container.css({top:e.top+d.height+"px"});this._pointer.css({left:(e.left+c)-a+"px"})},_renderDesktop:function(b){var e=this._triggerElement.getDimensions("outer");var f=this._triggerElement.getOffsets("offset");var d=this._container.getDimensions();var g=$(window).width();var c=null;var a=null;if(b==="ltr"){c=this._getPositionLeft(f,d,g);if(!c.result){a=this._getPositionRight(f,d,e,g);if(a.result){c=null}else{a=null}}}else{a=this._getPositionRight(f,d,e,g);if(!a.result){c=this._getPositionLeft(f,d,g);if(c.result){a=null}else{c=null}}}if(a===null){this._container.css({left:c.left+"px",top:f.top+e.height+"px"});this._pointer.css({left:(this._options.pointerOffset?this._options.pointerOffset:"4px")})}else{this._container.css({right:a.right+"px",top:f.top+e.height+"px"});this._pointer.css({right:(this._options.pointerOffset?this._options.pointerOffset:"4px")})}},_getPositionLeft:function(d,e,b){var c=d.left;var a=d.left+e.width;return{left:c,result:(a0),right:a}}});WCF.Clipboard={_actionProxy:null,_actionObjects:{},_containers:null,_containerData:{},_hasMarkedItems:false,_markedObjectIDs:{},_page:"",_pageObjectID:0,_proxy:null,_trackedElements:{},init:function(d,b,e,c){this._page=d;this._actionObjects=e||{};this._hasMarkedItems=(b>0);this._pageObjectID=parseInt(c)||0;this._actionProxy=new WCF.Action.Proxy({success:$.proxy(this._actionSuccess,this),url:"index.php/ClipboardProxy/?t="+SECURITY_TOKEN+SID_ARG_2ND});this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),url:"index.php/Clipboard/?t="+SECURITY_TOKEN+SID_ARG_2ND});this._containers=$(".jsClipboardContainer").each($.proxy(function(g,f){this._initContainer(f)},this));if(this._hasMarkedItems&&this._containers.length){this._loadMarkedItems()}var a=this;WCF.DOMNodeInsertedHandler.addCallback("WCF.Clipboard",function(){a._containers=$(".jsClipboardContainer").each($.proxy(function(g,f){a._initContainer(f)},a))})},_loadMarkedItems:function(){new WCF.Action.Proxy({autoSend:true,data:{containerData:this._containerData,pageClassName:this._page,pageObjectID:this._pageObjectID},success:$.proxy(this._loadMarkedItemsSuccess,this),url:"index.php/ClipboardLoadMarkedItems/?t="+SECURITY_TOKEN+SID_ARG_2ND})},reload:function(){if(this._containers===null){return}this._loadMarkedItems()},_loadMarkedItemsSuccess:function(d,f,c){this._resetMarkings();for(var a in d.markedItems){if(!this._markedObjectIDs[a]){this._markedObjectIDs[a]=[]}var b=d.markedItems[a];for(var e in b){this._markedObjectIDs[a].push(b[e])}this._containers.each($.proxy(function(h,g){var i=$(g);if(i.data("type")!=a){return true}i.find("input.jsClipboardItem").each($.proxy(function(l,k){var j=$(k);if(WCF.inArray(j.data("objectID"),this._markedObjectIDs[a])){j.prop("checked",true);j.parents(".jsClipboardObject").addClass("jsMarked")}},this));i.find("input.jsClipboardMarkAll").each(function(l,k){var j=true;i.find("input.jsClipboardItem").each(function(n,o){var m=$(o);if(!m.prop("checked")){j=false}});if(j){$(k).prop("checked",true)}})},this))}this._success(d,f,c)},_resetMarkings:function(){this._containers.each($.proxy(function(b,a){var c=$(a);this._markedObjectIDs[c.data("type")]=[];c.find("input.jsClipboardItem, input.jsClipboardMarkAll").prop("checked",false);c.find(".jsClipboardObject").removeClass("jsMarked")},this))},_initContainer:function(a){var c=$(a);var b=c.wcfIdentify();if(!this._trackedElements[b]){c.find(".jsClipboardMarkAll").data("hasContainer",b).click($.proxy(this._markAll,this));this._markedObjectIDs[c.data("type")]=[];this._containerData[c.data("type")]={};$.each(c.data(),$.proxy(function(d,e){if(d.match(/^type(.+)/)){this._containerData[c.data("type")][WCF.String.lcfirst(d.replace(/^type/,""))]=e}},this));this._trackedElements[b]=[]}c.find("input.jsClipboardItem").each($.proxy(function(f,e){var g=$(e);var d=g.wcfIdentify();if(!WCF.inArray(d,this._trackedElements[b])){this._trackedElements[b].push(d);g.data("hasContainer",b).click($.proxy(this._click,this))}},this))},_click:function(f){var b=$(f.target);var e=b.data("objectID");var h=(b.prop("checked"))?true:false;var d=[e];if(b.data("hasContainer")){var g=$("#"+b.data("hasContainer"));var a=g.data("type")}else{var a=b.data("type")}if(h){this._markedObjectIDs[a].push(e);b.parents(".jsClipboardObject").addClass("jsMarked")}else{this._markedObjectIDs[a]=$.removeArrayValue(this._markedObjectIDs[a],e);b.parents(".jsClipboardObject").removeClass("jsMarked")}if(b.data("hasContainer")){var c=true;g.find("input.jsClipboardItem").each(function(j,i){var k=$(i);if(!k.prop("checked")){c=false}});g.find(".jsClipboardMarkAll").each(function(i,j){if(c){$(j).prop("checked",true)}else{$(j).prop("checked",false)}})}this._saveState(a,d,h)},_markAll:function(d){var b=$(d.target);var c=[];var f=true;if(b.is("input")){f=b.prop("checked")}if(b.data("hasContainer")){var e=$("#"+b.data("hasContainer"));var a=e.data("type")}else{var a=b.data("type")}if(b.data("hasContainer")){e.find("input.jsClipboardItem").each($.proxy(function(h,g){var j=$(g);var i=j.data("objectID");if(f){if(!j.prop("checked")){j.prop("checked",true);this._markedObjectIDs[a].push(i);c.push(i)}}else{if(j.prop("checked")){j.prop("checked",false);this._markedObjectIDs[a]=$.removeArrayValue(this._markedObjectIDs[a],i);c.push(i)}}},this));if(f){e.find(".jsClipboardObject").addClass("jsMarked")}else{e.find(".jsClipboardObject").removeClass("jsMarked")}}this._saveState(a,c,f)},_saveState:function(b,c,a){this._proxy.setOption("data",{action:(a)?"mark":"unmark",containerData:this._containerData,objectIDs:c,pageClassName:this._page,pageObjectID:this._pageObjectID,type:b});this._proxy.sendRequest()},_success:function(data,textStatus,jqXHR){var $containers={};$(".jsClipboardEditor").each(function(index,container){var $container=$(container);var $types=eval($container.data("types"));for(var $i=0,$length=$types.length;$i<$length;$i++){var $typeName=$types[$i];$containers[$typeName]=$container}var $containerID=$container.wcfIdentify();WCF.CloseOverlayHandler.removeCallback($containerID);$container.empty()});if(!data.items){return}for(var $typeName in data.items){if(!$containers[$typeName]){continue}var $container=$containers[$typeName];var $list=$container.children("ul");if($list.length==0){$list=$("
      ").appendTo($container)}var $editor=data.items[$typeName];var $label=$('").appendTo($list);var $itemList=$('').appendTo($label);for(var $itemIndex in $editor.items){var $item=$editor.items[$itemIndex];var $listItem=$("
    • "+$item.label+"
    • ").appendTo($itemList);$listItem.data("container",$container);$listItem.data("objectType",$typeName);$listItem.data("actionName",$item.actionName).data("parameters",$item.parameters);$listItem.data("internalData",$item.internalData).data("url",$item.url).data("type",$typeName);$listItem.click($.proxy(this._executeAction,this))}$('
    • "+WCF.Language.get("wcf.clipboard.item.unmarkAll")+"
    • ").data("typeName",$typeName).appendTo($itemList).click($.proxy(function(event){var $typeName=$(event.currentTarget).data("typeName");this._proxy.setOption("data",{action:"unmarkAll",type:$typeName});this._proxy.setOption("success",$.proxy(function(data,textStatus,jqXHR){this._containers.each($.proxy(function(index,container){var $container=$(container);if($container.data("type")==$typeName){$container.find(".jsClipboardMarkAll, .jsClipboardItem").prop("checked",false);$container.find(".jsClipboardObject").removeClass("jsMarked");return false}},this));this._success(data,textStatus,jqXHR);this._proxy.setOption("success",$.proxy(this._success,this));this._loadMarkedItems()},this));this._proxy.sendRequest()},this));WCF.Dropdown.initDropdown($label.children(".dropdownToggle"),false)}},_closeLists:function(){$(".jsClipboardEditor ul").removeClass("dropdownOpen")},_executeAction:function(f){var d=$(f.currentTarget);var e=d.data("url");if(e){window.location.href=e}var a=true;if(d.data("parameters").className&&d.data("parameters").actionName){if(d.data("parameters").actionName==="unmarkAll"||d.data("parameters").objectIDs){var c=d.data("internalData")["confirmMessage"];if(c){var b=d.data("internalData")["template"];if(b){b=$(b)}WCF.System.Confirmation.show(c,$.proxy(function(h){if(h==="confirm"){var g={};if(b&&b.length){$("#wcfSystemConfirmationContent").find("input, select, textarea").each(function(j,k){var i=$(k);g[i.prop("name")]=i.val()})}this._executeAJAXActions(d,g)}},this),"",b)}else{this._executeAJAXActions(d,{})}}}else{var c=d.data("internalData")["confirmMessage"];if(c){a=false;WCF.System.Confirmation.show(c,function(g){if(g==="confirm"){d.data("container").trigger("clipboardAction",[d.data("type"),d.data("actionName"),d.data("parameters")])}})}}if(a){d.data("container").trigger("clipboardAction",[d.data("type"),d.data("actionName"),d.data("parameters")])}},_executeAJAXActions:function(d,e){e=e||{};var a=[];if(d.data("parameters").actionName!=="unmarkAll"){$.each(d.data("parameters").objectIDs,function(g,h){a.push(parseInt(h))})}var b={data:e,containerData:this._containerData[d.data("type")]};var f=d.data("internalData")["parameters"];if(f!==undefined){for(var c in f){b[c]=f[c]}}new WCF.Action.Proxy({autoSend:true,data:{actionName:d.data("parameters").actionName,className:d.data("parameters").className,objectIDs:a,parameters:b},success:$.proxy(function(g){if(d.data("parameters").actionName!=="unmarkAll"){d.data("container").trigger("clipboardActionResponse",[g,d.data("type"),d.data("actionName"),d.data("parameters")])}this._loadMarkedItems()},this)});if(this._actionObjects[d.data("objectType")]&&this._actionObjects[d.data("objectType")][d.data("parameters").actionName]){this._actionObjects[d.data("objectType")][d.data("parameters").actionName].triggerEffect(a)}},sendRequest:function(b){var a=$(b);this._actionProxy.setOption("data",{parameters:a.data("parameters"),typeName:a.data("type")});this._actionProxy.sendRequest()}};WCF.PeriodicalExecuter=Class.extend({_callback:null,_delay:0,_intervalID:null,_isExecuting:false,init:function(b,a){if(!$.isFunction(b)){console.debug("[WCF.PeriodicalExecuter] Given callback is invalid, aborting.");return}this._callback=b;this._interval=a;this.resume()},_execute:function(){if(!this._isExecuting){try{this._isExecuting=true;this._callback(this);this._isExecuting=false}catch(a){this._isExecuting=false;throw a}}},stop:function(){if(!this._intervalID){return}clearInterval(this._intervalID)},resume:function(){if(this._intervalID){this.stop()}this._intervalID=setInterval($.proxy(this._execute,this),this._interval)}});WCF.LoadingOverlayHandler={_activeRequests:0,_loadingOverlay:null,_pending:null,show:function(){if(this._loadingOverlay===null){this._loadingOverlay=$('
      '+WCF.Language.get("wcf.global.loading")+"
      ").appendTo($("body"));var b=this._loadingOverlay.outerWidth();if(b<70){b=70}this._loadingOverlay.css({marginLeft:Math.ceil(-1*b/2),width:b}).hide()}this._activeRequests++;if(this._activeRequests==1){if(this._pending===null){var a=this;this._pending=new WCF.PeriodicalExecuter(function(c){if(a._activeRequests){a._loadingOverlay.stop(true,true).fadeIn(100)}c.stop();a._pending=null},250)}}},hide:function(){this._activeRequests--;if(this._activeRequests==0){if(this._pending!==null){this._pending.stop();this._pending=null}this._loadingOverlay.stop(true,true).fadeOut(100)}},updateIcon:function(b,c){var a=(c===undefined||c?"addClass":"removeClass");b.find(".icon")[a]("icon-spinner");if(b.hasClass("icon")){b[a]("icon-spinner")}}};WCF.Action={};WCF.Action.Proxy=Class.extend({_showLoadingOverlayOnce:false,_suppressErrors:false,_lastRequest:null,init:function(b){this.options=$.extend(true,{autoSend:false,data:{},dataType:"json",after:null,init:null,jsonp:"callback",async:true,failure:null,showLoadingOverlay:true,success:null,suppressErrors:false,type:"POST",url:"index.php/AJAXProxy/?t="+SECURITY_TOKEN+SID_ARG_2ND,aborted:null,autoAbortPrevious:false},b);if(!URL_LEGACY_MODE){this.options.url=this.options.url.replace(/^index\.php\/(.*?)\/\?/,"?$1/&")}this.confirmationDialog=null;this.loading=null;this._showLoadingOverlayOnce=false;this._suppressErrors=(this.options.suppressErrors===true);if(this.options.autoSend){this.sendRequest()}var a=this;$(window).on("beforeunload",function(){a._suppressErrors=true})},sendRequest:function(a){this._init();if(a||this.options.autoAbortPrevious){this.abortPrevious()}this._lastRequest=$.ajax({data:this.options.data,dataType:this.options.dataType,jsonp:this.options.jsonp,async:this.options.async,type:this.options.type,url:this.options.url,success:$.proxy(this._success,this),error:$.proxy(this._failure,this)});return this._lastRequest},abortPrevious:function(){if(this._lastRequest!==null){this._lastRequest.abort();this._lastRequest=null;if(this.options.showLoadingOverlay||this._showLoadingOverlayOnce){WCF.LoadingOverlayHandler.hide()}}},showLoadingOverlayOnce:function(){this._showLoadingOverlayOnce=true},suppressErrors:function(){this._suppressErrors=true},_init:function(){if($.isFunction(this.options.init)){this.options.init(this)}if(this.options.showLoadingOverlay||this._showLoadingOverlayOnce){WCF.LoadingOverlayHandler.show()}},_failure:function(d,i,h){if(i=="abort"){if($.isFunction(this.options.aborted)){this.options.aborted(d)}return}try{var c=$.parseJSON(d.responseText);var f=true;if($.isFunction(this.options.failure)){f=this.options.failure(c,d,i,h)}if(!this._suppressErrors&&f!==false){var a="";if(c.stacktrace){a="

      Stacktrace:

      "+c.stacktrace+"

      "}else{if(c.exceptionID){a="

      Exception ID: "+c.exceptionID+"

      "}}$('

      '+c.message+"

      "+a+"
      ").wcfDialog({title:WCF.Language.get("wcf.global.error.title")})}}catch(g){var f=true;if($.isFunction(this.options.failure)){f=this.options.failure(null,d,i,h)}if(!this._suppressErrors&&f!==false){var b=(i==="timeout")?WCF.Language.get("wcf.global.error.timeout"):d.responseText;if(b&&b!="undefined"){$('

      '+b+"

      ").wcfDialog({title:WCF.Language.get("wcf.global.error.title")})}}}this._after()},_success:function(b,c,a){if($.isFunction(this.options.success)){if(b&&b.returnValues&&b.returnValues.template!==undefined){b.returnValues.template=$.trim(b.returnValues.template)}this.options.success(b,c,a)}this._after()},_after:function(){this._lastRequest=null;if($.isFunction(this.options.after)){this.options.after()}if(this.options.showLoadingOverlay||this._showLoadingOverlayOnce){WCF.LoadingOverlayHandler.hide();if(this._showLoadingOverlayOnce){this._showLoadingOverlayOnce=false}}WCF.DOMNodeInsertedHandler.execute();$("a[href*=#]").each(function(c,e){var b=$(e);if(b.prop("href").indexOf("AJAXProxy")!=-1){var d=b.prop("href").substr(b.prop("href").indexOf("#"));var a=document.location.toString().replace(/#.*/,"");b.prop("href",a+d)}})},setOption:function(a,b){this.options[a]=b}});WCF.Action.SimpleProxy=Class.extend({init:function(a,b){this.options=$.extend(true,{action:"",className:"",elements:null,eventName:"click"},a);this.callbacks=$.extend(true,{after:null,failure:null,init:null,success:null},b);if(!this.options.elements){return}this.proxy=new WCF.Action.Proxy(this.callbacks);this.options.elements.each($.proxy(function(c,d){$(d).bind(this.options.eventName,$.proxy(this._handleEvent,this))},this))},_handleEvent:function(a){this.proxy.setOption("data",{actionName:this.options.action,className:this.options.className,objectIDs:[$(a.target).data("objectID")]});this.proxy.sendRequest()}});WCF.Action.Delete=Class.extend({_buttonSelector:"",_className:"",_containerSelector:"",_containers:[],init:function(c,a,b){this._containerSelector=a;this._className=c;this._buttonSelector=(b)?b:".jsDeleteButton";this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)});this._initElements();WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Delete"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each((function(b,a){var d=$(a);var c=d.wcfIdentify();if(!WCF.inArray(c,this._containers)){var e=d.find(this._buttonSelector);if(e.length){this._containers.push(c);e.click($.proxy(this._click,this))}}}).bind(this))},_click:function(b){var a=$(b.currentTarget);b.preventDefault();if(a.data("confirmMessage")){WCF.System.Confirmation.show(a.data("confirmMessage"),$.proxy(this._execute,this),{target:a})}else{WCF.LoadingOverlayHandler.updateIcon(a);this._sendRequest(a)}},_didTriggerEffect:function(a){},_execute:function(b,a){if(b==="cancel"){return}WCF.LoadingOverlayHandler.updateIcon(a.target);this._sendRequest(a.target)},_sendRequest:function(a){this.proxy.setOption("data",{actionName:"delete",className:this._className,interfaceName:"wcf\\data\\IDeleteAction",objectIDs:[$(a).data("objectID")]});this.proxy.sendRequest()},_success:function(b,c,a){this.triggerEffect(b.objectIDs)},triggerEffect:function(d){for(var a in this._containers){var e=$("#"+this._containers[a]);var c=e.find(this._buttonSelector);if(WCF.inArray(c.data("objectID"),d)){var b=this;e.wcfBlindOut("up",function(){var f=$(this).remove();b._containers.splice(b._containers.indexOf(f.wcfIdentify()),1);b._didTriggerEffect(f);if(c.data("eventName")){WCF.System.Event.fireEvent("com.woltlab.wcf.action.delete",c.data("eventName"),{button:c,container:f})}})}}}});WCF.Action.NestedDelete=WCF.Action.Delete.extend({triggerEffect:function(c){for(var a in this._containers){var d=$("#"+this._containers[a]);if(WCF.inArray(d.find(this._buttonSelector).data("objectID"),c)){if(d.has("ol").has("li").length){if(d.is(":only-child")){d.parent().replaceWith(d.find("> ol"))}else{d.replaceWith(d.find("> ol > li"))}this._containers.splice(this._containers.indexOf(d.wcfIdentify()),1);this._didTriggerEffect(d)}else{var b=this;d.wcfBlindOut("up",function(){$(this).remove();b._containers.splice(b._containers.indexOf($(this).wcfIdentify()),1);b._didTriggerEffect($(this))})}}}}});WCF.Action.Toggle=Class.extend({_buttonSelector:".jsToggleButton",_className:"",_containerSelector:"",_containers:[],init:function(d,a,c){this._containerSelector=a;this._className=d;this._buttonSelector=(c)?c:".jsToggleButton";this._containers=[];var b={success:$.proxy(this._success,this)};this.proxy=new WCF.Action.Proxy(b);this._initElements();WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Toggle"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each($.proxy(function(b,a){var d=$(a);var c=d.wcfIdentify();if(!WCF.inArray(c,this._containers)){this._containers.push(c);d.find(this._buttonSelector).click($.proxy(this._click,this))}},this))},_click:function(b){var a=$(b.currentTarget);b.preventDefault();if(a.data("confirmMessage")){WCF.System.Confirmation.show(a.data("confirmMessage"),$.proxy(this._execute,this),{target:a})}else{WCF.LoadingOverlayHandler.updateIcon(a);this._sendRequest(a)}},_execute:function(b,a){if(b==="cancel"){return}WCF.LoadingOverlayHandler.updateIcon(a.target);this._sendRequest(a.target)},_sendRequest:function(a){this.proxy.setOption("data",{actionName:"toggle",className:this._className,interfaceName:"wcf\\data\\IToggleAction",objectIDs:[$(a).data("objectID")]});this.proxy.sendRequest()},_success:function(b,c,a){this.triggerEffect(b.objectIDs)},triggerEffect:function(b){for(var a in this._containers){var d=$("#"+this._containers[a]);var c=d.find(this._buttonSelector);if(WCF.inArray(c.data("objectID"),b)){d.wcfHighlight();this._toggleButton(d,c)}}},_toggleButton:function(c,b){var a="";WCF.LoadingOverlayHandler.updateIcon(b,false);if(b.hasClass("icon-check-empty")){b.removeClass("icon-check-empty").addClass("icon-check");a=(b.data("disableTitle")?b.data("disableTitle"):WCF.Language.get("wcf.global.button.disable"));b.attr("title",a)}else{b.removeClass("icon-check").addClass("icon-check-empty");a=(b.data("enableTitle")?b.data("enableTitle"):WCF.Language.get("wcf.global.button.enable"));b.attr("title",a)}c.toggleClass("disabled")}});WCF.Action.Scroll=Class.extend({_callback:null,_reference:null,_target:null,_threshold:0,init:function(b,d,a,c){this._threshold=parseInt(b);if(this._threshold===0){console.debug("[WCF.Action.Scroll] Given threshold is invalid, aborting.");return}if($.isFunction(d)){this._callback=d}if(this._callback===null){console.debug("[WCF.Action.Scroll] Given callback is invalid, aborting.");return}this._reference=$((a)?a:window);this._target=$((c)?c:document);this.start();this._scroll()},_scroll:function(){var a=this._target.height();var b=this._reference.scrollTop();var c=this._reference.height();if((a-(c+b))');var f=i.attr("max")?new Date(i.attr("max").replace(" ","T")):null;var n=i.attr("min")?new Date(i.attr("min").replace(" ","T")):null;var c={altField:"#"+i.wcfIdentify()+"DatePicker",altFormat:"yy-mm-dd",beforeShow:function(q,p){setTimeout(function(){p.dpDiv.position({my:"left top",at:"left bottom",collision:"none",of:q})},1)},changeMonth:true,changeYear:true,dateFormat:this._dateFormat,dayNames:WCF.Language.get("__days"),dayNamesMin:WCF.Language.get("__daysShort"),dayNamesShort:WCF.Language.get("__daysShort"),firstDay:parseInt(WCF.Language.get("wcf.date.firstDayOfTheWeek"))||0,isRTL:WCF.Language.get("wcf.global.pageDirection")=="rtl",maxDate:f,minDate:n,monthNames:WCF.Language.get("__months"),monthNamesShort:WCF.Language.get("__monthsShort"),showButtonPanel:false,onClose:function(q,p){if(q==""){$(p.settings.altField).val(q)}},showOtherMonths:true,yearRange:(i.hasClass("birthday")?"-100:+0":"1900:2038")};if(b){if(/[0-9]{2}:[0-9]{2}:[0-9]{2}$/.test(m)){m=m.replace(/:[0-9]{2}$/,"");i.val(m)}m=m.replace(" ","T");if(i.data("timeOnly")){var e=m.split(":");var a=new Date();a.setHours(e[0]);a.setMinutes(e[1]);a.setSeconds(0);m=a.toString()}if(i.data("ignoreTimezone")){var l=new Date(m).getTimezoneOffset();var o=(l>0)?"-":"+";l=Math.abs(l);var h=(Math.floor(l/60)).toString();var k=(l%60).toString();o+=(h.length==2)?h:"0"+h;o+=":";o+=(k.length==2)?k:"0"+k;m=m.replace(/[+-][0-9]{2}:[0-9]{2}$/,o)}c=$.extend(c,{altFieldTimeOnly:false,altTimeFormat:"HH:mm",controlType:"select",hourText:WCF.Language.get("wcf.date.hour"),minuteText:WCF.Language.get("wcf.date.minute"),showTime:false,timeFormat:this._timeFormat,timeOnly:i.data("timeOnly")?true:false,yearRange:(i.hasClass("birthday")?"-100:+0":"1900:2038")})}if(b){i.datetimepicker(c)}else{i.datepicker(c)}if(m){m=new Date(m);if(!b){m.setMinutes(m.getMinutes()+m.getTimezoneOffset())}i.datepicker("setDate",m)}i.datepicker("widget").hide();if(i.data("timeOnly")){i.datepicker("widget").addClass("timeOnlyPicker")}},this))}};WCF.Date.Util={gmdate:function(a){var b=(a)?a:new Date();return Math.round(Date.UTC(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDay(),b.getUTCHours(),b.getUTCMinutes(),b.getUTCSeconds())/1000)},getTimezoneDate:function(b,c){var d=new Date(b);var a=d.getTimezoneOffset()*60000;return new Date((b+a+c))}};WCF.Date.Time=Class.extend({_date:0,_elements:null,_offset:null,_timestamp:0,init:function(){this._elements=$("time.datetime");this._offset=null;this._timestamp=0;this._refresh();new WCF.PeriodicalExecuter($.proxy(this._refresh,this),60000);WCF.DOMNodeInsertedHandler.addCallback("WCF.Date.Time",$.proxy(this._domNodeInserted,this))},_domNodeInserted:function(){this._elements=$("time.datetime");this._refresh()},_refresh:function(){this._date=new Date();this._timestamp=(this._date.getTime()-this._date.getMilliseconds())/1000;if(this._offset===null){this._offset=this._timestamp-TIME_NOW}this._elements.each($.proxy(this._refreshElement,this))},_refreshElement:function(i,f){var n=$(f);if(!n.attr("title")){n.attr("title",n.text())}var d=n.data("timestamp")+this._offset;var b=n.data("date");var c=n.data("time");var o=n.data("offset");if(n.data("isFutureDate")){return}if(d>=this._timestamp||this._timestamp<(d+60)){n.text(WCF.Language.get("wcf.date.relative.now"))}else{if(this._timestamp<(d+3540)){var m=Math.max(Math.round((this._timestamp-d)/60),1);n.text(WCF.Language.get("wcf.date.relative.minutes",{minutes:m}))}else{if(this._timestamp<(d+86400)){var k=Math.round((this._timestamp-d)/3600);n.text(WCF.Language.get("wcf.date.relative.hours",{hours:k}))}else{if(this._timestamp<(d+518400)){var j=new Date(this._date.getFullYear(),this._date.getMonth(),this._date.getDate());var l=Math.ceil((j/1000-d)/86400);var g=WCF.Date.Util.getTimezoneDate((d*1000),o*1000);var h=g.getDay();var e=WCF.Language.get("__days")[h];n.text(WCF.Language.get("wcf.date.relative.pastDays",{days:l,day:e,time:c}))}else{var a=WCF.Language.get("wcf.date.shortDateTimeFormat");n.text(a.replace(/\%date\%/,b).replace(/\%time\%/,c))}}}}}});WCF.Dictionary=Class.extend({_variables:{},init:function(){this._variables={}},add:function(a,b){this._variables[a]=b},addObject:function(a){for(var b in a){this.add(b,a[b])}},addDictionary:function(a){a.each($.proxy(function(b){this.add(b.key,b.value)},this))},get:function(a){if(this.isset(a)){return this._variables[a]}return null},isset:function(a){return this._variables.hasOwnProperty(a)},remove:function(a){delete this._variables[a]},each:function(d){if(!$.isFunction(d)){return}for(var c in this._variables){var a=this._variables[c];var b={key:c,value:a};d(b)}},count:function(){return $.getLength(this._variables)},isEmpty:function(){return !this.count()}});WCF.Language={_variables:new WCF.Dictionary(),add:function(a,b){this._variables.add(a,b)},addObject:function(a){this._variables.addObject(a)},get:function(a,b){if(b==null){var b={}}var c=this._variables.get(a);if(c===null){return a}else{if(typeof c==="string"){this.add(a,new WCF.Template(c));return this.get(a,b)}else{if(typeof c.fetch==="function"){c=c.fetch(b)}}}return c}};WCF.MultipleLanguageInput=Class.extend({_availableLanguages:{},_button:null,_didInit:false,_element:null,_insertedDataAfterInit:false,_isEnabled:false,_forceSelection:false,_languageID:0,_list:null,_values:null,init:function(c,b,d,f){this._button=null;this._element=$("#"+$.wcfEscapeID(c));this._forceSelection=b;this._values=d;this._availableLanguages=f;if($.getLength(this._values)){for(var e in this._values){this._values[e]=WCF.String.unescapeHTML(this._values[e])}}this._languageID=LANGUAGE_ID;if(this._element.length==0){console.debug("[WCF.MultipleLanguageInput] element id '"+c+"' is unknown");return}var a=($.getLength(this._values)>0)?true:false;this._insertedDataAfterInit=a;this._prepareElement(a);this._element.parents("form").submit($.proxy(this._submit,this));this._didInit=true},_prepareElement:function(a){this._element.wrap('