瀏覽代碼

Bugfix: loading same file twice

crobi 10 年之前
父節點
當前提交
b36568980f
共有 2 個文件被更改,包括 6 次插入1 次删除
  1. 3
    1
      generator/generate.html
  2. 3
    0
      generator/js/ui.js

+ 3
- 1
generator/generate.html 查看文件

45
         <div class="row">
45
         <div class="row">
46
             <div class="col-md-12 col-lg-3">
46
             <div class="col-md-12 col-lg-3">
47
                 <!--<h3>Menu</h3>-->
47
                 <!--<h3>Menu</h3>-->
48
-                <form role="form" class="form-horizontal">
48
+                <form style="display:none" id="file-load-form">
49
                     <input type="file" id="file-load" name="files[]" multiple class="form-control" style="display:none" />
49
                     <input type="file" id="file-load" name="files[]" multiple class="form-control" style="display:none" />
50
+                </form>
51
+                <form role="form" class="form-horizontal">
50
                     <div class="form-group">
52
                     <div class="form-group">
51
                         <div class="col-sm-6">
53
                         <div class="col-sm-6">
52
                             <button type="button" class="btn btn-info btn-block" id="button-help">Open Help</button>
54
                             <button type="button" class="btn btn-info btn-block" id="button-help">Open Help</button>

+ 3
- 0
generator/js/ui.js 查看文件

77
 
77
 
78
         reader.readAsText(f);
78
         reader.readAsText(f);
79
     }
79
     }
80
+
81
+    // Reset file input
82
+    $("#file-load-form")[0].reset();
80
 }
83
 }
81
 
84
 
82
 function ui_add_cards(data) {
85
 function ui_add_cards(data) {

Loading…
取消
儲存