From 12979718f603a74a437ed4bba264f3746c5f1d7c Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 30 Dec 2013 03:15:09 +0400 Subject: [PATCH] house keeping and cleanup... Signed-off-by: Alex A. Naanou --- ui/keybindings.js | 14 +++++++------- ui/marks.js | 13 +++++-------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/ui/keybindings.js b/ui/keybindings.js index 8c732b07..d66bc8d1 100755 --- a/ui/keybindings.js +++ b/ui/keybindings.js @@ -279,7 +279,7 @@ var KEYBOARD_CONFIG = { Esc: doc('Hide marks', function(){ - toggleMarkesView('off') + toggleMarksView('off') return false }), }, @@ -490,7 +490,7 @@ var KEYBOARD_CONFIG = { }), alt: doc('Shift marked images up', function(){ - toggleMarkesView('on') + toggleMarksView('on') shiftMarkedImagesUp() }), 'alt+shift': doc('Shift marked images up to empty ribbon', @@ -519,7 +519,7 @@ var KEYBOARD_CONFIG = { }), alt: doc('Shift marked images down', function(){ - toggleMarkesView('on') + toggleMarksView('on') shiftMarkedImagesDown() }), 'alt+shift': doc('Shift marked images down to empty ribbon', @@ -685,12 +685,12 @@ var KEYBOARD_CONFIG = { ctrl: doc('Mark current ribbon', function(){ - toggleMarkesView('on') + toggleMarksView('on') markAll('ribbon') }), 'ctrl+shift': doc('Mark all images', function(){ - toggleMarkesView('on') + toggleMarksView('on') markAll('all') }), }, @@ -715,7 +715,7 @@ var KEYBOARD_CONFIG = { // XXX add a non FXX key for macs... F2: doc('Toggle mark visibility', - function(){ toggleMarkesView() }), + function(){ toggleMarksView() }), // XXX should we be able to toggle crop modes from single image mode??? // ...if yes, then remove the F2 & F3 definitions form ribbon // mode... @@ -723,7 +723,7 @@ var KEYBOARD_CONFIG = { /* F2: { default: doc('Toggle mark visibility', - function(){ toggleMarkesView() }), + function(){ toggleMarksView() }), shift: doc('Crop marked only images', function(){ toggleMarkedOnlyView('on') diff --git a/ui/marks.js b/ui/marks.js index 55d3a877..dd540a0b 100755 --- a/ui/marks.js +++ b/ui/marks.js @@ -87,14 +87,12 @@ var getMarkedGIDBefore = makeGIDBeforeGetterFromList( // - 'off' : force remove mark // - 'next' : toggle next state (default) // NOTE: when passing this a gid, the 'next' action is not supported -// -// XXX do we need a pre-callback here??? function makeMarkToggler(img_class, mark_class, evt_name, callback){ return createCSSClassToggler( '.current.image', img_class, function(action, elem){ - toggleMarkesView('on') + toggleMarksView('on') // we got a gid... if(elem.length == 0 && elem.selector in IMAGES){ @@ -125,7 +123,7 @@ function makeMarkToggler(img_class, mark_class, evt_name, callback){ } -// generate an image updater function... +// Generate an image updater function... // // the resulting function will update image mark state by adding or // removing the mark the specific mark object. @@ -191,7 +189,7 @@ var toggleMarkedOnlyWithRibbonsView = makeCropModeToggler( // XXX shifting images and unmarking in this mode do not work correctly... -var toggleMarkesView = createCSSClassToggler( +var toggleMarksView = createCSSClassToggler( '.viewer', 'marks-visible', function(){ @@ -468,7 +466,7 @@ function shiftMarkedImagesRight(){ } -// focus next/prev mark... +// Focus next/prev mark... // // NOTE: these will not jump to marks on other ribbons... to prevent this // add true as the final argument (see restrict_to_ribbon argument @@ -579,7 +577,6 @@ var loadFileMarks = makeFileLoader( var t1 = Date.now() marksUpdated() - // XXX is this the correct way to do this??? DATA.version = DATA_VERSION dataUpdated() @@ -620,7 +617,7 @@ function setupMarks(viewer){ showGlobalIndicator( 'marks-visible', 'Marks visible (F2)') - .click(function(){ toggleMarkesView() }) + .click(function(){ toggleMarksView() }) showGlobalIndicator( 'marked-only-visible', 'Marked only images visible (shift-F2)')