From 6fe99fae6f8b088015036abff91a0a9f46ccc881 Mon Sep 17 00:00:00 2001 From: Zechy Date: Fri, 7 Oct 2016 14:24:03 +0200 Subject: [PATCH] =?UTF-8?q?*=20Tokenizace=20kontejner=C5=AF=20-=20koexiste?= =?UTF-8?q?nce=20dvou=20fileupload=C5=AF.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/www/fileupload/ui/full.js | 4 ++-- src/www/fileupload/ui/minimal.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/www/fileupload/ui/full.js b/src/www/fileupload/ui/full.js index ee42697..aa9d862 100644 --- a/src/www/fileupload/ui/full.js +++ b/src/www/fileupload/ui/full.js @@ -74,7 +74,7 @@ UIFullRenderer.prototype = { addRow: function(file, id) { var tr = document.createElement("tr"); tr.classList.add("zet-fileupload-file"); - tr.setAttribute("id", "file-" + id); + tr.setAttribute("id", "file-" +this.token +"-"+ id); tr.appendChild(this.getFilePreview(file)); tr.appendChild(this.generateFileNameWrap(file, id)); @@ -89,7 +89,7 @@ UIFullRenderer.prototype = { * @param {Number} id */ writeError: function(msg, id) { - var fileTr = document.getElementById("file-" + id); + var fileTr = document.getElementById("file-" +this.token +"-"+ id); fileTr.classList.add("bg-warning"); var nameTd = fileTr.querySelector(".name"); diff --git a/src/www/fileupload/ui/minimal.js b/src/www/fileupload/ui/minimal.js index f2460ad..0e34ce7 100644 --- a/src/www/fileupload/ui/minimal.js +++ b/src/www/fileupload/ui/minimal.js @@ -72,7 +72,7 @@ UIMininalRenderer.prototype = { addRow: function(file, id) { var div = document.createElement("div"); div.classList.add("well", "well-sm", "zet-fileupload-file"); - div.setAttribute("id", "file-" + id); + div.setAttribute("id", "file-" +this.token +"-"+ id); var row = document.createElement("div"); row.classList.add("clearfix"); @@ -90,7 +90,7 @@ UIMininalRenderer.prototype = { * @param id */ writeError: function(msg, id) { - var fileContainer = document.getElementById("file-" + id); + var fileContainer = document.getElementById("file-" +this.token +"-"+ id); var nameP = fileContainer.querySelector(".filename"); nameP.classList.add("alert", "alert-warning"); nameP.textContent = msg;