From 64d9b235618a2faedf41465a2df965bf67a57948 Mon Sep 17 00:00:00 2001 From: Nico Date: Sat, 12 Jan 2013 01:35:57 +0100 Subject: [PATCH] topics --- app/assets/javascripts/note_files/test.js | 43 ----------------------- app/views/topics/index.html.haml | 12 +------ 2 files changed, 1 insertion(+), 54 deletions(-) delete mode 100644 app/assets/javascripts/note_files/test.js diff --git a/app/assets/javascripts/note_files/test.js b/app/assets/javascripts/note_files/test.js deleted file mode 100644 index 98dea31..0000000 --- a/app/assets/javascripts/note_files/test.js +++ /dev/null @@ -1,43 +0,0 @@ - -function init_note_upload_fields(note_id){ - drop = $('#note_'+note_id+' .fileupload').closest(".bottom") - - $('#note_'+note_id+' .fileupload').fileupload({ - url: $(this).attr("action"), - dropZone: drop, - autoUpload: true, - progressall: function (e, data) { - var progress = parseInt(data.loaded / data.total * 100, 10); - - $(this).find('.progress .bar').html(progress + '% téléchargé.'); - }, - always: function (e, data) { - $(this).find('.progress .bar').html(""); - }, - - drop: function (e, data) { - - $('#note_'+note_id+' .fileupload').closest(".bottom").css("background", "rgb(255, 255, 204)"); - } - }); - - - $(".note .bottom").bind('dragover', function (e) { - $(this).css("background", "green"); - - }); - - $(".note .bottom").bind('dragleave', function (e) { - $(this).css("background", "rgb(255, 255, 204)"); - - }); - - -} - - -$(document).ready(function () { - - - -}); diff --git a/app/views/topics/index.html.haml b/app/views/topics/index.html.haml index 260cf87..85e22fd 100644 --- a/app/views/topics/index.html.haml +++ b/app/views/topics/index.html.haml @@ -11,14 +11,4 @@ #topic_show - - %form.fileupload{:action => note_files_path(), :enctype => "multipart/form-data", :method => "POST", :style => "border:1px solid black"} - .progress - .bar{:style => "background:red;width: 0%;"} - %input{:multiple => "", :name => "files[]", :type => "file"} - - - %form.fileupload{:action => "http://localhost:3000/1.html", :enctype => "multipart/form-data", :method => "POST", :style => "border:1px solid black"} - .progress - .bar{:style => "background:red;width: 0%;"} - %input{:multiple => "", :name => "files[]", :type => "file"} \ No newline at end of file + \ No newline at end of file