From 2f9ea524ff75e3042075272eef2154ebb14fa029 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sun, 29 Nov 2015 22:00:00 +0300 Subject: [PATCH] some cleanup... Signed-off-by: Alex A. Naanou --- ui (gen4)/viewer.js | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/ui (gen4)/viewer.js b/ui (gen4)/viewer.js index f69a926e..e65020bc 100755 --- a/ui (gen4)/viewer.js +++ b/ui (gen4)/viewer.js @@ -3185,6 +3185,8 @@ module.AppControl = ImageGridFeatures.Feature({ //--------------------------------------------------------------------- +// fs reader/loader... + // XXX at this point this is a stub... if(window.nodejs != null){ var file = requirejs('./file') @@ -3329,7 +3331,7 @@ module.FileSystemLoader = ImageGridFeatures.Feature({ //--------------------------------------------------------------------- -var makeProwseProxy = function(action){ +var makeBrowseProxy = function(action){ return function(path, logger){ var that = this if(path == null){ @@ -3356,16 +3358,6 @@ var FileSystemLoaderUIActions = actions.Actions({ ], }, - // NOTE: if no path is passed (null) these behave just like .browsePath(..) - // with the appropriate callback otherwise it will just load - // the given path (no UI) while .browsePath(..) will load the - // UI in all cases but will treat the given path as a base path - // to start from. - // XXX should passing no path to this start browsing from the current - // path or from the root? - loadIndex: [makeProwseProxy('loadIndex')], - loadImages: [makeProwseProxy('loadImages')], - // XXX BUG: for some reason this when run from .browseActions(..) or // any other Browse, loads incorrectly while when called // directly is OK... @@ -3434,6 +3426,16 @@ var FileSystemLoaderUIActions = actions.Actions({ && parent.focus() }) }], + + // NOTE: if no path is passed (null) these behave just like .browsePath(..) + // with the appropriate callback otherwise it will just load + // the given path (no UI) while .browsePath(..) will load the + // UI in all cases but will treat the given path as a base path + // to start from. + // XXX should passing no path to this start browsing from the current + // path or from the root? + loadIndex: [makeBrowseProxy('loadIndex')], + loadImages: [makeBrowseProxy('loadImages')], }) @@ -3451,6 +3453,11 @@ module.FileSystemLoaderUI = ImageGridFeatures.Feature({ +//--------------------------------------------------------------------- +// fs writer... + + + //--------------------------------------------------------------------- // Meta features... //