Updating minified JavaScript files
authorwoltlab.com <woltlab@woltlab.com>
Fri, 16 Jan 2015 00:31:48 +0000 (01:31 +0100)
committerwoltlab.com <woltlab@woltlab.com>
Fri, 16 Jan 2015 00:31:48 +0000 (01:31 +0100)
wcfsetup/install/files/js/WCF.Combined.min.js

index 4c396c7c6f241f5a37453a565e95fee830ce1484..a16351c62b15bb846191ce688bb5d4adb42ceea2 100755 (executable)
@@ -112,7 +112,7 @@ window.matchMedia||(window.matchMedia=function(){var c=window.styleMedia||window
 (function (window, undefined) {"use strict";WCF.Poll={};WCF.Poll.Management=Class.extend({_container:null,_count:0,_inputSize:0,_maxOptions:0,init:function(a,c,d){this._count=0;this._maxOptions=d||-1;this._container=$("#"+a).children("ol:eq(0)");if(!this._container.length){console.debug("[WCF.Poll.Management] Invalid container id given, aborting.");return}c=c||[];this._createOptionList(c);$(window).resize($.proxy(this._resize,this));this._container.parents("form").submit($.proxy(this._submit,this));new WCF.Sortable.List(a,"",undefined,undefined,true);this._resize();var b=this;this._container.closest(".messageTabMenu").on("messagetabmenushow",function(e,f){if(f.activeTab.name=="poll"){b._resize()}})},_createOptionList:function(b){for(var d=0,c=b.length;d<c;d++){var a=b[d];this._createOption(a.optionValue,a.optionID)}this._createOption()},_createOption:function(f,d,c){f=f||"";d=parseInt(d)||0;c=c||null;var b=$('<li class="sortableNode" />').data("optionID",d);if(c===null){b.appendTo(this._container)}else{b.insertAfter(c)}var a=$('<span class="sortableButtonContainer" />').appendTo(b);$('<span class="icon icon16 icon-plus jsTooltip jsAddOption pointer" title="'+WCF.Language.get("wcf.poll.button.addOption")+'" />').click($.proxy(this._addOption,this)).appendTo(a);$('<span class="icon icon16 icon-remove jsTooltip jsDeleteOption pointer" title="'+WCF.Language.get("wcf.poll.button.removeOption")+'" />').click($.proxy(this._removeOption,this)).appendTo(a);var e=$('<input type="text" value="'+f+'" maxlength="255" />').css({width:this._inputSize+"px"}).keydown($.proxy(this._keyDown,this)).appendTo(b);if(c!==null){e.focus()}WCF.DOMNodeInsertedHandler.execute();this._count++;if(this._count===this._maxOptions){this._container.find("span.jsAddOption").removeClass("pointer").addClass("disabled")}},_keyDown:function(a){if(a.which!==13){return true}$(a.currentTarget).prev(".sortableButtonContainer").children(".jsAddOption").trigger("click");a.preventDefault();a.stopPropagation();return false},_addOption:function(b){if(this._count===this._maxOptions){return false}var a=$(b.currentTarget).parents("li");this._createOption(undefined,undefined,a)},_removeOption:function(a){$(a.currentTarget).parents("li").remove();this._count--;this._container.find("span.jsAddOption").addClass("pointer").removeClass("disabled");if(this._container.children("li").length==0){this._createOption()}},_resize:function(){var d=this._container.innerWidth();var c=this._container.children("li:eq(0)");var b=c.children(".sortableButtonContainer").outerWidth();var a=d-b;if(a!=this._inputSize){this._inputSize=a;this._container.find("li > input").css({width:this._inputSize+"px"})}},_submit:function(){var a=[];this._container.children("li").each(function(f,i){var h=$(i);var g=$.trim(h.children("input").val());if(g!=""){a.push({optionID:h.data("optionID"),optionValue:g})}});if(a.length){var b=this._container.parents("form").find(".formSubmit");for(var e=0,d=a.length;e<d;e++){var c=a[e];$('<input type="hidden" name="pollOptions['+e+']" />').val(c.optionID+"_"+c.optionValue).appendTo(b)}}}});WCF.Poll.Manager=Class.extend({_cache:{},_canViewParticipants:{},_canViewResult:{},_canVote:{},_inputElements:{},_participants:{},_polls:{},_proxy:null,init:function(a){var c=$(a);if(!c.length){console.debug("[WCF.Poll.Manager] Given selector '"+a+"' does not match, aborting.");return}this._cache={};this._canViewParticipants={};this._canViewResult={};this._inputElements={};this._participants={};this._polls={};this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),url:"index.php/Poll/?t="+SECURITY_TOKEN+SID_ARG_2ND});var b=this;c.each(function(e,g){var f=$(g);var d=f.data("pollID");if(b._polls[d]===undefined){b._cache[d]={result:"",vote:""};b._polls[d]=f;b._canViewParticipants[d]=(f.data("canViewParticipants"))?true:false;b._canViewResult[d]=(f.data("canViewResult"))?true:false;b._canVote[d]=(f.data("canVote"))?true:false;b._bindListeners(d);if(f.data("inVote")){b._prepareVote(d)}b._toggleButtons(d)}})},_bindListeners:function(a){this._polls[a].find(".jsButtonPollShowParticipants").data("pollID",a).click($.proxy(this._showParticipants,this));this._polls[a].find(".jsButtonPollShowResult").data("pollID",a).click($.proxy(this._showResult,this));this._polls[a].find(".jsButtonPollShowVote").data("pollID",a).click($.proxy(this._showVote,this));this._polls[a].find(".jsButtonPollVote").data("pollID",a).click($.proxy(this._vote,this))},_showResult:function(b,c){var a=(b===null)?c:$(b.currentTarget).data("pollID");if(!this._canViewResult[a]){return}if(!this._polls[a].data("inVote")){return}if(!this._cache[a].result){this._proxy.setOption("data",{actionName:"getResult",pollID:a});this._proxy.sendRequest()}else{this._polls[a].find(".pollInnerContainer").html(this._cache[a].result);this._polls[a].data("inVote",false);this._toggleButtons(a)}},_showParticipants:function(b){var a=$(b.currentTarget).data("pollID");if(!this._participants[a]){this._participants[a]=new WCF.User.List("wcf\\data\\poll\\PollAction",this._polls[a].data("question"),{pollID:a})}this._participants[a].open()},_showVote:function(b,c){var a=(b===null)?c:$(b.currentTarget).data("pollID");if(!this._canVote[a]){return}if(this._polls[a].data("inVote")){return}if(!this._cache[a].vote){this._proxy.setOption("data",{actionName:"getVote",pollID:a});this._proxy.sendRequest()}else{this._polls[a].find(".pollInnerContainer").html(this._cache[a].vote);this._polls[a].data("inVote",true);this._prepareVote(a);this._toggleButtons(a)}},_success:function(c,d,b){if(!c||!c.actionName){return}var a=c.pollID;if(c.resultTemplate){this._cache[a].result=c.resultTemplate}if(c.voteTemplate){this._cache[a].vote=c.voteTemplate}switch(c.actionName){case"getResult":this._showResult(null,a);break;case"getVote":this._showVote(null,a);break;case"vote":this._canViewResult[a]=true;this._canVote[a]=(c.canVote)?true:false;this._showResult(null,a);break}},_prepareVote:function(c){this._polls[c].find(".jsButtonPollVote").disable();var d=this._polls[c].find(".pollInnerContainer > .jsPollVote");var a=this;this._inputElements[c]=d.find("input").change(function(){a._handleVoteButton(c)});this._handleVoteButton(c);var b=d.data("maxVotes");if(this._inputElements[c].filter("[type=checkbox]").length){this._inputElements[c].change(function(){a._enforceMaxVotes(c,b)});this._enforceMaxVotes(c,b)}},_enforceMaxVotes:function(c,b){var a=this._inputElements[c];if(a.filter(":checked").length==b){a.filter(":not(:checked)").disable()}else{a.enable()}},_handleVoteButton:function(b){var a=this._inputElements[b];var c=this._polls[b].find(".jsButtonPollVote");if(a.filter(":checked").length){c.enable()}else{c.disable()}},_toggleButtons:function(c){var a=this._polls[c].children(".formSubmit");a.find(".jsButtonPollShowParticipants, .jsButtonPollShowResult, .jsButtonPollShowVote, .jsButtonPollVote").hide();var b=true;if(this._polls[c].data("inVote")){b=false;a.find(".jsButtonPollVote").show();if(this._canViewResult[c]){a.find(".jsButtonPollShowResult").show()}}else{if(this._canVote[c]){b=false;a.find(".jsButtonPollShowVote").show()}if(this._canViewParticipants[c]){b=false;a.find(".jsButtonPollShowParticipants").show()}}if(b){a.hide()}},_vote:function(c){var a=$(c.currentTarget).data("pollID");if(!this._canVote[a]){return}var b=[];this._inputElements[a].each(function(e,d){var f=$(d);if(f.is(":checked")){b.push(f.data("optionID"))}});if(b.length){this._proxy.setOption("data",{actionName:"vote",optionIDs:b,pollID:a});this._proxy.sendRequest()}}}); })(this);
 
 // WCF.Search.Message.js
