From c59c448e57c051372bee3a4ee5540b60b404957e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 16 Jun 2016 14:57:30 +0200 Subject: [PATCH 1/4] Improvement of plugin to work in back office, modification of data displaying --- webapp/WEB-INF/plugins/asynchronousupload.xml | 15 + .../skin/plugins/asynchronousupload/main.js | 324 +++++++++--------- 2 files changed, 177 insertions(+), 162 deletions(-) diff --git a/webapp/WEB-INF/plugins/asynchronousupload.xml b/webapp/WEB-INF/plugins/asynchronousupload.xml index e300170..5f2b39f 100644 --- a/webapp/WEB-INF/plugins/asynchronousupload.xml +++ b/webapp/WEB-INF/plugins/asynchronousupload.xml @@ -38,4 +38,19 @@ asynchronousupload/jquery.fileupload-validate.js + + + js/plugins/asynchronousupload/vendor/jquery.ui.widget.js + js/plugins/asynchronousupload/jquery.iframe-transport.js + js/plugins/asynchronousupload/load-image.min.js + js/plugins/asynchronousupload/jquery.fileupload.js + js/plugins/asynchronousupload/jquery.fileupload-process.js + js/plugins/asynchronousupload/jquery.fileupload-image.js + js/plugins/asynchronousupload/canvas-to-blob.min.js + + + js/plugins/asynchronousupload/jquery.fileupload-validate.js + + + \ No newline at end of file diff --git a/webapp/WEB-INF/templates/skin/plugins/asynchronousupload/main.js b/webapp/WEB-INF/templates/skin/plugins/asynchronousupload/main.js index 68d1e40..7ac30e4 100644 --- a/webapp/WEB-INF/templates/skin/plugins/asynchronousupload/main.js +++ b/webapp/WEB-INF/templates/skin/plugins/asynchronousupload/main.js @@ -10,212 +10,212 @@ */ /* global $, window */ +Array.prototype.contains = function (object){ + + for(i in this){ + if(this[i] == object){ + return true; + } + } + return false; +} +if(typeof(handlerList)==='undefined'){ +handlerList=[] +} +if (!handlerList.contains('${handler_name}')){ + + handlerList.push('${handler_name}'); + $(function () { - 'use strict'; - - var uploadButton = $('