aboutsummaryrefslogtreecommitdiff
path: root/js/components/toolbar.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/components/toolbar.reel')
-rw-r--r--js/components/toolbar.reel/toolbar.html24
-rw-r--r--js/components/toolbar.reel/toolbar.js20
2 files changed, 20 insertions, 24 deletions
diff --git a/js/components/toolbar.reel/toolbar.html b/js/components/toolbar.reel/toolbar.html
index b33c4665..d2c5972a 100644
--- a/js/components/toolbar.reel/toolbar.html
+++ b/js/components/toolbar.reel/toolbar.html
@@ -25,12 +25,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
25 "element": {"#": "repetition"} 25 "element": {"#": "repetition"}
26 }, 26 },
27 "bindings": { 27 "bindings": {
28 "objects" : { 28 "objects": {"<-": "@owner.buttons"}
29 "boundObject": {"@": "owner"},
30 "boundObjectPropertyPath": "buttons",
31 "oneway": true
32 }
33
34 } 29 }
35 }, 30 },
36 31
@@ -41,21 +36,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
41 "label": " " 36 "label": " "
42 }, 37 },
43 "bindings": { 38 "bindings": {
44 "label" : { 39 "label": {"<-": "@buttonList.objectAtCurrentIteration.title"},
45 "boundObject": {"@": "buttonList"}, 40 "sourceObject": {"<-": "@buttonList.objectAtCurrentIteration"}
46 "boundObjectPropertyPath": "objectAtCurrentIteration.title",
47 "oneway": true
48 },
49 "identifier": {
50 "boundObject": {"@": "buttonList"},
51 "boundObjectPropertyPath": "objectAtCurrentIteration.identifier",
52 "oneway": true
53 },
54 "sourceObject": {
55 "boundObject": {"@": "buttonList"},
56 "boundObjectPropertyPath": "objectAtCurrentIteration",
57 "oneway": true
58 }
59 } 41 }
60 } 42 }
61 } 43 }
diff --git a/js/components/toolbar.reel/toolbar.js b/js/components/toolbar.reel/toolbar.js
index 8f93aa2b..2ccdb2c5 100644
--- a/js/components/toolbar.reel/toolbar.js
+++ b/js/components/toolbar.reel/toolbar.js
@@ -11,17 +11,31 @@ exports.Toolbar = Montage.create(Component, {
11 _needsButtonProperties : { 11 _needsButtonProperties : {
12 value: null 12 value: null
13 }, 13 },
14 _sourceObject : {
15 value: null
16 },
17 sourceObject : {
18 get: function() {
19 return this._sourceObject;
20 },
21 set: function(value) {
22 if(value === this._sourceObject) { return; }
23 this._sourceObject = value;
24 },
25 serializable: true
26 },
14 leftAlignClass : { value: "left-button" }, 27 leftAlignClass : { value: "left-button" },
15 hideButtonClass : { value: "hide-button" }, 28 hideButtonClass : { value: "hide-button" },
16 _buttons : { value: null }, 29 _buttons : { value: [], distinct: true },
17 buttons : { 30 buttons : {
18 get: function() { 31 get: function() {
19 return this._buttons; 32 return this._buttons;
20 }, 33 },
21 set: function(btns) { 34 set: function(btns) {
22 this._buttons = btns; 35 this._buttons = btns;
23 this._needsButtonProperties = this.needsDraw = true;; 36 this._needsButtonProperties = this.needsDraw = true;
24 } 37 },
38 serializable: true
25 }, 39 },
26 40
27 _buttonToHide : { 41 _buttonToHide : {