From 84931583f1da8da29784074978f146b281b8efa3 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Wed, 7 Mar 2012 16:08:36 -0800 Subject: Disabled state for panels Signed-off-by: Armen Kesablyan --- js/panels/Panel.reel/Panel.html | 20 +++++++++++++++++--- js/panels/Panel.reel/Panel.js | 4 ++++ 2 files changed, 21 insertions(+), 3 deletions(-) (limited to 'js/panels/Panel.reel') diff --git a/js/panels/Panel.reel/Panel.html b/js/panels/Panel.reel/Panel.html index 04e2930a..43b87940 100755 --- a/js/panels/Panel.reel/Panel.html +++ b/js/panels/Panel.reel/Panel.html @@ -113,6 +113,21 @@ } }, + "disabledCondition": { + "module": "montage/ui/condition.reel", + "name": "Condition", + "properties": { + "element": {"#": "disabledCondition"} + }, + "bindings": { + "condition": { + "boundObject": {"@": "owner"}, + "boundObjectPropertyPath": "disabled", + "oneway": true + } + } + }, + "owner": { "module": "js/panels/Panel.reel", "name": "Panel", @@ -136,9 +151,8 @@
-
- -
+
+
diff --git a/js/panels/Panel.reel/Panel.js b/js/panels/Panel.reel/Panel.js index 2b308258..33f9b3a7 100755 --- a/js/panels/Panel.reel/Panel.js +++ b/js/panels/Panel.reel/Panel.js @@ -57,6 +57,10 @@ exports.Panel = Montage.create(Component, { value: null }, + disabled: { + value:false + }, + collapsed: { get: function() { return this._collapsed; -- cgit v1.2.3