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 cf2f83be020d7d14f22177e0841472927d2fbcd7 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Mon, 6 Feb 2012 14:07:11 -0800 Subject: Integrate breadcrumb component and layer handling code Signed-off-by: Jonathan Duran --- .../layout/bread-crumb.reel/bread-crumb.js | 108 +++++++++++++++------ 1 file changed, 77 insertions(+), 31 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index 9782d9d1..ead7c764 100644 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js @@ -1,13 +1,8 @@ -/* - This file contains proprietary software owned by Motorola Mobility, Inc.
- No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
- (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. -
*/ -var Montage = require("montage/core/core").Montage, - Component = require("montage/ui/component").Component; +var Montage = require("montage/core/core").Montage +var Component = require("montage/ui/component").Component -exports.Breadcrumb = Montage.create(Component, { +var Breadcrumb = exports.Breadcrumb = Montage.create(Component, { _container:{ value:null @@ -16,10 +11,12 @@ exports.Breadcrumb = Montage.create(Component, { container: { set: function(value) { - if(this._container !== value) { - this._container = value; - this.createContainerElements(); - } + if(this._container !== value) { + this._container = value; + this.createContainerElements(); + } + + }, get: function() { return this._container; @@ -28,83 +25,132 @@ exports.Breadcrumb = Montage.create(Component, { containerElements: { value: [] + }, + deserializedFromTemplate : { value: function() { this.eventManager.addEventListener( "appLoaded", this, false); - this.eventManager.addEventListener( "openDocument", this, false); this.eventManager.addEventListener( "breadCrumbTrail", this, false); - } + }, + enumerable : false }, handleAppLoaded : { value: function() { + Object.defineBinding(this, "container", { boundObject: this.application.ninja, boundObjectPropertyPath: "currentSelectedContainer", oneway: false }); + + } + }, + + prepareForDraw: { + value: function() { + + } + }, + + draw: { + value: function() { + + } + }, + + didDraw:{ + value:function(){ } }, createContainerElements: { value: function() { + var parentNode; while(this.containerElements.pop()){ // To empty the array to get the new parentNode of the new currentLevel } - if(this.container.id === "UserContent") { + if(this.container.id === "UserContent"){ + this.containerElements.push({selected:false,element:this.container}); - } else { - parentNode = this.container; - while(parentNode.id !== "UserContent") { + } + else{ + + parentNode= this.container; + + while(parentNode.id!=="UserContent"){ + this.containerElements.unshift ({selected:false,element:parentNode}); - parentNode = parentNode.parentNode; + parentNode=parentNode.parentNode; + } - this.containerElements.unshift({selected:false,element:parentNode}); + this.containerElements.unshift({selected:false,element:parentNode}); } - NJevent('layerBinding',this.container); + NJevent('layerBinding',{selected:false ,element:this.container}) + + } }, - handleBreadCrumbTrail: { + handleBreadCrumbTrail: { value: function(event) { - var newLength, revaluatedLength, tmpvalue, i=0; + + var newLength,revaluatedLength,tmpvalue + var i=0; + if(event.detail.setFlag){ + this.application.ninja.currentSelectedContainer = event.detail.element; + return; + } newLength = this.containerElements.length; - while(i < newLength ) { - if(this.containerElements[i].selected){ - tmpvalue = i ; - break; - } + while(i < newLength ){ + + if(this.containerElements[i].selected){ + + tmpvalue = i ; + break; + + } i++; } - for(i = newLength -1 ; i >= 1 ; i--) { - if(tmpvalue!==i) { + + + for(i = newLength -1 ; i >= 1 ; i--){ + + if(tmpvalue!==i){ + this.containerElements.pop(); - } else { + } + + else{ + break; } + } revaluatedLength = this.containerElements.length; this.application.ninja.currentSelectedContainer = this.containerElements[revaluatedLength-1].element; + } } }); + -- 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 From bb4da39a73cbd6fbe83f3b7c9ed5ae60fe58dd6b Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Wed, 15 Feb 2012 14:23:19 -0800 Subject: Tool Icons : New layout Signed-off-by: Armen Kesablyan --- .../layout/tool-button.reel/tool-button.html | 7 ++----- .../layout/tool-button.reel/tool-button.js | 21 ++++++--------------- .../layout/tools-list.reel/tools-list.html | 17 ++++++++++++++++- 3 files changed, 24 insertions(+), 21 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/tool-button.reel/tool-button.html b/js/components/layout/tool-button.reel/tool-button.html index 81a9b927..476b66f3 100644 --- a/js/components/layout/tool-button.reel/tool-button.html +++ b/js/components/layout/tool-button.reel/tool-button.html @@ -16,8 +16,7 @@ "module": "js/components/layout/tool-button.reel", "name": "ToolButton", "properties": { - "element": {"#": "buttonBackground"}, - "button": {"#": "toolBarButton"} + "element": {"#": "toolBarButton"} } } } @@ -27,9 +26,7 @@ -
-
-
+
diff --git a/js/components/layout/tool-button.reel/tool-button.js b/js/components/layout/tool-button.reel/tool-button.js index 509512d0..5cb0e7fc 100644 --- a/js/components/layout/tool-button.reel/tool-button.js +++ b/js/components/layout/tool-button.reel/tool-button.js @@ -11,8 +11,6 @@ var defaultEventManager = require("montage/core/event/event-manager").defaultEve exports.ToolButton = Montage.create(Component, { - button: { value: null }, - data: { value: null }, _selected: { value: null }, @@ -64,32 +62,25 @@ exports.ToolButton = Montage.create(Component, { oneway: true }); } + + this.element.classList.add(this.data.id) } }, draw: { enumerable: false, value: function() { - var buttonid; - if(this.data.container) { - buttonid = this.data.subtools[this._subselected].id; this.element.title = this.data.subtools[this._subselected].toolTip; - this.button.classList.remove( this.data.subtools[this._currentSubSelected].id + "Unpressed" ); - this.button.classList.remove( this.data.subtools[this._currentSubSelected].id + "Pressed" ); + this.element.classList.remove(this.data.subtools[this._currentSubSelected].id); + this.element.classList.add(this.data.subtools[this._subselected].id); this._currentSubSelected = this._subselected; - } else { - buttonid = this.data.id; } if(this._selected) { - this.element.classList.add( "buttonSelected" ); - this.button.classList.remove( buttonid + "Unpressed" ); - this.button.classList.add( buttonid + "Pressed" ); + this.element.classList.add("active"); } else { - this.element.classList.remove( "buttonSelected" ); - this.button.classList.remove( buttonid + "Pressed" ); - this.button.classList.add( buttonid + "Unpressed" ); + this.element.classList.remove("active"); } } }, diff --git a/js/components/layout/tools-list.reel/tools-list.html b/js/components/layout/tools-list.reel/tools-list.html index e12fd59b..c47359bf 100644 --- a/js/components/layout/tools-list.reel/tools-list.html +++ b/js/components/layout/tools-list.reel/tools-list.html @@ -25,6 +25,21 @@ } }, + "groupLine": { + "module": "js/components/layout/tool-button.reel", + "name": "ToolButton", + "properties": { + "element": {"#": "groupLine"} + }, + "bindings": { + "data": { + "boundObject": {"@": "repetition1"}, + "boundObjectPropertyPath": "objectAtCurrentIteration", + "oneway": true + } + } + }, + "repetition1": { "module": "montage/ui/repetition.reel", "name": "Repetition", @@ -163,9 +178,9 @@
+
-
-- cgit v1.2.3 From 92873714dd6ffb259e6c5a27da2ade773d7b00f9 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Wed, 15 Feb 2012 15:04:37 -0800 Subject: New Icons: Last set had imperfections Signed-off-by: Armen Kesablyan --- js/components/layout/tools-list.reel/tools-list.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/tools-list.reel/tools-list.html b/js/components/layout/tools-list.reel/tools-list.html index c47359bf..2c5617e5 100644 --- a/js/components/layout/tools-list.reel/tools-list.html +++ b/js/components/layout/tools-list.reel/tools-list.html @@ -26,15 +26,15 @@ }, "groupLine": { - "module": "js/components/layout/tool-button.reel", - "name": "ToolButton", + "module": "montage/ui/condition.reel", + "name": "Condition", "properties": { "element": {"#": "groupLine"} }, "bindings": { - "data": { + "condition": { "boundObject": {"@": "repetition1"}, - "boundObjectPropertyPath": "objectAtCurrentIteration", + "boundObjectPropertyPath": "objectAtCurrentIteration.lastInGroup", "oneway": true } } @@ -178,7 +178,9 @@
-
+
+
+
-- cgit v1.2.3 From 7e08bdbd9db21880783b56a31b480ba33f3b5327 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Thu, 16 Feb 2012 11:33:18 -0800 Subject: Tool Button Fixes Signed-off-by: Armen Kesablyan --- js/components/layout/subtool-button.reel/subtool-button.html | 7 ++----- js/components/layout/subtool-button.reel/subtool-button.js | 10 +++------- 2 files changed, 5 insertions(+), 12 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/subtool-button.reel/subtool-button.html b/js/components/layout/subtool-button.reel/subtool-button.html index 9dad007d..24fce57c 100644 --- a/js/components/layout/subtool-button.reel/subtool-button.html +++ b/js/components/layout/subtool-button.reel/subtool-button.html @@ -16,8 +16,7 @@ "module": "js/components/layout/subtool-button.reel", "name": "SubToolButton", "properties": { - "element": {"#": "buttonBackground"}, - "button": {"#": "toolBarButton"} + "element": {"#": "toolButton"} } } } @@ -26,9 +25,7 @@ -
-
-
+
diff --git a/js/components/layout/subtool-button.reel/subtool-button.js b/js/components/layout/subtool-button.reel/subtool-button.js index d1adca43..2b066f24 100644 --- a/js/components/layout/subtool-button.reel/subtool-button.js +++ b/js/components/layout/subtool-button.reel/subtool-button.js @@ -35,7 +35,7 @@ exports.SubToolButton = Montage.create(Component, { boundObjectPropertyPath: "selected", oneway: false }); - + this.element.classList.add(this.data.id); } }, @@ -43,13 +43,9 @@ exports.SubToolButton = Montage.create(Component, { enumerable: false, value: function() { if(this._selected) { - this.element.classList.add( "buttonSelected" ); - this.button.classList.remove( this.data.id + "Unpressed" ); - this.button.classList.add( this.data.id + "Pressed" ); + this.element.classList.add("active"); } else { - this.element.classList.remove( "buttonSelected" ); - this.button.classList.remove( this.data.id + "Pressed" ); - this.button.classList.add( this.data.id + "Unpressed" ); + this.element.classList.remove("active"); } } }, -- cgit v1.2.3 From 9d17dc8dab12aa661ab321567f024406f4972abb Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Mon, 20 Feb 2012 15:34:14 -0800 Subject: cleanup of the breadcrumb Signed-off-by: Valerio Virgillito --- .../bread-crumb-button.reel/bread-crumb-button.js | 35 +++---- .../layout/bread-crumb.reel/bread-crumb.js | 112 ++++++--------------- 2 files changed, 44 insertions(+), 103 deletions(-) (limited to 'js/components/layout') 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 index 65e5b7c8..3f5b87e1 100755 --- a/js/components/layout/bread-crumb-button.reel/bread-crumb-button.js +++ b/js/components/layout/bread-crumb-button.reel/bread-crumb-button.js @@ -7,45 +7,38 @@ var Montage = require("montage/core/core").Montage; var Component = require("montage/ui/component").Component; - exports.BreadcrumbButton = Montage.create(Component, { - button: { value: null }, + button: { + value: null + }, - data: { value: null }, + data: { + value: null + }, prepareForDraw: { - enumerable: false, value: function() { this.element.addEventListener("mousedown", this, false); } }, draw: { - enumerable: false, value: function() { - - if(this.data.element.id==="UserContent"){ - - this.button.innerHTML = "Body"; - } - - else{ - this.button.innerHTML=this.data.element.nodeName; - } - + if(this.data.element.id === "UserContent") { + this.button.innerHTML = "Body"; + } else { + this.button.innerHTML = this.data.element.nodeName; + } } }, handleMousedown: { value: function(event) { - if(event.which===1){ - - this.data.selected=true; - NJevent('breadCrumbTrail',this.data); - this.data.selected=false; - } + //this.data.selected=true; + NJevent('breadCrumbTrail',this.data); + //this.data.selected=false; } } diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index ead7c764..1290aaac 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js @@ -1,6 +1,6 @@ -var Montage = require("montage/core/core").Montage -var Component = require("montage/ui/component").Component +var Montage = require("montage/core/core").Montage, + Component = require("montage/ui/component").Component; var Breadcrumb = exports.Breadcrumb = Montage.create(Component, { @@ -8,15 +8,12 @@ var Breadcrumb = exports.Breadcrumb = Montage.create(Component, { value:null }, - container: { set: function(value) { - if(this._container !== value) { - this._container = value; - this.createContainerElements(); - } - - + if(this._container !== value) { + this._container = value; + this.createContainerElements(); + } }, get: function() { return this._container; @@ -25,7 +22,6 @@ var Breadcrumb = exports.Breadcrumb = Montage.create(Component, { containerElements: { value: [] - }, @@ -33,14 +29,12 @@ var Breadcrumb = exports.Breadcrumb = Montage.create(Component, { value: function() { this.eventManager.addEventListener( "appLoaded", this, false); this.eventManager.addEventListener( "breadCrumbTrail", this, false); - }, - enumerable : false + } }, handleAppLoaded : { value: function() { - Object.defineBinding(this, "container", { boundObject: this.application.ninja, boundObjectPropertyPath: "currentSelectedContainer", @@ -50,107 +44,61 @@ var Breadcrumb = exports.Breadcrumb = Montage.create(Component, { } }, - prepareForDraw: { - value: function() { - - } - }, - - draw: { - value: function() { - - } - }, - - didDraw:{ - value:function(){ - } - }, - createContainerElements: { value: function() { - var parentNode; - while(this.containerElements.pop()){ - // To empty the array to get the new parentNode of the new currentLevel - } - - if(this.container.id === "UserContent"){ - - this.containerElements.push({selected:false,element:this.container}); - + this.containerElements.length = 0 - } - else{ - - parentNode= this.container; - - while(parentNode.id!=="UserContent"){ - - this.containerElements.unshift ({selected:false,element:parentNode}); - parentNode=parentNode.parentNode; + if(this.container.id === "UserContent") { + this.containerElements.push({selected:false, element:this.container}); + } else { + parentNode = this.container; - } - - this.containerElements.unshift({selected:false,element:parentNode}); + while(parentNode.id!=="UserContent") { + this.containerElements.unshift({selected:false,element:parentNode}); + parentNode = parentNode.parentNode; + } + this.containerElements.unshift({selected:false,element:parentNode}); } NJevent('layerBinding',{selected:false ,element:this.container}) - - } }, - - handleBreadCrumbTrail: { + handleBreadCrumbTrail: { value: function(event) { + var newLength,revaluatedLength,tmpvalue; + var i=0; - var newLength,revaluatedLength,tmpvalue - var i=0; - if(event.detail.setFlag){ - this.application.ninja.currentSelectedContainer = event.detail.element; - return; + if(event.detail.setFlag ){ + this.application.ninja.currentSelectedContainer = event.detail.element; + return; } newLength = this.containerElements.length; while(i < newLength ){ - - if(this.containerElements[i].selected){ - - tmpvalue = i ; - break; - - } - + if(this.containerElements[i].selected){ + tmpvalue = i; + break; + } i++; } - - - for(i = newLength -1 ; i >= 1 ; i--){ - - if(tmpvalue!==i){ - + for(i = newLength -1 ; i >= 1 ; i--) { + if(tmpvalue !== i) { this.containerElements.pop(); - } - - else{ - + } else { break; } - } revaluatedLength = this.containerElements.length; this.application.ninja.currentSelectedContainer = this.containerElements[revaluatedLength-1].element; - } } - - }); -- cgit v1.2.3 From b1daf0b285a4a96bfd0086709c20e3682d75551a Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 21 Feb 2012 14:32:17 -0800 Subject: fixing the dirty flag and removing sass changes Signed-off-by: Valerio Virgillito --- .../layout/document-entry.reel/document-entry.html | 1 - .../layout/document-entry.reel/document-entry.js | 24 ++++++++++------------ .../layout/documents-tab.reel/documents-tab.html | 4 ++-- 3 files changed, 13 insertions(+), 16 deletions(-) (limited to 'js/components/layout') diff --git a/js/components/layout/document-entry.reel/document-entry.html b/js/components/layout/document-entry.reel/document-entry.html index ba17449a..1cf01737 100755 --- a/js/components/layout/document-entry.reel/document-entry.html +++ b/js/components/layout/document-entry.reel/document-entry.html @@ -26,7 +26,6 @@
  • -
  • diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js index a1bed79b..9e4110e2 100755 --- a/js/components/layout/document-entry.reel/document-entry.js +++ b/js/components/layout/document-entry.reel/document-entry.js @@ -77,19 +77,17 @@ exports.DocumentEntry = Montage.create(Component, { } }, - _dirtyFlag:{ - enumerable:false, - value:false + _saveFlag: { + value: false }, - dirtyFlag:{ + + saveFlag: { get: function() { - return this._dirtyFlag; + return this._saveFlag; }, set: function(value) { - var previousValue = this._dirtyFlag; - this._dirtyFlag = value; - - if (previousValue !== this._dirtyFlag) { + if(this._saveFlag !== value) { + this._saveFlag = value; this.needsDraw = true; } } @@ -110,10 +108,10 @@ exports.DocumentEntry = Montage.create(Component, { 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");} + if(this.saveFlag) { + this.label.classList.add("dirty"); + } else { + 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 82ba8782..737dfbcb 100755 --- a/js/components/layout/documents-tab.reel/documents-tab.html +++ b/js/components/layout/documents-tab.reel/documents-tab.html @@ -38,9 +38,9 @@ "boundObjectPropertyPath": "objectAtCurrentIteration.name", "oneway": true }, - "dirtyFlag": { + "saveFlag": { "boundObject": {"@": "repetition1"}, - "boundObjectPropertyPath": "objectAtCurrentIteration.dirtyFlag", + "boundObjectPropertyPath": "objectAtCurrentIteration.needsSave", "oneway": true }, "active": { -- cgit v1.2.3 From cc295dd0fb873505eed01c232bd987cf6e2dcdd9 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 23 Feb 2012 01:04:12 -0800 Subject: Fixing the breadcrumb button - removing toolbutton class since it is not a tool button Signed-off-by: Valerio Virgillito --- js/components/layout/bread-crumb.reel/bread-crumb.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/components/layout') diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.html b/js/components/layout/bread-crumb.reel/bread-crumb.html index 67328479..c1b9ed61 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.html +++ b/js/components/layout/bread-crumb.reel/bread-crumb.html @@ -62,7 +62,7 @@ -- cgit v1.2.3 From 5de5dc6454fe6ca097ce4baf34768c9174a827d9 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 24 Feb 2012 10:20:04 -0800 Subject: Adding some missing copyrights Signed-off-by: Valerio Virgillito --- js/components/layout/bread-crumb.reel/bread-crumb.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'js/components/layout') diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index 1290aaac..1824c7c3 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js @@ -1,3 +1,8 @@ +/* + This file contains proprietary software owned by Motorola Mobility, Inc.
    + No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
    + (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
    */ var Montage = require("montage/core/core").Montage, Component = require("montage/ui/component").Component; -- cgit v1.2.3