[extensions-web] js: Fade out extensions that aren't compatible



commit d0de5750018bb1186139b7d152489201b0809a4c
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Dec 8 17:10:02 2011 -0500

    js: Fade out extensions that aren't compatible

 sweettooth/static/css/sweettooth.css |    4 ++++
 sweettooth/static/js/extensions.js   |    7 +++++++
 2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/sweettooth/static/css/sweettooth.css b/sweettooth/static/css/sweettooth.css
index 1542eeb..545588d 100644
--- a/sweettooth/static/css/sweettooth.css
+++ b/sweettooth/static/css/sweettooth.css
@@ -199,6 +199,10 @@ li.extension:last-child {
     position: relative;
 }
 
+.extension.out-of-date {
+    opacity: 0.8;
+}
+
 .extension .extension-name {
     margin-left: 48px;
     font-size: 2em;
diff --git a/sweettooth/static/js/extensions.js b/sweettooth/static/js/extensions.js
index b093d39..24333f8 100644
--- a/sweettooth/static/js/extensions.js
+++ b/sweettooth/static/js/extensions.js
@@ -298,4 +298,11 @@ function($, messages, dbusProxy, extensionUtils) {
         });
     };
 
+    $('li.extension').each(function() {
+        var svm = $(this).data('svm');
+        var vpk = extensionUtils.grabProperExtensionVersion(svm, dbusProxy.ShellVersion);
+        if (vpk === null)
+            $(this).addClass('out-of-date');
+    });
+
 });



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]