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/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 +- 3 files changed, 1 insertion(+), 1 deletion(-) 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 (limited to 'js/components/layout/tool-button.reel') 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() { -- 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 ++++++--------------- 2 files changed, 8 insertions(+), 20 deletions(-) (limited to 'js/components/layout/tool-button.reel') 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"); } } }, -- cgit v1.2.3