From: Benoît Pin Date: Wed, 9 Apr 2014 19:39:15 +0000 (+0200) Subject: Variation de l'opacité pour indiquer l'état d'avancement. X-Git-Url: https://scm.cri.ensmp.fr/git/ckeditor.git/commitdiff_plain/2d713e87d60560e07419d37004b0261fbd972baf?ds=sidebyside;hp=015e0dd96227ff485466c52dfa6c3d8ee541cf54 Variation de l'opacité pour indiquer l'état d'avancement. --- diff --git a/skins/ckeditor/plugins/plinn_image/plugin.js b/skins/ckeditor/plugins/plinn_image/plugin.js index c7ae5ec..631f9fa 100644 --- a/skins/ckeditor/plugins/plinn_image/plugin.js +++ b/skins/ckeditor/plugins/plinn_image/plugin.js @@ -51,6 +51,7 @@ PlinnCKDDUploader.prototype.createFileProxy = function(file) { rel.append(progressBar); var link = new CKEDITOR.dom.element('a'); link.setAttribute('href', '#'); + link.setStyle('opacity', 0.2); link.appendText(file.name); container.append(link); @@ -138,6 +139,8 @@ PlinnCKDDUploader.prototype.progressHandlerCB = function(progress) { var size = this.progressBarMaxSize * progress; size = Math.round(size); this.progressBar.setStyle('width', String(size) + 'px'); + var currentOpacity = this.uploadedItem.link.getStyle('opacity'); + this.uploadedItem.link.setStyle('opacity', Math.max(currentOpacity, progress)); }; PlinnCKDDUploader.prototype.progressHandler = function(evt) {