From 1559a6fc42752405765311e97518c5e89e74bdbf Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 14 Jun 2016 03:06:35 +0300 Subject: [PATCH] still working on save comments... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/filesystem.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ui (gen4)/features/filesystem.js b/ui (gen4)/features/filesystem.js index 168aa0b0..5dafecd4 100755 --- a/ui (gen4)/features/filesystem.js +++ b/ui (gen4)/features/filesystem.js @@ -839,6 +839,7 @@ var FileSystemCommentsActions = actions.Actions({ }], }) + var FileSystemComments = module.FileSystemComments = core.ImageGridFeatures.Feature({ title: '', @@ -868,6 +869,7 @@ module.FileSystemComments = core.ImageGridFeatures.Feature({ } }], + // prepare comments for saving to "comments/"... ['prepareIndexForWrite', function(res){ var changed = this.changes == null @@ -1009,18 +1011,28 @@ module.FileSystemSaveHistory = core.ImageGridFeatures.Feature({ if(comments && comments.current){ res - .then(function(){ + .then(function(res){ comments[that.location.from] = comments.current delete comments.current + + return res }) } delete this.unsaved_index }], + + // XXX merge comments... + // ...not yet sure how... + ['loadIndex', + function(res){ + // XXX + }], ] }) + //--------------------------------------------------------------------- // Save History UI...