From 806974142d44afdd23534bf2d18eff0a8e701e0c Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 8 Jun 2012 16:59:59 -0700 Subject: rewrite: currentSelectedContainer -> domContainer Fixed the currentSelectedContainer by removing bindings and using property change on the current document added the red outline back. Signed-off-by: Valerio Virgillito --- js/document/document-html.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'js/document/document-html.js') diff --git a/js/document/document-html.js b/js/document/document-html.js index 04565753..15f88d09 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js @@ -107,6 +107,12 @@ exports.HtmlDocument = Montage.create(Component, { }, handleViewReady: { value: function() { + // TODO: Find a better way to initialize this property + // Assign the domContainer to be the document root on open + if(typeof this.model.domContainer !== "undefined") { + this.model.domContainer = this.model.documentRoot; + } + //Making callback after view is loaded this.loaded.callback.call(this.loaded.context, this); } -- cgit v1.2.3 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