From d404dee472c89e2a5443ef686500213ae9d69458 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 4 Jul 2013 21:15:02 +0400 Subject: [PATCH] more cleanup... Signed-off-by: Alex A. Naanou --- ui/index.html | 42 +----------------------------------------- ui/setup.js | 9 +-------- 2 files changed, 2 insertions(+), 49 deletions(-) diff --git a/ui/index.html b/ui/index.html index 146ab2ed..f1ab1f17 100755 --- a/ui/index.html +++ b/ui/index.html @@ -141,47 +141,7 @@ $(function(){ setupBaseURLHistory() setupDataBindings() - - /* XXX drag/drop - $(document) - .bind('dragover', function(e){ - e.stopPropagation() - e.preventDefault() - // XXX is there a jQuery way out of this?? - e.originalEvent.dataTransfer.dropEffect = 'copy' // Explicitly show this is a copy. - }) - .bind('drop', function(e){ - e.stopPropagation() - e.preventDefault() - - // XXX is there a jQuery way out of this?? - var files = e.originalEvent.dataTransfer.files - - // XXX should we be using the loadJSON here??? - // XXX desperatly need image caching and preview generation... - - for (var i = 0, f; f = files[i]; i++) { - - if (!f.type.match('image.*')) { - continue - } - console.log('FILE:', f) - - var reader = new FileReader() - reader.onload = function(i){ - return function(e){ - // XXX need to avoid data URLs here and use plain old paths... - //ribbon.append(makeImage(e.target.result, i)) - console.log('DROPPED')//, e.target.result) - } - }(i) - - reader.readAsDataURL(f) - //reader.readAsText(f) - } - - }) - */ + // XXX do we need drag'n'drop here??? // we have an image file... if((DATA_ATTR + '_BASE_URL') in localStorage diff --git a/ui/setup.js b/ui/setup.js index 509f105c..a5ce0c6c 100755 --- a/ui/setup.js +++ b/ui/setup.js @@ -57,14 +57,7 @@ function setupDataBindings(viewer){ viewer .click(function(){ if($('.ribbon').length == 0){ - // XXX use the real action (the same as the keyboard handler)... - // browser version... - var getter = window.listDir != null ? getDir : prompt - getter('Path to open', BASE_URL) - .done(function(path){ - path = path.trim() - statusNotify(loadDir(path)) - }) + loadDirectoryDialog() } }) // XXX need to maintain the correct number of images per ribbon