From 919a0d0ed35c24b1047281723ddde2ac98fc9a3e Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 15 May 2012 22:36:44 -0700 Subject: document close handler. initial working draft Signed-off-by: Valerio Virgillito --- js/document/document-html.js | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) (limited to 'js/document/document-html.js') diff --git a/js/document/document-html.js b/js/document/document-html.js index 9bbea4c9..87c776d5 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js @@ -42,13 +42,6 @@ exports.HtmlDocument = Montage.create(Component, { // exclusionList: { value: ["HTML", "BODY"] //TODO: Update to correct list - }, - //////////////////////////////////////////////////////////////////// - // - uuid: { - get: function() { - return this._uuid; - } }, //////////////////////////////////////////////////////////////////// // @@ -133,21 +126,10 @@ exports.HtmlDocument = Montage.create(Component, { //////////////////////////////////////////////////////////////////// // closeDocument: { - value: function () { - // - this.model.close(null, this.handleCloseDocument.bind(this)); - } - }, - //////////////////////////////////////////////////////////////////// - // - handleCloseDocument: { - value: function (success) { - //TODO: Add logic for handling success or failure - // - this.application.ninja.documentController._documents.splice(this.uuid, 1); - // - NJevent("closeDocument", this.model.file.uri); - //TODO: Delete object here + value: function (context, callback) { + var closed = this.model.close(null); + + callback.call(context, this); } }, //////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From 96c92ab93bdb6eb2dd42ef275b84d83aef8254bf Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Wed, 16 May 2012 14:36:47 -0700 Subject: Fixing selection bugs in new templates. Signed-off-by: Nivesh Rajbhandari --- js/document/document-html.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/document/document-html.js') diff --git a/js/document/document-html.js b/js/document/document-html.js index 87c776d5..a26b74d5 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js @@ -41,7 +41,7 @@ exports.HtmlDocument = Montage.create(Component, { //////////////////////////////////////////////////////////////////// // exclusionList: { - value: ["HTML", "BODY"] //TODO: Update to correct list + value: ["HTML", "BODY", "NINJA-CONTENT"] //TODO: Update to correct list }, //////////////////////////////////////////////////////////////////// // -- cgit v1.2.3 From 402a369c7bf164c3c6686be3a33f5e36f25e4130 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 16 May 2012 23:19:32 -0700 Subject: document controller and stage view code cleanup Signed-off-by: Valerio Virgillito --- js/document/document-html.js | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'js/document/document-html.js') diff --git a/js/document/document-html.js b/js/document/document-html.js index a26b74d5..56d9db02 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js @@ -134,14 +134,29 @@ exports.HtmlDocument = Montage.create(Component, { }, //////////////////////////////////////////////////////////////////// // - saveAppState: { + serializeDocument: { value: function () { - //TODO: Import functionality + // There are not needed for now ssince we cannot change them + //this.gridHorizontalSpacing = this.application.ninja.stage.drawUtils.gridHorizontalSpacing; + //this.gridVerticalSpacing = this.application.ninja.stage.drawUtils.gridVerticalSpacing; + + // Serialize the current scroll position + // TODO: Implement + + // Serialize the selection + this.model.selection = this.application.ninja.selectedElements.slice(0); + this.draw3DGrid = this.application.ninja.appModel.show3dGrid; + + // Serialize the undo + // TODO: Save the montage undo queue + + // Pause the videos + this.model.views.design.pauseVideos(); } }, //////////////////////////////////////////////////////////////////// // - restoreAppState: { + deserializeDocument: { value: function () { //TODO: Import functionality } -- cgit v1.2.3