diff options
author | Kruti Shah | 2012-05-31 10:44:45 -0700 |
---|---|---|
committer | Kruti Shah | 2012-05-31 10:44:45 -0700 |
commit | c350cc1c060fdf17357ddadce024267943784593 (patch) | |
tree | 453f86e88f1ee1dfda6fb4b7cc7b17e306e39536 /js/components/layout | |
parent | fdc4f5c7f81ae3b9adeca2232e60268b4be594a2 (diff) | |
parent | 121d0e616f48aa7cd048763554089c20a1883d7a (diff) | |
download | ninja-c350cc1c060fdf17357ddadce024267943784593.tar.gz |
Merge branch 'refs/heads/TimelineUberjd' into TimelineUber
Conflicts:
js/panels/Timeline/Layer.reel/Layer.js
Signed-off-by: Kruti Shah <kruti.shah@motorola.com>
Diffstat (limited to 'js/components/layout')
9 files changed, 38 insertions, 136 deletions
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.html b/js/components/layout/bread-crumb.reel/bread-crumb.html index ae3e2022..0dabc781 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.html +++ b/js/components/layout/bread-crumb.reel/bread-crumb.html | |||
@@ -32,30 +32,23 @@ | |||
32 | } | 32 | } |
33 | ], | 33 | ], |
34 | "bindings": { | 34 | "bindings": { |
35 | "label": { | 35 | "label": {"<-": "@buttonsList.objectAtCurrentIteration.label"}, |
36 | "boundObject": {"@": "repetition1"}, | 36 | "value": {"<-": "@buttonsList.objectAtCurrentIteration.nodeUuid"} |
37 | "boundObjectPropertyPath": "objectAtCurrentIteration.label", | 37 | } |
38 | "oneway": true | 38 | }, |
39 | }, | 39 | |
40 | "value": { | 40 | "buttonsListController": { |
41 | "boundObject": {"@": "repetition1"}, | 41 | "prototype": "montage/ui/controller/array-controller", |
42 | "boundObjectPropertyPath": "objectAtCurrentIteration.nodeUuid", | 42 | "bindings": { |
43 | "oneway": true | 43 | "content": {"<<->": "@owner.containerElements"} |
44 | } | ||
45 | } | 44 | } |
46 | }, | 45 | }, |
47 | 46 | ||
48 | "repetition1": { | 47 | "buttonsList": { |
49 | "prototype": "montage/ui/repetition.reel", | 48 | "prototype": "montage/ui/repetition.reel", |
50 | "properties": { | 49 | "properties": { |
51 | "element": {"#": "breadcrumb_container"} | 50 | "element": {"#": "breadcrumb_container"}, |
52 | }, | 51 | "contentController": {"@": "buttonsListController"} |
53 | "bindings": { | ||
54 | "objects": { | ||
55 | "boundObject": {"@": "owner"}, | ||
56 | "boundObjectPropertyPath": "containerElements", | ||
57 | "oneway": true | ||
58 | } | ||
59 | } | 52 | } |
60 | }, | 53 | }, |
61 | 54 | ||
@@ -65,11 +58,7 @@ | |||
65 | "element": {"#": "disabledCondition"} | 58 | "element": {"#": "disabledCondition"} |
66 | }, | 59 | }, |
67 | "bindings": { | 60 | "bindings": { |
68 | "condition": { | 61 | "condition": {"<-": "@owner.disabled"} |
69 | "boundObject": {"@": "owner"}, | ||
70 | "boundObjectPropertyPath": "disabled", | ||
71 | "oneway": true | ||
72 | } | ||
73 | } | 62 | } |
74 | } | 63 | } |
75 | } | 64 | } |
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index c1b021a3..49dbe3cb 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js | |||
@@ -21,9 +21,9 @@ exports.Breadcrumb = Montage.create(Component, { | |||
21 | 21 | ||
22 | handleCloseDocument: { | 22 | handleCloseDocument: { |
23 | value: function(){ | 23 | value: function(){ |
24 | if(!this.application.ninja.documentController.activeDocument) { | 24 | if(!this.application.ninja.documentController.activeDocument && this.application.ninja.currentDocument.currentView !== "code") { |
25 | this.disabled = true; | 25 | this.disabled = true; |
26 | this.application.ninja.currentSelectedContainer = (this.application.ninja.currentDocument ? this.application.ninja.currentDocument.documentRoot : null); | 26 | this.application.ninja.currentSelectedContainer = (this.application.ninja.currentDocument ? this.application.ninja.currentDocument.model.documentRoot : null); |
27 | } | 27 | } |
28 | } | 28 | } |
29 | }, | 29 | }, |
@@ -60,30 +60,18 @@ exports.Breadcrumb = Montage.create(Component, { | |||
60 | value: function() { | 60 | value: function() { |
61 | var parentNode; | 61 | var parentNode; |
62 | 62 | ||
63 | this.containerElements.length = 0; | 63 | // delete this.containerElements; |
64 | this.containerElements = []; | ||
64 | 65 | ||
65 | parentNode = this.container; | 66 | parentNode = this.container; |
66 | 67 | ||
67 | // This is for the old template support. | 68 | while(parentNode !== this.application.ninja.currentDocument.model.documentRoot) { |
68 | // TODO: Remove marker for old template: NINJA-STAGE-REWORK | ||
69 | if(this.application.ninja.currentDocument.documentRoot.id === "UserContent") { | ||
70 | while(parentNode.id !== "UserContent") { | ||
71 | this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); | ||
72 | parentNode = parentNode.parentNode; | ||
73 | } | ||
74 | |||
75 | // This is always the top container which is now hardcoded to body | ||
76 | this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": "Body"}); | ||
77 | } else { | ||
78 | while(parentNode !== this.application.ninja.currentDocument.documentRoot) { | ||
79 | this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); | ||
80 | parentNode = parentNode.parentNode; | ||
81 | } | ||
82 | |||
83 | // This is always the top container which is now hardcoded to body | ||
84 | this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); | 69 | this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); |
70 | parentNode = parentNode.parentNode; | ||
85 | } | 71 | } |
86 | 72 | ||
73 | // This is always the top container which is now hardcoded to body | ||
74 | this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": parentNode.nodeName}); | ||
87 | } | 75 | } |
88 | }, | 76 | }, |
89 | 77 | ||
diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js index 9e4110e2..50b3624c 100755 --- a/js/components/layout/document-entry.reel/document-entry.js +++ b/js/components/layout/document-entry.reel/document-entry.js | |||
@@ -7,8 +7,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
7 | var Montage = require("montage/core/core").Montage; | 7 | var Montage = require("montage/core/core").Montage; |
8 | var Component = require("montage/ui/component").Component; | 8 | var Component = require("montage/ui/component").Component; |
9 | 9 | ||
10 | //var documentManagerModule = ("js/document/documentManager"); | ||
11 | |||
12 | exports.DocumentEntry = Montage.create(Component, { | 10 | exports.DocumentEntry = Montage.create(Component, { |
13 | 11 | ||
14 | dirty: { value: null }, | 12 | dirty: { value: null }, |
@@ -35,8 +33,10 @@ exports.DocumentEntry = Montage.create(Component, { | |||
35 | } | 33 | } |
36 | 34 | ||
37 | this._document = value; | 35 | this._document = value; |
38 | this._uuid = value.uuid; | 36 | |
39 | //this.needsDraw = true; | 37 | if(value) { |
38 | this._uuid = value.uuid; | ||
39 | } | ||
40 | } | 40 | } |
41 | }, | 41 | }, |
42 | 42 | ||
@@ -119,10 +119,10 @@ exports.DocumentEntry = Montage.create(Component, { | |||
119 | handleClick: { | 119 | handleClick: { |
120 | value: function(event) { | 120 | value: function(event) { |
121 | if(event._event.target.nodeName === "IMG") { | 121 | if(event._event.target.nodeName === "IMG") { |
122 | this.application.ninja.documentController.closeDocument(this._uuid); | 122 | this.application.ninja.documentController.closeFile(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); |
123 | } else { | 123 | } else { |
124 | if(!this._document.isActive) { | 124 | if(!this.active) { |
125 | this.application.ninja.stage.stageView.switchDocument(this.application.ninja.documentController._findDocumentByUUID(this._uuid)); | 125 | this.application.ninja.documentController.switchDocuments(this.application.ninja.currentDocument, this.application.ninja.documentController._findDocumentByUUID(this._uuid)); |
126 | } | 126 | } |
127 | } | 127 | } |
128 | } | 128 | } |
diff --git a/js/components/layout/documents-tab.reel/documents-tab.html b/js/components/layout/documents-tab.reel/documents-tab.html index 4aed23d9..304c8871 100755 --- a/js/components/layout/documents-tab.reel/documents-tab.html +++ b/js/components/layout/documents-tab.reel/documents-tab.html | |||
@@ -26,26 +26,10 @@ | |||
26 | "element": {"#": "document"} | 26 | "element": {"#": "document"} |
27 | }, | 27 | }, |
28 | "bindings": { | 28 | "bindings": { |
29 | "document": { | 29 | "document": {"<-": "@repetition1.objectAtCurrentIteration"}, |
30 | "boundObject": {"@": "repetition1"}, | 30 | "name": {"<-": "@repetition1.objectAtCurrentIteration.model.file.name"}, |
31 | "boundObjectPropertyPath": "objectAtCurrentIteration", | 31 | "saveFlag": {"<-": "@repetition1.objectAtCurrentIteration.model.needsSave"}, |
32 | "oneway": true | 32 | "active": {"<-": "@repetition1.objectAtCurrentIteration.model.isActive"} |
33 | }, | ||
34 | "name": { | ||
35 | "boundObject": {"@": "repetition1"}, | ||
36 | "boundObjectPropertyPath": "objectAtCurrentIteration.name", | ||
37 | "oneway": true | ||
38 | }, | ||
39 | "saveFlag": { | ||
40 | "boundObject": {"@": "repetition1"}, | ||
41 | "boundObjectPropertyPath": "objectAtCurrentIteration.needsSave", | ||
42 | "oneway": true | ||