From 76d1de512a58f023ae348ae8500100490fba9915 Mon Sep 17 00:00:00 2001 From: LV-426 Date: Thu, 13 Nov 2014 17:41:57 +0200 Subject: rename scripts/ -> src/ --- scripts/drag_n_drop.js | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 scripts/drag_n_drop.js (limited to 'scripts/drag_n_drop.js') diff --git a/scripts/drag_n_drop.js b/scripts/drag_n_drop.js deleted file mode 100644 index da166ad4..00000000 --- a/scripts/drag_n_drop.js +++ /dev/null @@ -1,31 +0,0 @@ -define(['jquery', 'rz_core'], function($, rz_core) { - -function init() { -console.log('rhizi: init drag-n-drop'); -$(document).on('drop', function(e) { - e.stopPropagation(); - e.preventDefault(); - var files = e.originalEvent.dataTransfer.files; - var file = files[files.length - 1]; - var fr = new FileReader(); - fr.onload = function() { - if (fr.readyState != 2) { - console.log('drop: error: reading from file failed'); - } else { - console.log('loading dropped file'); - rz_core.load_from_json(fr.result); - } - } - fr.readAsText(file); - return false; -}); -$(document).on('dragover', function (e) -{ - e.stopPropagation(); - e.preventDefault(); - return false; -}); -}; -return {'init': init }; - -}); // define -- cgit v1.3.1