X-Git-Url: http://git.scottworley.com/picsort/blobdiff_plain/8a9d6b07d5933eb8aab9dad991f3510d141e0f5f..d3aedd16f654a3802e848b955251294a02a3b9af:/picsorter.js diff --git a/picsorter.js b/picsorter.js index b8b1804..cfbf5db 100644 --- a/picsorter.js +++ b/picsorter.js @@ -52,7 +52,7 @@ function setpic() { function say(message) { $("#message").text(message).removeClass("fade"); - setTimeout(function() { $("#message").addClass("fade"); }, 1); + setTimeout(function() { $("#message").addClass("fade"); }, 100); } function announce() { say(input_index + " " + (picinfo[files[input_index]].name || "")); @@ -214,13 +214,25 @@ Mousetrap.bind('X', mark_not_deleted); Mousetrap.bind('r', rotate); Mousetrap.bind('i', announce); Mousetrap.bind('f', function() { say(files[input_index]); }); -Mousetrap.bind('e', function() { say_exposure(); }); +Mousetrap.bind('B', function() { say_exposure(); }); Mousetrap.bind('c', function() { $("#name").show().focus(); return false; }); Mousetrap.bind('C', function() { if (last_name) { set_name(last_name); } }); Mousetrap.bind('%', function() { say((100 * input_index / files.length).toFixed(2) + "%"); }); Mousetrap.bind('!', show_commands); Mousetrap.bind('esc', function() { $("#name").hide(); $("#shell_out").hide(); }); +function clean_picinfo() { + files_index = {}; + $.each(files, function(i, f) { + files_index[f] = true; + }); + for (f in picinfo) { + if (!files_index[f]) { + delete picinfo[f]; + } + } +} + function undelete_all() { for (f in picinfo) { delete picinfo[f].deleted;