[extensions-web] extensions: Don't show the configurable button for uninstalled extensions
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] extensions: Don't show the configurable button for uninstalled extensions
- Date: Mon, 9 Apr 2012 15:29:15 +0000 (UTC)
commit a7255497d6a575ca56d95242c559bad053a09d50
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Apr 9 12:28:55 2012 -0300
extensions: Don't show the configurable button for uninstalled extensions
The issue with short-circuit evaluation and fancy overloading like this.
sweettooth/static/js/extensions.js | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/sweettooth/static/js/extensions.js b/sweettooth/static/js/extensions.js
index 0567a69..ec97f44 100644
--- a/sweettooth/static/js/extensions.js
+++ b/sweettooth/static/js/extensions.js
@@ -142,7 +142,8 @@ function($, messages, dbusProxy, extensionUtils, templates) {
$elem.on('state-changed', function(e, newState) {
$elem.data('state', newState);
- $elem.toggleClass('configurable', meta.hasPrefs && newState !== ExtensionState.OUT_OF_DATE);
+ var hasPrefs = !!(meta.hasPrefs && newState !== ExtensionState.OUT_OF_DATE);
+ $elem.toggleClass('configurable', hasPrefs);
if (newState == ExtensionState.DISABLED ||
newState == ExtensionState.INITIALIZED ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]