[extensions-web] Add the out-of-date class in a centralized location
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] Add the out-of-date class in a centralized location
- Date: Mon, 2 Apr 2012 01:43:38 +0000 (UTC)
commit 8d6d79fbdeac49281880a999881d88c6e30a034f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sun Apr 1 16:00:39 2012 -0400
Add the out-of-date class in a centralized location
sweettooth/static/js/extensions.js | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/sweettooth/static/js/extensions.js b/sweettooth/static/js/extensions.js
index 0402f5b..40e5919 100644
--- a/sweettooth/static/js/extensions.js
+++ b/sweettooth/static/js/extensions.js
@@ -145,11 +145,13 @@ function($, messages, dbusProxy, extensionUtils, templates) {
$switch.switchify('activate', false);
} else if (newState == ExtensionState.ENABLED) {
$switch.switchify('activate', true);
+ $elem.removeClass('out-of-date');
} else if (newState == ExtensionState.ERROR) {
$switch.switchify('customize', "ERROR", 'error');
} else if (newState == ExtensionState.OUT_OF_DATE) {
var svm = meta.shell_version_map || $elem.data('svm');
var version = extensionUtils.grabProperExtensionVersion(svm, dbusProxy.ShellVersion);
+ $elem.addClass('out-of-date');
if (version === null) {
$switch.switchify('customize', "OUTDATED", 'outdated');
} else {
@@ -230,9 +232,6 @@ function($, messages, dbusProxy, extensionUtils, templates) {
$elem = $(templates.extensions.info(extension)).replaceAll($elem);
$elem.find('.uninstall').on('click', uninstall);
- if (extension.state === ExtensionState.OUT_OF_DATE)
- $elem.addClass('out-of-date');
-
addExtensionSwitch(uuid, $elem, extension);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]