diff options
author | Struan Donald <struan@exo.org.uk> | 2013-04-22 15:33:32 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-04-22 15:58:17 +0100 |
commit | bacefc8d0568236ffdb1912882e2ff5419b2a818 (patch) | |
tree | edc7808388b320c310be010123ddb3ff7dc3a037 /www/js/app.js | |
parent | ed17181e0660ce6452b9fbc4a8a6d1a807dca453 (diff) |
set and clear currentDraft details via methods on FMS object to ensure consistency
Diffstat (limited to 'www/js/app.js')
-rw-r--r-- | www/js/app.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/www/js/app.js b/www/js/app.js index 2ce05e2..6e09047 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -97,6 +97,16 @@ var tpl = { return p; }, + setCurrentDraft: function(draft) { + FMS.currentDraft = draft; + localStorage.currentDraftID = draft.id; + }, + + clearCurrentDraft: function() { + FMS.currentDraftID = new FMS.Draft(); + localStorage.currentDraftID = null; + }, + initialize: function () { if ( this.initialized == 1 ) { return this; |