From 1bb316da4fa5ebce678ab2aa9d2435c5b873ce3a Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 24 Jun 2016 15:09:13 +0300 Subject: [PATCH] started reworking feature sort algorithm... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/base.js | 8 ++++---- ui (gen4)/features/filesystem.js | 4 ++++ ui (gen4)/lib/features.js | 12 ++++++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/ui (gen4)/features/base.js b/ui (gen4)/features/base.js index ecc99a38..10cdaa87 100755 --- a/ui (gen4)/features/base.js +++ b/ui (gen4)/features/base.js @@ -577,13 +577,13 @@ actions.Actions({ // shorthands... // NOTE: these are here mostly for the menus... rotateCW: ['Image|Edit/Rotate image clockwise', - function(target){ this.rotate(traget, 'cw') }], + function(target){ this.rotate(target, 'cw') }], rotateCCW: ['Image|Edit/Rotate image counterclockwise', - function(target){ this.rotate(traget, 'ccw') }], + function(target){ this.rotate(target, 'ccw') }], flipVertical: ['Image|Edit/Flip image vertically', - function(target){ this.flip(traget, 'vertical') }], + function(target){ this.flip(target, 'vertical') }], flipHorizontal: ['Image|Edit/Flip image horizontally', - function(target){ this.flip(traget, 'horizontal') }], + function(target){ this.flip(target, 'horizontal') }], }) diff --git a/ui (gen4)/features/filesystem.js b/ui (gen4)/features/filesystem.js index 40792419..fb6e2790 100755 --- a/ui (gen4)/features/filesystem.js +++ b/ui (gen4)/features/filesystem.js @@ -901,6 +901,10 @@ var FileSystemCommentsActions = actions.Actions({ return file.loadIndex(path, that.config['index-dir'] +'/comments', date, logger) .then(function(res){ + // no comments present... + if(res[path] == null){ + return res + } // if we have no sub-indexes just load the // comments as-is... diff --git a/ui (gen4)/lib/features.js b/ui (gen4)/lib/features.js index 4cece301..af7bd326 100755 --- a/ui (gen4)/lib/features.js +++ b/ui (gen4)/lib/features.js @@ -569,6 +569,18 @@ var FeatureSetProto = { } }, + + buildFeatureList2: function(obj, lst){ + var that = this + obj = obj || {} + + lst = lst == null ? this.features : lst + lst = lst.constructor !== Array ? [lst] : lst + + + }, + + // // .setup(, [, ...]) // ->