still working on save comments...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-06-14 03:06:35 +03:00
parent 09202c09f6
commit 1559a6fc42

View File

@ -839,6 +839,7 @@ var FileSystemCommentsActions = actions.Actions({
}], }],
}) })
var FileSystemComments = var FileSystemComments =
module.FileSystemComments = core.ImageGridFeatures.Feature({ module.FileSystemComments = core.ImageGridFeatures.Feature({
title: '', title: '',
@ -868,6 +869,7 @@ module.FileSystemComments = core.ImageGridFeatures.Feature({
} }
}], }],
// prepare comments for saving to "comments/<keyword>"...
['prepareIndexForWrite', ['prepareIndexForWrite',
function(res){ function(res){
var changed = this.changes == null var changed = this.changes == null
@ -1009,18 +1011,28 @@ module.FileSystemSaveHistory = core.ImageGridFeatures.Feature({
if(comments && comments.current){ if(comments && comments.current){
res res
.then(function(){ .then(function(res){
comments[that.location.from] = comments.current comments[that.location.from] = comments.current
delete comments.current delete comments.current
return res
}) })
} }
delete this.unsaved_index delete this.unsaved_index
}], }],
// XXX merge comments...
// ...not yet sure how...
['loadIndex',
function(res){
// XXX
}],
] ]
}) })
//--------------------------------------------------------------------- //---------------------------------------------------------------------
// Save History UI... // Save History UI...