Commit d077c7c1 authored by Celine Noirot's avatar Celine Noirot
Browse files

#10 handle if only one file is given

parent 08d6bd43
...@@ -512,7 +512,6 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell; ...@@ -512,7 +512,6 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
} }
} }
}); });
$this.$element.off("validated.wfform").on("validated.wfform", function() { $this.$element.off("validated.wfform").on("validated.wfform", function() {
$this.$element.off("uploaded.wfform").on("uploaded.wfform", function () { $this.$element.off("uploaded.wfform").on("uploaded.wfform", function () {
...@@ -548,6 +547,9 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell; ...@@ -548,6 +547,9 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
if (~allfiles.indexOf("\n")){ //BUG .split(/\n/) si deja array, if (~allfiles.indexOf("\n")){ //BUG .split(/\n/) si deja array,
allfiles = allfiles.split(/\n/); allfiles = allfiles.split(/\n/);
} }
else {
allfiles = [allfiles];
}
var newtidval = ""; var newtidval = "";
for (var j = 0; j < allfiles.length; j++) { for (var j = 0; j < allfiles.length; j++) {
...@@ -791,7 +793,6 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell; ...@@ -791,7 +793,6 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
/*** Local handler (equivalent to type=browsefile)***/ /*** Local handler (equivalent to type=browsefile)***/
var set_local_file_handler = function (tid) { var set_local_file_handler = function (tid) {
var size = $("#"+tid).rules()["mparam"].type.split(SIZE_LIMIT_SPLITER)[1]; var size = $("#"+tid).rules()["mparam"].type.split(SIZE_LIMIT_SPLITER)[1];
console.log("local file");
$("#urlfile_btn_" + tid).show(); $("#urlfile_btn_" + tid).show();
$("#" + tid).on("focusin", function (event) { $("#" + tid).on("focusin", function (event) {
$(this).prop('readonly', true); $(this).prop('readonly', true);
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment