[extensions-web] js: Fix fallback dummy code chaining



commit fe4d073e836b91771ccca4584c1921be2cf31564
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Feb 9 06:54:38 2012 -0500

    js: Fix fallback dummy code chaining
    
    If the user doesn't have a plugin, we need to make sure that the
    fallback dummy methods we install to keep compatibility are able
    to chain properly.

 sweettooth/static/js/extensions.js |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/sweettooth/static/js/extensions.js b/sweettooth/static/js/extensions.js
index 6253e00..dcf1623 100644
--- a/sweettooth/static/js/extensions.js
+++ b/sweettooth/static/js/extensions.js
@@ -45,29 +45,32 @@ function($, messages, dbusProxy, extensionUtils) {
         $.fn.addExtensionSwitch = function() {
             // Don't show our switches -- CSS styles define a clickable
             // area even with no content.
-            $(this).find('.switch').hide();
+            return this.find('.switch').hide();
         };
 
         $.fn.addLocalExtensions = function() {
-            $(this).append("GNOME Shell Extensions cannot list your installed extensions.");
+            return this.append("GNOME Shell Extensions cannot list your installed extensions.");
         };
 
         $.fn.fillInErrors = function() {
-            var $form = $(this);
-            var $textarea = $form.find('textarea[name=error]');
-            var $hidden = $form.find('input:hidden[name=has_errors]');
+            var $textarea = this.find('textarea[name=error]');
+            var $hidden = this.find('input:hidden[name=has_errors]');
             $textarea.text("GNOME Shell Extensions cannot automatically detect any errors.").
                 addClass('no-errors').attr('disabled', 'disabled');
             $hidden.val('');
+            return this;
         };
 
         $.fn.addOutOfDateIndicator = function() {
+            return this;
         };
 
         $.fn.addLaunchExtensionPrefsButton = function() {
+            return this;
         };
 
         $.fn.checkForUpdates = function() {
+            return this;
         };
 
         return;



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