From fd19156a7d3473d6a7ec19a33f926c90764dc59f Mon Sep 17 00:00:00 2001 From: "woltlab.com" Date: Sat, 13 Jul 2013 20:25:34 +0200 Subject: [PATCH] Updating minified JavaScript files --- wcfsetup/install/files/js/WCF.Attachment.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WCF.Attachment.min.js b/wcfsetup/install/files/js/WCF.Attachment.min.js index 04d2798b65..4bba593c58 100755 --- a/wcfsetup/install/files/js/WCF.Attachment.min.js +++ b/wcfsetup/install/files/js/WCF.Attachment.min.js @@ -1 +1 @@ -WCF.Attachment={};WCF.Attachment.Upload=WCF.Upload.extend({_objectType:"",_objectID:0,_tmpHash:"",_parentObjectID:0,_wysiwygContainerID:"",init:function(c,g,a,h,d,e,f,b){this._super(c,g,"wcf\\data\\attachment\\AttachmentAction",{multiple:true,maxUploads:f});this._objectType=a;this._objectID=h;this._tmpHash=d;this._parentObjectID=e;this._wysiwygContainerID=b;this._buttonSelector.children("p.button").click($.proxy(this._validateLimit,this));this._fileListSelector.find(".jsButtonInsertAttachment").click($.proxy(this._insert,this));WCF.DOMNodeRemovedHandler.addCallback("WCF.Attachment.Upload",$.proxy(this._removeLimitError,this))},_validateLimit:function(){var c=this._buttonSelector.next("small.innerError");var a=this._options.maxUploads-this._fileListSelector.children("li:not(.uploadFailed)").length;var d=(this._fileUpload)?this._fileUpload.prop("files").length:0;if(a<=0||a').insertAfter(this._buttonSelector)}c.html(b);return false}c.remove();return true},_removeLimitError:function(b){var a=$(b.target);if(a.is("li.box48")&&a.parent().wcfIdentify()===this._fileListSelector.wcfIdentify()){this._buttonSelector.next("small.innerError").remove()}},_upload:function(){if(this._validateLimit()){this._super()}if(this._fileUpload){this._removeButton();this._createButton()}},_createUploadMatrix:function(a){this._fileListSelector.children("li.uploadFailed").remove();return this._super(a)},_getParameters:function(){return{objectType:this._objectType,objectID:this._objectID,tmpHash:this._tmpHash,parentObjectID:this._parentObjectID}},_initFile:function(a){var b=$('
  • '+a.name+'

    • ').data("filename",a.name);this._fileListSelector.append(b);this._fileListSelector.show();if(this._buttonSelector.data("maxSize") div").append($(''+WCF.Language.get("wcf.attachment.upload.error.tooLarge")+""));b.addClass("uploadFailed")}return b},_success:function(b,c){for(var i=0;i'))}else{g.children(".icon-spinner").removeClass("icon-spinner").addClass("icon-paper-clip")}var e=$('');e.text(h).attr("href",c.returnValues.attachments[h]["url"]);if(c.returnValues.attachments[h]["isImage"]!=0){console.debug(c.returnValues.attachments[h]["isImage"]);e.addClass("jsImageViewer").attr("title",h)}g.find("p").empty().append(e);g.find("small").append(c.returnValues.attachments[h]["formattedFilesize"]);var f=$('
    • ');g.find("ul").append(f);var a=$('
    • ');a.children(".jsButtonInsertAttachment").click($.proxy(this._insert,this));g.find("ul").append(a)}else{g.children(".icon-spinner").removeClass("icon-spinner").addClass("icon-ban-circle");var d="";if(c.returnValues&&c.returnValues.errors[h]){d=c.returnValues.errors[h]["errorType"]}else{d="uploadFailed"}g.find("div > div").append($(''+WCF.Language.get("wcf.attachment.upload.error."+d)+""));g.addClass("uploadFailed")}g.css("display","block")}WCF.DOMNodeInsertedHandler.execute()},_insert:function(e){var d=$(e.currentTarget).data("objectID");var c="[attach="+d+"][/attach]";var a=$("#"+this._wysiwygContainerID).ckeditorGet();if(a.mode==="wysiwyg"){a.insertText(c)}else{var g=$("#"+this._wysiwygContainerID).next(".cke_editor_text").find("textarea");var b=g.val();if(b.length==0){g.val(c)}else{var f=g.getCaret();g.val(b.substr(0,f)+c+b.substr(f))}}},_error:function(){this._fileListSelector.find("li").each(function(a,c){var b=$(c);if(b.children(".icon-spinner").length){b.addClass("uploadFailed").children(".icon-spinner").removeClass("icon-spinner").addClass("icon-ban-circle");b.find("div > div").append($(''+WCF.Language.get("wcf.attachment.upload.error.uploadFailed")+""))}})}}); \ No newline at end of file +WCF.Attachment={};WCF.Attachment.Upload=WCF.Upload.extend({_objectType:"",_objectID:0,_tmpHash:"",_parentObjectID:0,_wysiwygContainerID:"",init:function(c,g,a,h,d,e,f,b){this._super(c,g,"wcf\\data\\attachment\\AttachmentAction",{multiple:true,maxUploads:f});this._objectType=a;this._objectID=h;this._tmpHash=d;this._parentObjectID=e;this._wysiwygContainerID=b;this._buttonSelector.children("p.button").click($.proxy(this._validateLimit,this));this._fileListSelector.find(".jsButtonInsertAttachment").click($.proxy(this._insert,this));WCF.DOMNodeRemovedHandler.addCallback("WCF.Attachment.Upload",$.proxy(this._removeLimitError,this))},_validateLimit:function(){var c=this._buttonSelector.next("small.innerError");var a=this._options.maxUploads-this._fileListSelector.children("li:not(.uploadFailed)").length;var d=(this._fileUpload)?this._fileUpload.prop("files").length:0;if(a<=0||a').insertAfter(this._buttonSelector)}c.html(b);return false}c.remove();return true},_removeLimitError:function(b){var a=$(b.target);if(a.is("li.box48")&&a.parent().wcfIdentify()===this._fileListSelector.wcfIdentify()){this._buttonSelector.next("small.innerError").remove()}},_upload:function(){if(this._validateLimit()){this._super()}if(this._fileUpload){this._removeButton();this._createButton()}},_createUploadMatrix:function(a){this._fileListSelector.children("li.uploadFailed").remove();return this._super(a)},_getParameters:function(){return{objectType:this._objectType,objectID:this._objectID,tmpHash:this._tmpHash,parentObjectID:this._parentObjectID}},_initFile:function(a){var b=$('
    • '+a.name+'

      • ').data("filename",a.name);this._fileListSelector.append(b);this._fileListSelector.show();if(this._buttonSelector.data("maxSize") div").append($(''+WCF.Language.get("wcf.attachment.upload.error.tooLarge")+""));b.addClass("uploadFailed")}return b},_success:function(b,c){for(var i=0;i'))}else{g.children(".icon-spinner").removeClass("icon-spinner").addClass("icon-paper-clip")}var e=$('');e.text(h).attr("href",c.returnValues.attachments[h]["url"]);if(c.returnValues.attachments[h]["isImage"]!=0){console.debug(c.returnValues.attachments[h]["isImage"]);e.addClass("jsImageViewer").attr("title",h)}g.find("p").empty().append(e);g.find("small").append(c.returnValues.attachments[h]["formattedFilesize"]);var f=$('
      • ');g.find("ul").append(f);var a=$('
      • ');a.children(".jsButtonInsertAttachment").click($.proxy(this._insert,this));g.find("ul").append(a)}else{g.children(".icon-spinner").removeClass("icon-spinner").addClass("icon-ban-circle");var d="";if(c.returnValues&&c.returnValues.errors[h]){d=c.returnValues.errors[h]["errorType"]}else{d="uploadFailed"}g.find("div > div").append($(''+WCF.Language.get("wcf.attachment.upload.error."+d)+""));g.addClass("uploadFailed")}g.css("display","block")}WCF.DOMNodeInsertedHandler.execute()},_insert:function(e){var d=$(e.currentTarget).data("objectID");var c="[attach="+d+"][/attach]";var a=($.browser.mobile)?null:$("#"+this._wysiwygContainerID).ckeditorGet();if(a!==null&&a.mode==="wysiwyg"){a.insertText(c)}else{var g=($.browser.mobile)?$("#"+this._wysiwygContainerID):$("#"+this._wysiwygContainerID).next(".cke_editor_text").find("textarea");var b=g.val();if(b.length==0){g.val(c)}else{var f=g.getCaret();g.val(b.substr(0,f)+c+b.substr(f))}}},_error:function(){this._fileListSelector.find("li").each(function(a,c){var b=$(c);if(b.children(".icon-spinner").length){b.addClass("uploadFailed").children(".icon-spinner").removeClass("icon-spinner").addClass("icon-ban-circle");b.find("div > div").append($(''+WCF.Language.get("wcf.attachment.upload.error.uploadFailed")+""))}})}}); \ No newline at end of file -- 2.20.1