From 19c77d87df72a85345e527d790878fc65eca189a Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Mon, 11 Jun 2012 15:44:15 -0700 Subject: 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. --- js/document/document-html.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'js/document/document-html.js') 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, { // closeDocument: { value: function (context, callback) { - //Closing document and getting outcome - var closed = this.model.close(null); - //Making callback if specified - if (callback) callback.call(context, this); + //Closing document (sending null to close all views) + this.model.close(null, function () {if (callback) callback.call(context, this);}.bind(this)); } }, //////////////////////////////////////////////////////////////////// -- cgit v1.2.3