[extensions-web] Don't show the "out of date" error message on any other page but details



commit a2bd61d90e61cb3f13e4a62c77e721e0e865dfcf
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Nov 7 11:08:50 2011 -0500

    Don't show the "out of date" error message on any other page but details

 sweettooth/static/js/extensions.js |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/sweettooth/static/js/extensions.js b/sweettooth/static/js/extensions.js
index 1a40391..fb1803d 100644
--- a/sweettooth/static/js/extensions.js
+++ b/sweettooth/static/js/extensions.js
@@ -130,7 +130,7 @@ function($, messages, dbusProxy) {
                 $switch.attr('title', "This extension had an error.");
             } else if (newState == ExtensionState.OUT_OF_DATE) {
                 $switch.switchify('insensitive', true);
-                messages.addError("This extension is not compatible with your version of GNOME.");
+                $elem.trigger('out-of-date');
             }
 
             if ($elem.data('uninstalled') && (newState == ExtensionState.ENABLED ||
@@ -250,6 +250,10 @@ function($, messages, dbusProxy) {
         var $extension = $(this);
         var uuid = $extension.data('uuid');
 
+        $extension.bind('out-of-date', function() {
+            messages.addError("This extension is incompatible with your version of GNOME.");
+        });
+
         dbusProxy.GetExtensionInfo(uuid).done(function(meta) {
             addExtensionSwitch(uuid, meta, $(this));
         });



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