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 --- 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 3 files changed, 0 insertions(+), 0 deletions(-) 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 (limited to 'js/components/layout/bread-crumb.reel') 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 -- 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/bread-crumb.reel') 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 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 --- .../layout/bread-crumb.reel/bread-crumb.js | 112 ++++++--------------- 1 file changed, 30 insertions(+), 82 deletions(-) (limited to 'js/components/layout/bread-crumb.reel') 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 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/bread-crumb.reel') 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/bread-crumb.reel') 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