Skip to content

Commit

Permalink
* Tokenizace kontejnerů - koexistence dvou fileuploadů.
Browse files Browse the repository at this point in the history
  • Loading branch information
JZechy committed Oct 7, 2016
1 parent a8388fd commit 6fe99fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/www/fileupload/ui/full.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions src/www/fileupload/ui/minimal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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;
Expand Down

0 comments on commit 6fe99fa

Please sign in to comment.