From e7f43774b980313392bc1a203431e30958c6e366 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 31 Jan 2012 08:35:59 +0800 Subject: Adding a version json object to Ninja Versions object to start keeping track of versions for Ninja, Montage and eventually other dependencies. Loaded before montage to use in the splash screen. Signed-off-by: Valerio Virgillito --- js/ninja.reel/ninja.js | 1 + 1 file changed, 1 insertion(+) (limited to 'js/ninja.reel') diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index bc31e0e1..75ec7fcc 100644 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js @@ -36,6 +36,7 @@ exports.Ninja = Montage.create(Component, { prepareForDraw: { value: function() { + console.log("Loading Ninja --> ", window.ninjaVersion.ninja.version); this.application.ninja = this; -- cgit v1.2.3 From fc8d63ff3a3e2c32f6f11a92741552774301b761 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 31 Jan 2012 08:57:57 +0800 Subject: Adding the version to the main Ninja reel component. Signed-off-by: Valerio Virgillito --- js/ninja.reel/ninja.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'js/ninja.reel') diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index 75ec7fcc..465533cd 100644 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js @@ -13,6 +13,10 @@ exports.Ninja = Montage.create(Component, { _appLoaded: { value: false }, _preload: { value: false }, + ninjaVersion: { + value: window.ninjaVersion.ninja.version + }, + toolsData: { value: null }, appData: { value: AppData }, @@ -36,7 +40,7 @@ exports.Ninja = Montage.create(Component, { prepareForDraw: { value: function() { - console.log("Loading Ninja --> ", window.ninjaVersion.ninja.version); + console.log("Loading Ninja --> ", this.ninjaVersion); this.application.ninja = this; -- cgit v1.2.3 From 7e23cfe542f29148ed315586830785de59201f92 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 1 Feb 2012 16:43:08 -0800 Subject: Adding njUtils as a component and adding it to the application object Signed-off-by: Valerio Virgillito --- js/ninja.reel/ninja.html | 8 +++++++- js/ninja.reel/ninja.js | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'js/ninja.reel') diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html index 706c8243..f3ff3d58 100644 --- a/js/ninja.reel/ninja.html +++ b/js/ninja.reel/ninja.html @@ -259,6 +259,11 @@ "name": "NewFileWorkflowController" }, + "njUtils": { + "module":"js/lib/nj-utils", + "name": "NJUtils" + }, + "owner": { "module": "js/ninja.reel", "name": "Ninja", @@ -279,7 +284,8 @@ "stylesController": {"@": "stylesController"}, "filePickerController": {"@": "filePickerController"}, "newFileController": {"@": "newFileController"}, - "documentBar": {"@": "documentBar"} + "documentBar": {"@": "documentBar"}, + "njUtils": {"@": "njUtils"} } } diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index 465533cd..7115b228 100644 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js @@ -34,6 +34,8 @@ exports.Ninja = Montage.create(Component, { templateDidLoad: { value: function() { + this.application.njutils = this.njUtils; + this.eventManager.addEventListener( "preloadFinish", this, false); } }, -- cgit v1.2.3 From 1a8bcab85cd71447bbd1b66daf95d1c8fbca8c2b Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 1 Feb 2012 23:53:47 -0800 Subject: Fixes for montage integration Signed-off-by: Valerio Virgillito --- js/ninja.reel/ninja.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'js/ninja.reel') diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index 7115b228..48c72a1d 100644 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js @@ -96,9 +96,16 @@ exports.Ninja = Montage.create(Component, { } }, + _didDraw: { + value: false + }, + didDraw: { value: function() { - NJevent("appLoaded"); + if(!this._didDraw) { + NJevent("appLoaded"); + this._didDraw = true; + } } }, @@ -165,12 +172,6 @@ exports.Ninja = Montage.create(Component, { } }, - handleLivePreview: { - value: function(event) { - - } - }, - executeLivePreview: { value: function() { var background, overflow, transitionStopRule; -- cgit v1.2.3 From 97255032921178bdfbc25512ddf3e0867e353f7a Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 1 Feb 2012 23:54:24 -0800 Subject: Revert "Adding njUtils as a component and adding it to the application object" This reverts commit f07bbfaa60c3fb7c2412c5aa97b49d114d6a88ea. Signed-off-by: Valerio Virgillito --- js/ninja.reel/ninja.html | 8 +------- js/ninja.reel/ninja.js | 2 -- 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'js/ninja.reel') diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html index f3ff3d58..706c8243 100644 --- a/js/ninja.reel/ninja.html +++ b/js/ninja.reel/ninja.html @@ -259,11 +259,6 @@ "name": "NewFileWorkflowController" }, - "njUtils": { - "module":"js/lib/nj-utils", - "name": "NJUtils" - }, - "owner": { "module": "js/ninja.reel", "name": "Ninja", @@ -284,8 +279,7 @@ "stylesController": {"@": "stylesController"}, "filePickerController": {"@": "filePickerController"}, "newFileController": {"@": "newFileController"}, - "documentBar": {"@": "documentBar"}, - "njUtils": {"@": "njUtils"} + "documentBar": {"@": "documentBar"} } } diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index 48c72a1d..90015f5a 100644 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js @@ -34,8 +34,6 @@ exports.Ninja = Montage.create(Component, { templateDidLoad: { value: function() { - this.application.njutils = this.njUtils; - this.eventManager.addEventListener( "preloadFinish", this, false); } }, -- cgit v1.2.3