From 3a754133dbc138390503341fd2e9beba3e43aa4b Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Fri, 27 Jan 2012 12:05:17 -0800 Subject: Merged old FileIO --- .../layout/bread-crumb-button.reel/bread-crumb-button.css | 0 .../layout/bread-crumb-button.reel/bread-crumb-button.html | 0 .../layout/bread-crumb-button.reel/bread-crumb-button.js | 0 js/components/layout/bread-crumb.reel/bread-crumb.css | 0 js/components/layout/bread-crumb.reel/bread-crumb.html | 0 js/components/layout/bread-crumb.reel/bread-crumb.js | 0 js/components/layout/document-bar.reel/document-bar.css | 0 js/components/layout/document-bar.reel/document-bar.html | 0 js/components/layout/document-bar.reel/document-bar.js | 0 js/components/layout/document-entry.reel/close_button.gif | Bin js/components/layout/document-entry.reel/document-entry.css | 0 .../layout/document-entry.reel/document-entry.html | 0 js/components/layout/document-entry.reel/document-entry.js | 0 js/components/layout/documents-tab.reel/documents-tab.css | 0 js/components/layout/documents-tab.reel/documents-tab.html | 0 js/components/layout/documents-tab.reel/documents-tab.js | 0 js/components/layout/stage-mode.reel/stage-mode.css | 0 js/components/layout/stage-mode.reel/stage-mode.html | 0 js/components/layout/stage-mode.reel/stage-mode.js | 0 js/components/layout/subtool-button.reel/subtool-button.css | 0 .../layout/subtool-button.reel/subtool-button.html | 0 js/components/layout/subtool-button.reel/subtool-button.js | 0 js/components/layout/tool-button.reel/tool-button.css | 0 js/components/layout/tool-button.reel/tool-button.html | 0 js/components/layout/tool-button.reel/tool-button.js | 2 +- js/components/layout/tools-list.reel/tools-list.css | 0 js/components/layout/tools-list.reel/tools-list.html | 0 js/components/layout/tools-list.reel/tools-list.js | 0 .../layout/tools-properties.reel/tools-properties.css | 0 .../layout/tools-properties.reel/tools-properties.html | 0 .../layout/tools-properties.reel/tools-properties.js | 0 31 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 js/components/layout/bread-crumb-button.reel/bread-crumb-button.css mode change 100644 => 100755 js/components/layout/bread-crumb-button.reel/bread-crumb-button.html mode change 100644 => 100755 js/components/layout/bread-crumb-button.reel/bread-crumb-button.js mode change 100644 => 100755 js/components/layout/bread-crumb.reel/bread-crumb.css mode change 100644 => 100755 js/components/layout/bread-crumb.reel/bread-crumb.html mode change 100644 => 100755 js/components/layout/bread-crumb.reel/bread-crumb.js mode change 100644 => 100755 js/components/layout/document-bar.reel/document-bar.css mode change 100644 => 100755 js/components/layout/document-bar.reel/document-bar.html mode change 100644 => 100755 js/components/layout/document-bar.reel/document-bar.js mode change 100644 => 100755 js/components/layout/document-entry.reel/close_button.gif mode change 100644 => 100755 js/components/layout/document-entry.reel/document-entry.css mode change 100644 => 100755 js/components/layout/document-entry.reel/document-entry.html mode change 100644 => 100755 js/components/layout/document-entry.reel/document-entry.js mode change 100644 => 100755 js/components/layout/documents-tab.reel/documents-tab.css mode change 100644 => 100755 js/components/layout/documents-tab.reel/documents-tab.html mode change 100644 => 100755 js/components/layout/documents-tab.reel/documents-tab.js mode change 100644 => 100755 js/components/layout/stage-mode.reel/stage-mode.css mode change 100644 => 100755 js/components/layout/stage-mode.reel/stage-mode.html mode change 100644 => 100755 js/components/layout/stage-mode.reel/stage-mode.js mode change 100644 => 100755 js/components/layout/subtool-button.reel/subtool-button.css mode change 100644 => 100755 js/components/layout/subtool-button.reel/subtool-button.html mode change 100644 => 100755 js/components/layout/subtool-button.reel/subtool-button.js mode change 100644 => 100755 js/components/layout/tool-button.reel/tool-button.css mode change 100644 => 100755 js/components/layout/tool-button.reel/tool-button.html mode change 100644 => 100755 js/components/layout/tool-button.reel/tool-button.js mode change 100644 => 100755 js/components/layout/tools-list.reel/tools-list.css mode change 100644 => 100755 js/components/layout/tools-list.reel/tools-list.html mode change 100644 => 100755 js/components/layout/tools-list.reel/tools-list.js mode change 100644 => 100755 js/components/layout/tools-properties.reel/tools-properties.css mode change 100644 => 100755 js/components/layout/tools-properties.reel/tools-properties.html mode change 100644 => 100755 js/components/layout/tools-properties.reel/tools-properties.js (limited to 'js/components/layout') diff --git a/js/components/layout/bread-crumb-button.reel/bread-crumb-button.css b/js/components/layout/bread-crumb-button.reel/bread-crumb-button.css old mode 100644 new mode 100755 diff --git a/js/components/layout/bread-crumb-button.reel/bread-crumb-button.html b/js/components/layout/bread-crumb-button.reel/bread-crumb-button.html old mode 100644 new mode 100755 diff --git a/js/components/layout/bread-crumb-button.reel/bread-crumb-button.js b/js/components/layout/bread-crumb-button.reel/bread-crumb-button.js old mode 100644 new mode 100755 diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.css b/js/components/layout/bread-crumb.reel/bread-crumb.css old mode 100644 new mode 100755 diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.html b/js/components/layout/bread-crumb.reel/bread-crumb.html old mode 100644 new mode 100755 diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js old mode 100644 new mode 100755 diff --git a/js/components/layout/document-bar.reel/document-bar.css b/js/components/layout/document-bar.reel/document-bar.css old mode 100644 new mode 100755 diff --git a/js/components/layout/document-bar.reel/document-bar.html b/js/components/layout/document-bar.reel/document-bar.html old mode 100644 new mode 100755 diff --git a/js/components/layout/document-bar.reel/document-bar.js b/js/components/layout/document-bar.reel/document-bar.js old mode 100644 new mode 100755 diff --git a/js/components/layout/document-entry.reel/close_button.gif b/js/components/layout/document-entry.reel/close_button.gif old mode 100644 new mode 100755 diff --git a/js/components/layout/document-entry.reel/document-entry.css b/js/components/layout/document-entry.reel/document-entry.css old mode 100644 new mode 100755 diff --git a/js/components/layout/document-entry.reel/document-entry.html b/js/components/layout/document-entry.reel/document-entry.html old mode 100644 new mode 100755 diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js old mode 100644 new mode 100755 diff --git a/js/components/layout/documents-tab.reel/documents-tab.css b/js/components/layout/documents-tab.reel/documents-tab.css old mode 100644 new mode 100755 diff --git a/js/components/layout/documents-tab.reel/documents-tab.html b/js/components/layout/documents-tab.reel/documents-tab.html old mode 100644 new mode 100755 diff --git a/js/components/layout/documents-tab.reel/documents-tab.js b/js/components/layout/documents-tab.reel/documents-tab.js old mode 100644 new mode 100755 diff --git a/js/components/layout/stage-mode.reel/stage-mode.css b/js/components/layout/stage-mode.reel/stage-mode.css old mode 100644 new mode 100755 diff --git a/js/components/layout/stage-mode.reel/stage-mode.html b/js/components/layout/stage-mode.reel/stage-mode.html old mode 100644 new mode 100755 diff --git a/js/components/layout/stage-mode.reel/stage-mode.js b/js/components/layout/stage-mode.reel/stage-mode.js old mode 100644 new mode 100755 diff --git a/js/components/layout/subtool-button.reel/subtool-button.css b/js/components/layout/subtool-button.reel/subtool-button.css old mode 100644 new mode 100755 diff --git a/js/components/layout/subtool-button.reel/subtool-button.html b/js/components/layout/subtool-button.reel/subtool-button.html old mode 100644 new mode 100755 diff --git a/js/components/layout/subtool-button.reel/subtool-button.js b/js/components/layout/subtool-button.reel/subtool-button.js old mode 100644 new mode 100755 diff --git a/js/components/layout/tool-button.reel/tool-button.css b/js/components/layout/tool-button.reel/tool-button.css old mode 100644 new mode 100755 diff --git a/js/components/layout/tool-button.reel/tool-button.html b/js/components/layout/tool-button.reel/tool-button.html old mode 100644 new mode 100755 diff --git a/js/components/layout/tool-button.reel/tool-button.js b/js/components/layout/tool-button.reel/tool-button.js old mode 100644 new mode 100755 index 509512d0..72f46830 --- a/js/components/layout/tool-button.reel/tool-button.js +++ b/js/components/layout/tool-button.reel/tool-button.js @@ -42,7 +42,7 @@ exports.ToolButton = Montage.create(Component, { }, _currentSubSelected: { value: 0}, - + prepareForDraw: { enumerable: false, value: function() { diff --git a/js/components/layout/tools-list.reel/tools-list.css b/js/components/layout/tools-list.reel/tools-list.css old mode 100644 new mode 100755 diff --git a/js/components/layout/tools-list.reel/tools-list.html b/js/components/layout/tools-list.reel/tools-list.html old mode 100644 new mode 100755 diff --git a/js/components/layout/tools-list.reel/tools-list.js b/js/components/layout/tools-list.reel/tools-list.js old mode 100644 new mode 100755 diff --git a/js/components/layout/tools-properties.reel/tools-properties.css b/js/components/layout/tools-properties.reel/tools-properties.css old mode 100644 new mode 100755 diff --git a/js/components/layout/tools-properties.reel/tools-properties.html b/js/components/layout/tools-properties.reel/tools-properties.html old mode 100644 new mode 100755 diff --git a/js/components/layout/tools-properties.reel/tools-properties.js b/js/components/layout/tools-properties.reel/tools-properties.js old mode 100644 new mode 100755 -- cgit v1.2.3 From 553fce7721cacfd13b6013fdcdd0243c90083b5e Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Wed, 1 Feb 2012 11:59:11 -0800 Subject: fixed reference to coreioapi cleaning up opening code view tabs Signed-off-by: Ananya Sen --- js/components/layout/document-entry.reel/document-entry.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js index 6f265c91..1431e76f 100755 --- a/js/components/layout/document-entry.reel/document-entry.js +++ b/js/components/layout/document-entry.reel/document-entry.js @@ -81,7 +81,7 @@ exports.DocumentEntry = Montage.create(Component, { prepareForDraw: { enumerable: false, value: function() { - //this.element.addEventListener("click", this, false); + this.element.addEventListener("click", this, false); } }, @@ -98,10 +98,10 @@ exports.DocumentEntry = Montage.create(Component, { handleClick: { value: function(event) { if(event._event.target.nodeName === "IMG") { - documentManagerModule.DocumentManager.closeDocument(this._uuid); + this.application.ninja.documentController.closeDocument(this._uuid); } else { if(!this._document.isActive) { - documentManagerModule.DocumentManager.switchDocument(this._uuid); + this.application.ninja.stage.stageView.switchCodeView(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); } } } -- cgit v1.2.3 From 8504b61aefb25fdab931f02c4568916d2bf8345c Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Thu, 2 Feb 2012 00:52:44 -0800 Subject: changes to open multiple code view tabs and switch between the code views, added nj-skinned css class for the buttons in file picker, new file dialog and save as dialog Signed-off-by: Ananya Sen --- js/components/layout/documents-tab.reel/documents-tab.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/documents-tab.reel/documents-tab.js b/js/components/layout/documents-tab.reel/documents-tab.js index e874a73c..982f6ecd 100755 --- a/js/components/layout/documents-tab.reel/documents-tab.js +++ b/js/components/layout/documents-tab.reel/documents-tab.js @@ -7,8 +7,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot var Montage = require("montage/core/core").Montage; var Component = require("montage/ui/component").Component; -var documentManagerModule = require("js/io/document/document-controller"); - exports.DocumentsTab = Montage.create(Component, { openDocuments: { @@ -19,7 +17,7 @@ exports.DocumentsTab = Montage.create(Component, { enumerable: false, value: function() { // console.log("Change this to be inside the Ninja Reel"); - this.openDocuments = documentManagerModule.DocumentController._documents; + this.openDocuments = this.application.ninja.documentController._documents; // this.eventManager.addEventListener( "appLoaded", this, false); } }, -- cgit v1.2.3 From 0e595c4e11ce9b44eff157de8616ed15fcd5d6fc Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Thu, 2 Feb 2012 12:37:29 -0800 Subject: refactoring some file names and locations, change made to maintain only one codemirror div. Signed-off-by: Ananya Sen --- js/components/layout/document-bar.reel/document-bar.css | 9 ++++++++- js/components/layout/document-bar.reel/document-bar.html | 4 ++-- js/components/layout/document-bar.reel/document-bar.js | 10 ++++++++-- 3 files changed, 18 insertions(+), 5 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/document-bar.reel/document-bar.css b/js/components/layout/document-bar.reel/document-bar.css index 588b8952..2a147964 100755 --- a/js/components/layout/document-bar.reel/document-bar.css +++ b/js/components/layout/document-bar.reel/document-bar.css @@ -33,7 +33,7 @@ .documentBar span{ text-decoration: none; - cursor: default; + cursor: pointer; color: #3a3a3a; } @@ -41,3 +41,10 @@ color: white; } +.documentBar .enable{ + color: #d7d7d7; +} + +.documentBar .disable{ + color: #3a3a3a; +} \ No newline at end of file diff --git a/js/components/layout/document-bar.reel/document-bar.html b/js/components/layout/document-bar.reel/document-bar.html index d58f0d14..48f1423c 100755 --- a/js/components/layout/document-bar.reel/document-bar.html +++ b/js/components/layout/document-bar.reel/document-bar.html @@ -51,8 +51,8 @@
- Design View - Code View + Design View + Code View
\ No newline at end of file diff --git a/js/components/layout/document-bar.reel/document-bar.js b/js/components/layout/document-bar.reel/document-bar.js index 3eece273..44f65804 100755 --- a/js/components/layout/document-bar.reel/document-bar.js +++ b/js/components/layout/document-bar.reel/document-bar.js @@ -86,7 +86,7 @@ exports.DocumentBar = Montage.create(Component, { value: function() { this.designView.addEventListener("click", this, false); this.codeView.addEventListener("click", this, false); - + } }, @@ -95,7 +95,13 @@ exports.DocumentBar = Montage.create(Component, { if(event._event.target.id === this.currentView) return; this.currentView = event._event.target.id; - documentManagerModule.DocumentManager.switchViews(); + this.application.ninja.documentController.switchViews(event._event.target.id);//switch between design view + } + }, + + handleOnDocumentChanged:{ + value:function(event){ + } } }); -- cgit v1.2.3 From 1daf146c849a0a8dbd2b61b14218c9a39bdee3a7 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Fri, 3 Feb 2012 17:22:48 -0800 Subject: added editor tab save while switching code view tabs, integrated new file dialog with io mediator to open the new file in a new tab Signed-off-by: Ananya Sen --- js/components/layout/document-entry.reel/document-entry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/components/layout') diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js index 1431e76f..2a33548a 100755 --- a/js/components/layout/document-entry.reel/document-entry.js +++ b/js/components/layout/document-entry.reel/document-entry.js @@ -101,7 +101,7 @@ exports.DocumentEntry = Montage.create(Component, { this.application.ninja.documentController.closeDocument(this._uuid); } else { if(!this._document.isActive) { - this.application.ninja.stage.stageView.switchCodeView(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); + this.application.ninja.stage.stageView.switchDocument(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); } } } -- cgit v1.2.3 From 272c5f74f4ce76fec9cbe360817bf23639307d3a Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Sun, 5 Feb 2012 19:20:37 -0800 Subject: changes to show document dirty indicator on editing code view, and to remove dirty indicator on save. Signed-off-by: Ananya Sen --- .../layout/document-entry.reel/document-entry.css | 1 + .../layout/document-entry.reel/document-entry.js | 23 ++++++++++++++++++++++ .../layout/documents-tab.reel/documents-tab.html | 5 +++++ 3 files changed, 29 insertions(+) (limited to 'js/components/layout') diff --git a/js/components/layout/document-entry.reel/document-entry.css b/js/components/layout/document-entry.reel/document-entry.css index ce173cd6..52d08d72 100755 --- a/js/components/layout/document-entry.reel/document-entry.css +++ b/js/components/layout/document-entry.reel/document-entry.css @@ -35,4 +35,5 @@ .documentEntry span.dirty:before{ content: "*"; + display:inline; } diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js index 2a33548a..a1bed79b 100755 --- a/js/components/layout/document-entry.reel/document-entry.js +++ b/js/components/layout/document-entry.reel/document-entry.js @@ -77,6 +77,23 @@ exports.DocumentEntry = Montage.create(Component, { } }, + _dirtyFlag:{ + enumerable:false, + value:false + }, + dirtyFlag:{ + get: function() { + return this._dirtyFlag; + }, + set: function(value) { + var previousValue = this._dirtyFlag; + this._dirtyFlag = value; + + if (previousValue !== this._dirtyFlag) { + this.needsDraw = true; + } + } + }, prepareForDraw: { enumerable: false, @@ -92,6 +109,12 @@ exports.DocumentEntry = Montage.create(Component, { this.label.innerText = this._name ? this._name : ""; this._active ? this.element.classList.add("activeTab") : this.element.classList.remove("activeTab"); + + if(this.dirtyFlag === true){ + if(!this.label.classList.contains("dirty")){this.label.classList.add("dirty");} + }else{ + if(this.label.classList.contains("dirty")){this.label.classList.remove("dirty");} + } } }, diff --git a/js/components/layout/documents-tab.reel/documents-tab.html b/js/components/layout/documents-tab.reel/documents-tab.html index 94b2e46e..82ba8782 100755 --- a/js/components/layout/documents-tab.reel/documents-tab.html +++ b/js/components/layout/documents-tab.reel/documents-tab.html @@ -38,6 +38,11 @@ "boundObjectPropertyPath": "objectAtCurrentIteration.name", "oneway": true }, + "dirtyFlag": { + "boundObject": {"@": "repetition1"}, + "boundObjectPropertyPath": "objectAtCurrentIteration.dirtyFlag", + "oneway": true + }, "active": { "boundObject": {"@": "repetition1"}, "boundObjectPropertyPath": "objectAtCurrentIteration.isActive", -- cgit v1.2.3 From 36b2e540f06cef3887e7d0fea60527fee51e2a40 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Wed, 8 Feb 2012 15:36:53 -0800 Subject: fixed undo/redo for each code view document, changed new file integration with io mediator Signed-off-by: Ananya Sen --- js/components/layout/document-bar.reel/document-bar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/components/layout') diff --git a/js/components/layout/document-bar.reel/document-bar.js b/js/components/layout/document-bar.reel/document-bar.js index 44f65804..ea5e3280 100755 --- a/js/components/layout/document-bar.reel/document-bar.js +++ b/js/components/layout/document-bar.reel/document-bar.js @@ -95,7 +95,7 @@ exports.DocumentBar = Montage.create(Component, { if(event._event.target.id === this.currentView) return; this.currentView = event._event.target.id; - this.application.ninja.documentController.switchViews(event._event.target.id);//switch between design view + this.application.ninja.documentController.stage.stageView.switchViews(event._event.target.id);//switch between design view } }, -- cgit v1.2.3