From fbdfb46071c5f1c081f3703ddf35ef009decf167 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Mon, 21 May 2012 09:39:11 -0700 Subject: Style sheet - Added disabled style to sheet item --- js/panels/css-panel/style-sheet.reel/style-sheet.css | 4 ++++ js/panels/css-panel/style-sheet.reel/style-sheet.js | 7 +++++++ 2 files changed, 11 insertions(+) (limited to 'js/panels') diff --git a/js/panels/css-panel/style-sheet.reel/style-sheet.css b/js/panels/css-panel/style-sheet.reel/style-sheet.css index 2e72cd9c..44de29eb 100644 --- a/js/panels/css-panel/style-sheet.reel/style-sheet.css +++ b/js/panels/css-panel/style-sheet.reel/style-sheet.css @@ -136,6 +136,10 @@ color: #A33939; } +.ss-disabled { + opacity: .65; +} + .ss-invisible { display: none; } \ No newline at end of file diff --git a/js/panels/css-panel/style-sheet.reel/style-sheet.js b/js/panels/css-panel/style-sheet.reel/style-sheet.js index 7afe977f..98e20b2c 100644 --- a/js/panels/css-panel/style-sheet.reel/style-sheet.js +++ b/js/panels/css-panel/style-sheet.reel/style-sheet.js @@ -55,6 +55,12 @@ exports.StyleSheet = Montage.create(Component, { this.nameText.element.classList.remove('ss-dirty'); } + if(this.disabled) { + this.element.classList.add('ss-disabled'); + } else { + this.element.classList.remove('ss-disabled'); + } + } }, @@ -182,6 +188,7 @@ exports.StyleSheet = Montage.create(Component, { this.disableButton.label = label; this._disabled = disable; + this.needsDraw = true; } }, -- cgit v1.2.3