-(function (window, undefined) {"use strict";WCF.Search.Message={};WCF.Search.Message.KeywordList=WCF.Search.Base.extend({_className:"wcf\\data\\search\\keyword\\SearchKeywordAction",_divider:null,_forceSubmit:false,init:function(c,e,b){if(!$.isFunction(e)){console.debug("[WCF.Search.Message.KeywordList] The given callback is invalid, aborting.");return}this._callback=e;this._excludedSearchValues=[];if(b){this._excludedSearchValues=b}this._searchInput=$(c).keyup($.proxy(this._keyUp,this)).keydown($.proxy(function(f){if(f.which===13){if(this._itemCount&&this._itemIndex!==-1){f.preventDefault()}}},this));var a=WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify());var d=a.find("li.dropdownDivider").last();this._divider=$('<li class="dropdownDivider" />').hide().insertBefore(d);this._list=$('<li class="dropdownList"><ul /></li>').hide().insertBefore(d).children("ul");a.find("input, label").on("click",function(f){f.stopPropagation()});this._proxy=new WCF.Action.Proxy({showLoadingOverlay:false,success:$.proxy(this._success,this)})},_createListItem:function(a){this._divider.show();this._list.parent().show();this._super(a)},_clearList:function(a){if(a){this._searchInput.val("")}this._divider.hide();this._list.empty().parent().hide();WCF.CloseOverlayHandler.removeCallback("WCF.Search.Base");this._itemCount=0;this._itemIndex=-1}});WCF.Search.Message.SearchArea=Class.extend({_searchArea:null,init:function(d){this._searchArea=d;var a=new WCF.Search.Message.KeywordList(this._searchArea.find("input[type=search]"),$.proxy(this._callback,this));a.setDelay(500);var c=this;var f=this._searchArea.find("input[type=search]");this._searchArea.click(function(g){if(g.target==c._searchArea[0]){f.focus().trigger("click");return false}});if(this._searchArea.hasClass("dropdown")){var e=this._searchArea.wcfIdentify();var b=this._searchArea.find("form");b.submit(function(){var g=WCF.Dropdown.getDropdownMenu(e);g.find("input[type=hidden]").appendTo(b);g.find("input[type=checkbox]:checked").each(function(i,h){var j=$(h);$('<input type="hidden" name="'+j.attr("name")+'" value="'+j.attr("value")+'" />').appendTo(b)})})}},_callback:function(a){this._searchArea.find("input[type=search]").val(a.label);this._searchArea.find("input[type=search]").focus();return false}}); })(this);
+(function (window, undefined) {"use strict";WCF.Search.Message={};WCF.Search.Message.KeywordList=WCF.Search.Base.extend({_className:"wcf\\data\\search\\keyword\\SearchKeywordAction",_divider:null,_forceSubmit:false,init:function(c,e,b){if(!$.isFunction(e)){console.debug("[WCF.Search.Message.KeywordList] The given callback is invalid, aborting.");return}this._callback=e;this._excludedSearchValues=[];if(b){this._excludedSearchValues=b}this._searchInput=$(c).keyup($.proxy(this._keyUp,this)).keydown($.proxy(function(f){if(f.which===13){if(this._itemCount&&this._itemIndex!==-1){f.preventDefault()}}},this));var a=WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify());var d=a.find("li.dropdownDivider").last();this._divider=$('<li class="dropdownDivider" />').hide().insertBefore(d);this._list=$('<li class="dropdownList"><ul /></li>').hide().insertBefore(d).children("ul");a.find("input, label").on("click",function(f){f.stopPropagation()});this._proxy=new WCF.Action.Proxy({showLoadingOverlay:false,success:$.proxy(this._success,this)})},_createListItem:function(a){this._divider.show();this._list.parent().show();this._super(a)},_clearList:function(a){if(a){this._searchInput.val("")}this._divider.hide();this._list.empty().parent().hide();WCF.CloseOverlayHandler.removeCallback("WCF.Search.Base");this._itemCount=0;this._itemIndex=-1}});WCF.Search.Message.SearchArea=Class.extend({_searchArea:null,init:function(d){this._searchArea=d;var a=new WCF.Search.Message.KeywordList(this._searchArea.find("input[type=search]"),$.proxy(this._callback,this));a.setDelay(500);var c=this;var f=this._searchArea.find("input[type=search]");this._searchArea.click(function(g){if(g.target==c._searchArea[0]){f.focus().trigger("click");return false}});if(this._searchArea.hasClass("dropdown")){var e=this._searchArea.wcfIdentify();var b=this._searchArea.find("form");b.submit(function(){var g=WCF.Dropdown.getDropdownMenu(e);g.find("input[type=hidden]").appendTo(b);g.find("input[type=checkbox]:checked").each(function(i,h){var j=$(h);$('<input type="hidden" name="'+j.attr("name")+'" value="'+j.attr("value")+'" />').appendTo(b)})})}},_callback:function(a){this._searchArea.find("input[type=search]").val(a.label);this._searchArea.find("form").submit();return false}}); })(this);
 
 // WCF.Tagging.js
 (function (window, undefined) {"use strict";WCF.Tagging={};WCF.Tagging.TagList=WCF.EditableItemList.extend({_className:"wcf\\data\\tag\\TagAction",_maxLength:0,init:function(c,a,b){this._allowCustomInput=true;this._maxLength=b;this._super(c,a);this._data=[];this._search=new WCF.Tagging.TagSearch(this._searchInput,$.proxy(this.addItem,this));this._itemList.addClass("tagList");$(c).data("__api",this)},_keyDown:function(b){if(this._super(b)){if(b===null){return true}var a=b.which;if(a===8||a===27||a===13||a===46){return true}else{if(a>36&&a<41){return true}}if(this._searchInput.val().length>=this._maxLength){return false}return true}return false},_submit:function(){this._super();for(var b=0,a=this._data.length;b<a;b++){if(this._data[b]){$('<input type="hidden" name="tags[]" />').val(this._data[b]).appendTo(this._form)}}},addItem:function(b){if(!b.objectID&&b.label.length>this._maxLength){b.label=b.label.substr(0,this._maxLength)}if(WCF.inArray(b.label,this._data)){return true}var a=$('<li class="badge tag">'+WCF.String.escapeHTML(b.label)+"</li>").data("objectID",b.objectID).data("label",b.label).appendTo(this._itemList);a.click($.proxy(this._click,this));if(this._search){this._search.addExcludedSearchValue(b.label)}this._addItem(b.objectID,b.label);return true},_addItem:function(b,a){this._data.push(a)},clearList:function(){this._super();this._data=[]},getTags:function(){return this._data},_removeItem:function(d,a){for(var c=0,b=this._data.length;c<b;c++){if(this._data[c]===a){this._data.splice(c,1);return}}},load:function(a){if(a&&a.length){for(var c=0,b=a.length;c<b;c++){this.addItem({objectID:0,label:WCF.String.unescapeHTML(a[c])})}}}});WCF.Tagging.TagSearch=WCF.Search.Base.extend({_className:"wcf\\data\\tag\\TagAction",init:function(b,d,a,c){this._super(b,d,a,c,false)}}); })(this);