diff options
author | Armen Kesablyan | 2012-05-23 14:34:58 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-05-23 14:34:58 -0700 |
commit | c21db7f1e4a0582777bdb5366df5d023a915b779 (patch) | |
tree | c4d29cb4686101d4a480ae836d20187879cf5400 /js/components/layout | |
parent | 3ed95247e9ea4b0a7833401ed6809647b7c4acbf (diff) | |
parent | 1a7e347810401e6262d9d7bad1c3583e6773993b (diff) | |
download | ninja-c21db7f1e4a0582777bdb5366df5d023a915b779.tar.gz |
Merge branch 'refs/heads/dom-architecture' into binding
Conflicts:
js/data/panels-data.js
Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/components/layout')
4 files changed, 8 insertions, 23 deletions
diff --git a/js/components/layout/document-entry.reel/document-entry.js b/js/components/layout/document-entry.reel/document-entry.js index ad0236c6..50b3624c 100755 --- a/js/components/layout/document-entry.reel/document-entry.js +++ b/js/components/layout/document-entry.reel/document-entry.js | |||
@@ -121,8 +121,8 @@ exports.DocumentEntry = Montage.create(Component, { | |||
121 | if(event._event.target.nodeName === "IMG") { | 121 | if(event._event.target.nodeName === "IMG") { |
122 | this.application.ninja.documentController.closeFile(this.application.ninja.documentController._findDocumentByUUID(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/tool-button.reel/tool-button.html b/js/components/layout/tool-button.reel/tool-button.html index 84a6d34e..a329f646 100755 --- a/js/components/layout/tool-button.reel/tool-button.html +++ b/js/components/layout/tool-button.reel/tool-button.html | |||
@@ -16,6 +16,10 @@ | |||
16 | "prototype": "js/components/layout/tool-button.reel", | 16 | "prototype": "js/components/layout/tool-button.reel", |
17 | "properties": { | 17 | "properties": { |
18 | "element": {"#": "toolBarButton"} | 18 | "element": {"#": "toolBarButton"} |
19 | }, | ||
20 | "bindings": { | ||
21 | "selected": {"<<->": "@owner.data.selected"}, | ||
22 | "subselected": {"<-": "@owner.data.subtools.selected"} | ||
19 | } | 23 | } |
20 | } | 24 | } |
21 | } | 25 | } |
diff --git a/js/components/layout/tool-button.reel/tool-button.js b/js/components/layout/tool-button.reel/tool-button.js index 6cea0dc3..6008c4ec 100755 --- a/js/components/layout/tool-button.reel/tool-button.js +++ b/js/components/layout/tool-button.reel/tool-button.js | |||
@@ -48,19 +48,8 @@ exports.ToolButton = Montage.create(Component, { | |||
48 | this.element.addEventListener("mousedown", this, false); | 48 | this.element.addEventListener("mousedown", this, false); |
49 | this.element.addEventListener("dblclick", this, false); | 49 | this.element.addEventListener("dblclick", this, false); |
50 | 50 | ||
51 | Object.defineBinding(this, "selected", { | ||
52 | boundObject: this.data, | ||
53 | boundObjectPropertyPath: "selected", | ||
54 | oneway: false | ||
55 | }); | ||
56 | |||
57 | if(this.data.container) { | 51 | if(this.data.container) { |
58 | this.element.title = this.data.subtools[this._subselected].toolTip; | 52 | this.element.title = this.data.subtools[this._subselected].toolTip; |
59 | Object.defineBinding(this, "subselected", { | ||
60 | boundObject: this.data.subtools, | ||
61 | boundObjectPropertyPath: "selected", | ||
62 | oneway: true | ||
63 | }); | ||
64 | } | 53 | } |
65 | 54 | ||
66 | this.element.classList.add(this.data.id) | 55 | this.element.classList.add(this.data.id) |
diff --git a/js/components/layout/tools-list.reel/tools-list.html b/js/components/layout/tools-list.reel/tools-list.html index cbbcace4..dec37a84 100755 --- a/js/components/layout/tools-list.reel/tools-list.html +++ b/js/components/layout/tools-list.reel/tools-list.html | |||
@@ -16,11 +16,7 @@ | |||
16 | "element": {"#": "toolbutton"} | 16 | "element": {"#": "toolbutton"} |
17 | }, | 17 | }, |
18 | "bindings": { | 18 | "bindings": { |
19 | "data": { | 19 | "data": {"<-": "@repetition1.objectAtCurrentIteration"} |
20 | "boundObject": {"@": "repetition1"}, | ||
21 | "boundObjectPropertyPath": "objectAtCurrentIteration", | ||
22 | "oneway": true | ||
23 | } | ||
24 | } | 20 | } |
25 | }, | 21 | }, |
26 | 22 | ||
@@ -30,11 +26,7 @@ | |||
30 | "element": {"#": "groupLine"} | 26 | "element": {"#": "groupLine"} |
31 | }, | 27 | }, |
32 | "bindings": { | 28 | "bindings": { |
33 | "condition": { | 29 | "condition": {"<-": "@repetition1.objectAtCurrentIteration.lastInGroup"} |
34 | "boundObject": {"@": "repetition1"}, | ||
35 | "boundObjectPropertyPath": "objectAtCurrentIteration.lastInGroup", | ||
36 | "oneway": true | ||
37 | } | ||
38 | } | 30 | } |
39 | }, | 31 | }, |
40 | 32 | ||