added save state on unload...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2012-09-01 02:39:10 +04:00
parent 8e37b0dc92
commit 768bcd4d76
2 changed files with 8 additions and 4 deletions

View File

@ -1,16 +1,19 @@
Priority work Priority work
[_] 68% Preview II [_] 62% Preview II
[_] 53% save state [_] make shuft up/down direction-aware...
| i.e. if we are going through images in a direction select the
| next image in that direction when shifting...
[_] 57% save state
[X] minimal: Local Storage (manual) [X] minimal: Local Storage (manual)
| works across all targets (CEF, PhoneGap, browser) | works across all targets (CEF, PhoneGap, browser)
[_] local JSON (file) [_] local JSON (file)
[_] CouchDB [_] CouchDB
[_] 75% autosave [X] 100% autosave
[X] on edit [X] on edit
[X] on navigate [X] on navigate
| only save position to save time... | only save position to save time...
[X] on timer [X] on timer
[_] on unload [X] on unload
[X] manual incremental save [X] manual incremental save
[_] manual named save [_] manual named save
[X] versions/history [X] versions/history

View File

@ -1025,6 +1025,7 @@ function setDefaultInitialState(){
function setupEvents(){ function setupEvents(){
var updated = false var updated = false
// persistence... // persistence...
$(window).unload(ImageGrid.saveState)
$(document) $(document)
// main modifier events... // main modifier events...
.bind('shiftImageUp shiftImageDown reverseImageOrder '+ .bind('shiftImageUp shiftImageDown reverseImageOrder '+