first pass at the X to remove files from the upload form
authorAndrew Magliozzi <andrew.magliozzi@gmail.com>
Tue, 24 Sep 2013 19:24:12 +0000 (15:24 -0400)
committerAndrew Magliozzi <andrew.magliozzi@gmail.com>
Tue, 24 Sep 2013 19:24:12 +0000 (15:24 -0400)
karmaworld/templates/partial/filepicker.html

index ff2f5f92113050df41ba6c9db7e8e46bb030470d..aef818c2b3661f1dfa5b5938eed2cdfb832865f6 100644 (file)
@@ -35,6 +35,9 @@
           <input type="text" id="id_tags" name="tags" class="taggit-tags"
                 placeholder="shakespeare, econ, physics">
         </div>
+        <div class="show-for-small columns small-1 end">
+          <i class="icon-remove-sign awesome-action"></i>
+        </div>
         <div class="hidden-fields" style="display:none;">
           <input type="text" id="id_fpfile" name="fpfile" class="fpurl">
           <input type="text" id="id_mimetype" name="mimetype" class="mimetype">
@@ -43,6 +46,9 @@
           {% csrf_token %}
           <input type="text" class="csrf" value='{{ csrf_token }}'>
         </div>
+        <div class="show-for-medium-up columns large-1 end">
+          <i class="icon-remove-sign awesome-action"></i>
+        </div>
       </form>
     </div>
   </div>
             });
         });
       });
+
+      $('#icon-remove-sign').on('click', function(e){
+        e.stopPropagation();
+        $(this).parent().remove();
+      });
     });
   // TODO: js to submit all forms as POST to NEW ENDPOINT
   // TODO: Cancel (x) for each upload