From 9415271d2b87e7af45671330109153d22982146c Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 15 Feb 2017 05:43:39 +0300 Subject: [PATCH] notes and preparing to refactor... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/base.js | 5 +++++ ui (gen4)/features/filesystem.js | 3 +++ ui (gen4)/features/sort.js | 2 ++ 3 files changed, 10 insertions(+) diff --git a/ui (gen4)/features/base.js b/ui (gen4)/features/base.js index 32c2857f..b612d436 100755 --- a/ui (gen4)/features/base.js +++ b/ui (gen4)/features/base.js @@ -1111,6 +1111,7 @@ module.Tags = core.ImageGridFeatures.Feature({ this.markChanged('images', gids) }], + // XXX ['prepareIndexForWrite', function(res, _, full){ @@ -1120,6 +1121,10 @@ module.Tags = core.ImageGridFeatures.Feature({ // - ..tags.bookmark -> .bookmarked // XXX will need a symmetrical action to reverse all of this... }], + ['prepareJSONForLoad', + function(res){ + // XXX + }], ], }) diff --git a/ui (gen4)/features/filesystem.js b/ui (gen4)/features/filesystem.js index 6ac03634..70739b7a 100755 --- a/ui (gen4)/features/filesystem.js +++ b/ui (gen4)/features/filesystem.js @@ -938,6 +938,9 @@ module.Comments = core.ImageGridFeatures.Feature({ // prepare comments for saving to "comments/"... // // NOTE: this will skip the 'raw' comment field... + // NOTE: we do not change the .json() format here, so we do not + // need to do anything special to restore, i.e. no need for + // doing anything on .prepareJSONForLoad(..) ['prepareIndexForWrite', function(res, _, full){ var changed = this.changes == null diff --git a/ui (gen4)/features/sort.js b/ui (gen4)/features/sort.js index 736ff115..c3d0c73d 100755 --- a/ui (gen4)/features/sort.js +++ b/ui (gen4)/features/sort.js @@ -464,6 +464,8 @@ module.Sort = core.ImageGridFeatures.Feature({ this.data.sort_method = 'Manual' }], + // maintain .sort_order and .sort_cache separately from .data in + // the store... ['prepareIndexForWrite', function(res, _, full){ var c = this.changes