diff options
author | Jose Antonio Marquez | 2012-06-11 15:44:15 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-06-11 15:44:15 -0700 |
commit | 19c77d87df72a85345e527d790878fc65eca189a (patch) | |
tree | 3cca8b3d2583f754f1c8de02adb7596d98a8e89d /js/document/document-html.js | |
parent | c629361d7182d5f4727caeab7c2b0822f33187c7 (diff) | |
download | ninja-19c77d87df72a85345e527d790878fc65eca189a.tar.gz |
Adding temp prompt UI component
Added a temp prompt component and added on before close logic to ensure user does not lose data if the file needs saving when they close.
Diffstat (limited to 'js/document/document-html.js')
-rwxr-xr-x | js/document/document-html.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/js/document/document-html.js b/js/document/document-html.js index 04565753..8874c34b 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js | |||
@@ -115,10 +115,8 @@ exports.HtmlDocument = Montage.create(Component, { | |||
115 | // | 115 | // |
116 | closeDocument: { | 116 | closeDocument: { |
117 | value: function (context, callback) { | 117 | value: function (context, callback) { |
118 | //Closing document and getting outcome | 118 | //Closing document (sending null to close all views) |
119 | var closed = this.model.close(null); | 119 | this.model.close(null, function () {if (callback) callback.call(context, this);}.bind(this)); |
120 | //Making callback if specified | ||
121 | if (callback) callback.call(context, this); | ||
122 | } | 120 | } |
123 | }, | 121 | }, |
124 | //////////////////////////////////////////////////////////////////// | 122 | //////////////////////////////////////////////////////////////////// |