From: woltlab.com Date: Mon, 26 Sep 2016 08:47:22 +0000 (+0200) Subject: Updating minified JavaScript files X-Git-Tag: 3.0.0_Beta_2~129 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d162eb0913e7d6274a4061f4e65ee49590ab1b1b;p=GitHub%2FWoltLab%2FWCF.git Updating minified JavaScript files --- diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.Style.min.js b/wcfsetup/install/files/acp/js/WCF.ACP.Style.min.js index 43f0ab4618..085bdc20ef 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.Style.min.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.Style.min.js @@ -1 +1 @@ -WCF.ACP.Style={},WCF.ACP.Style.CopyStyle=Class.extend({_styleID:0,init:function(t){this._styleID=t;var e=this;$(".jsCopyStyle").click(function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.acp.style.copyStyle.confirmMessage"),$.proxy(e._copy,e),void 0,void 0,!0)})},_copy:function(t){"confirm"===t&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"copy",className:"wcf\\data\\style\\StyleAction",objectIDs:[this._styleID]},success:$.proxy(this._success,this)})},_success:function(t){window.location=t.returnValues.redirectURL}}),WCF.ACP.Style.ImageUpload=WCF.Upload.extend({_button:null,_image:null,_styleID:0,_tmpHash:"",init:function(t,e){this._styleID=parseInt(t)||0,this._tmpHash=e,this._button=$("#uploadImage"),this._image=$("#styleImage"),this._super(this._button,void 0,"wcf\\data\\style\\StyleAction")},_initFile:function(){return this._image},_getParameters:function(){return{styleID:this._styleID,tmpHash:this._tmpHash}},_success:function(t,e){if(e.returnValues.url){this._image.attr("src",e.returnValues.url+"?timestamp="+Date.now()),this._button.next(".innerError").remove();var s=new WCF.System.Notification(WCF.Language.get("wcf.global.success"));s.show()}else e.returnValues.errorType&&this._getInnerErrorElement().text(WCF.Language.get("wcf.acp.style.image.error."+e.returnValues.errorType))},_getInnerErrorElement:function(){var t=this._button.next(".innerError");return t.length||(t=$('').insertAfter(this._button)),t}}),WCF.ACP.Style.LogoUpload=WCF.Upload.extend({_button:null,_imagePath:null,_logo:null,_pageLogo:null,_tmpHash:"",_wcfPath:"",init:function(t,e){this._tmpHash=t,this._wcfPath=e,this._button=$("#uploadLogo"),this._image=$("#styleLogo"),this._imagePath=$("#imagePath"),this._pageLogo=$("#pageLogo"),this._super(this._button,void 0,"wcf\\data\\style\\StyleAction",{action:"uploadLogo"}),this._image.attr("src").length||this._updateLogo(),this._pageLogo.blur($.proxy(this._updateLogo,this))},_updateLogo:function(){var t=this._pageLogo.val();if(t.length){if(!t.match(/^https?:\/\//)){var e=this._imagePath.val();e||(e="images/"),e=this._wcfPath+e.replace(/^\/?images\/?/,""),"/"!==e.substr(-1)&&(e+="/"),t=e+t}}else t=WCF_PATH+"images/default-logo.png",$("#pageLogoWidth").val(288),$("#pageLogoHeight").val(40);this._image.attr("src",t+"?timestamp="+Date.now())},_initFile:function(){return this._image},_getParameters:function(){return{tmpHash:this._tmpHash}},_success:function(t,e){if(e.returnValues.url){this._image.attr("src",e.returnValues.url+"?timestamp="+Date.now()),this._pageLogo.val(e.returnValues.url),this._button.next(".innerError").remove(),$("#pageLogoWidth").val(e.returnValues.width),$("#pageLogoHeight").val(e.returnValues.height);var s=new WCF.System.Notification(WCF.Language.get("wcf.global.success"));s.show()}else e.returnValues.errorType&&this._getInnerErrorElement().text(WCF.Language.get("wcf.acp.style.image.error."+e.returnValues.errorType))},_getInnerErrorElement:function(){var t=this._button.next(".innerError");return t.length||(t=$('').insertAfter(this._button)),t}}),WCF.ACP.Style.LogoUploadMobile=WCF.Upload.extend({_button:null,_imagePath:null,_logo:null,_pageLogo:null,_tmpHash:"",_wcfPath:"",init:function(t,e){this._tmpHash=t,this._wcfPath=e,this._button=$("#uploadLogoMobile"),this._image=$("#styleLogoMobile"),this._imagePath=$("#imagePathMobile"),this._pageLogo=$("#pageLogoMobile"),this._super(this._button,void 0,"wcf\\data\\style\\StyleAction",{action:"uploadLogoMobile"}),this._image.attr("src").length||this._updateLogo(),this._pageLogo.blur($.proxy(this._updateLogo,this))},_updateLogo:function(){var t=this._pageLogo.val();if(t.length){if(!t.match(/^https?:\/\//)){var e=this._imagePath.val();e||(e="images/"),e=this._wcfPath+e.replace(/^\/?images\/?/,""),"/"!==e.substr(-1)&&(e+="/"),t=e+t}}else t=WCF_PATH+"images/default-logo-small.png";this._image.attr("src",t+"?timestamp="+Date.now())},_initFile:function(){return this._image},_getParameters:function(){return{tmpHash:this._tmpHash}},_success:function(t,e){if(e.returnValues.url){this._image.attr("src",e.returnValues.url+"?timestamp="+Date.now()),this._pageLogo.val(e.returnValues.url),this._button.next(".innerError").remove();var s=new WCF.System.Notification(WCF.Language.get("wcf.global.success"));s.show()}else e.returnValues.errorType&&this._getInnerErrorElement().text(WCF.Language.get("wcf.acp.style.image.error."+e.returnValues.errorType))},_getInnerErrorElement:function(){var t=this._button.next(".innerError");return t.length||(t=$('').insertAfter(this._button)),t}}),WCF.ACP.Style.List=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".styleList .buttonList").each($.proxy(function(t,e){var s=$(e),i=s.data("styleID"),a=this;s.find(".jsSetAsDefault").click(function(){a._click("setAsDefault",i)}),s.find(".jsDelete").click(function(t){a._delete(t,i)})},this))},_click:function(t,e){this._proxy.setOption("data",{actionName:t,className:"wcf\\data\\style\\StyleAction",objectIDs:[e]}),this._proxy.sendRequest()},_delete:function(t,e){var s=$(t.currentTarget).data("confirmMessageHtml");if(s){var i=this;WCF.System.Confirmation.show(s,function(t){"confirm"===t&&i._click("delete",e)},void 0,void 0,!0)}else this._click("delete",e)},_success:function(){window.location.reload()}}); \ No newline at end of file +WCF.ACP.Style={},WCF.ACP.Style.CopyStyle=Class.extend({_styleID:0,init:function(t){this._styleID=t;var e=this;$(".jsCopyStyle").click(function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.acp.style.copyStyle.confirmMessage"),$.proxy(e._copy,e),void 0,void 0,!0)})},_copy:function(t){"confirm"===t&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"copy",className:"wcf\\data\\style\\StyleAction",objectIDs:[this._styleID]},success:$.proxy(this._success,this)})},_success:function(t){window.location=t.returnValues.redirectURL}}),WCF.ACP.Style.ImageUpload=WCF.Upload.extend({_button:null,_image:null,_styleID:0,_tmpHash:"",init:function(t,e){this._styleID=parseInt(t)||0,this._tmpHash=e,this._button=$("#uploadImage"),this._image=$("#styleImage"),this._super(this._button,void 0,"wcf\\data\\style\\StyleAction")},_initFile:function(){return this._image},_getParameters:function(){return{styleID:this._styleID,tmpHash:this._tmpHash}},_success:function(t,e){if(e.returnValues.url){this._image.attr("src",e.returnValues.url+"?timestamp="+Date.now()),this._button.next(".innerError").remove();var s=new WCF.System.Notification(WCF.Language.get("wcf.global.success"));s.show()}else e.returnValues.errorType&&this._getInnerErrorElement().text(WCF.Language.get("wcf.acp.style.image.error."+e.returnValues.errorType))},_getInnerErrorElement:function(){var t=this._button.next(".innerError");return t.length||(t=$('').insertAfter(this._button)),t}}),WCF.ACP.Style.LogoUpload=WCF.Upload.extend({_button:null,_imagePath:null,_logo:null,_pageLogo:null,_tmpHash:"",_wcfPath:"",init:function(t,e){this._tmpHash=t,this._wcfPath=e,this._button=$("#uploadLogo"),this._image=$("#styleLogo"),this._imagePath=$("#imagePath"),this._pageLogo=$("#pageLogo"),this._super(this._button,void 0,"wcf\\data\\style\\StyleAction",{action:"uploadLogo"}),this._image.attr("src").length||this._updateLogo(),this._pageLogo.blur($.proxy(this._updateLogo,this))},_updateLogo:function(){var t=this._pageLogo.val();if(t.length){if(!t.match(/^https?:\/\//)){var e=this._imagePath.val();e||(e="images/"),e=this._wcfPath+e.replace(/^\/?images\/?/,""),"/"!==e.substr(-1)&&(e+="/"),t=e+t}}else t=WCF_PATH+"images/default-logo.png",$("#pageLogoWidth").val(281),$("#pageLogoHeight").val(40);this._image.attr("src",t+"?timestamp="+Date.now())},_initFile:function(){return this._image},_getParameters:function(){return{tmpHash:this._tmpHash}},_success:function(t,e){if(e.returnValues.url){this._image.attr("src",e.returnValues.url+"?timestamp="+Date.now()),this._pageLogo.val(e.returnValues.url),this._button.next(".innerError").remove(),$("#pageLogoWidth").val(e.returnValues.width),$("#pageLogoHeight").val(e.returnValues.height);var s=new WCF.System.Notification(WCF.Language.get("wcf.global.success"));s.show()}else e.returnValues.errorType&&this._getInnerErrorElement().text(WCF.Language.get("wcf.acp.style.image.error."+e.returnValues.errorType))},_getInnerErrorElement:function(){var t=this._button.next(".innerError");return t.length||(t=$('').insertAfter(this._button)),t}}),WCF.ACP.Style.LogoUploadMobile=WCF.Upload.extend({_button:null,_imagePath:null,_logo:null,_pageLogo:null,_tmpHash:"",_wcfPath:"",init:function(t,e){this._tmpHash=t,this._wcfPath=e,this._button=$("#uploadLogoMobile"),this._image=$("#styleLogoMobile"),this._imagePath=$("#imagePathMobile"),this._pageLogo=$("#pageLogoMobile"),this._super(this._button,void 0,"wcf\\data\\style\\StyleAction",{action:"uploadLogoMobile"}),this._image.attr("src").length||this._updateLogo(),this._pageLogo.blur($.proxy(this._updateLogo,this))},_updateLogo:function(){var t=this._pageLogo.val();if(t.length){if(!t.match(/^https?:\/\//)){var e=this._imagePath.val();e||(e="images/"),e=this._wcfPath+e.replace(/^\/?images\/?/,""),"/"!==e.substr(-1)&&(e+="/"),t=e+t}}else t=WCF_PATH+"images/default-logo-small.png";this._image.attr("src",t+"?timestamp="+Date.now())},_initFile:function(){return this._image},_getParameters:function(){return{tmpHash:this._tmpHash}},_success:function(t,e){if(e.returnValues.url){this._image.attr("src",e.returnValues.url+"?timestamp="+Date.now()),this._pageLogo.val(e.returnValues.url),this._button.next(".innerError").remove();var s=new WCF.System.Notification(WCF.Language.get("wcf.global.success"));s.show()}else e.returnValues.errorType&&this._getInnerErrorElement().text(WCF.Language.get("wcf.acp.style.image.error."+e.returnValues.errorType))},_getInnerErrorElement:function(){var t=this._button.next(".innerError");return t.length||(t=$('').insertAfter(this._button)),t}}),WCF.ACP.Style.List=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".styleList .buttonList").each($.proxy(function(t,e){var s=$(e),i=s.data("styleID"),a=this;s.find(".jsSetAsDefault").click(function(){a._click("setAsDefault",i)}),s.find(".jsDelete").click(function(t){a._delete(t,i)})},this))},_click:function(t,e){this._proxy.setOption("data",{actionName:t,className:"wcf\\data\\style\\StyleAction",objectIDs:[e]}),this._proxy.sendRequest()},_delete:function(t,e){var s=$(t.currentTarget).data("confirmMessageHtml");if(s){var i=this;WCF.System.Confirmation.show(s,function(t){"confirm"===t&&i._click("delete",e)},void 0,void 0,!0)}else this._click("delete",e)},_success:function(){window.location.reload()}}); \ No newline at end of file