]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Use spinner icon while performing AJAX submissions of favorite/unfavorite button...
authorbrion <brion@pobox.com>
Sun, 16 Aug 2009 17:17:03 +0000 (10:17 -0700)
committerCraig Andrews <candrews@integralblue.com>
Mon, 17 Aug 2009 00:01:56 +0000 (20:01 -0400)
js/util.js
theme/default/css/display.css

index e5f117df0feb40b7ae98b2c91763698551741ba6..f09ce838c4bb216ca404508d3b0c35003a29fd86 100644 (file)
@@ -82,6 +82,10 @@ $(document).ready(function(){
        // XXX: refactor this code
 
        var favoptions = { dataType: 'xml',
+                                          beforeSubmit: function(data, target, options) {
+                                                                                               $(target).addClass('processing');
+                                                                                               return true;
+                                                                                         },
                                           success: function(xml) { var new_form = document._importNode($('form', xml).get(0), true);
                                                                                                var dis = new_form.id;
                                                                                                var fav = dis.replace('disfavor', 'favor');
@@ -91,6 +95,10 @@ $(document).ready(function(){
                                         };
 
        var disoptions = { dataType: 'xml',
+                                          beforeSubmit: function(data, target, options) {
+                                                                                               $(target).addClass('processing');
+                                                                                               return true;
+                                                                                         },
                                           success: function(xml) { var new_form = document._importNode($('form', xml).get(0), true);
                                                                                                var fav = new_form.id;
                                                                                                var dis = fav.replace('favor', 'disfavor');
index 646fb0445d78dad5c14b55c6fed9ca9ec52b2a25..6a4b87df1aa4a288e01d44bb4e50fa969024ff3a 100644 (file)
@@ -223,6 +223,10 @@ background:transparent url(../../base/images/icons/twotone/green/favourite.gif)
 .notice-options form.form_disfavor input.submit {
 background:transparent url(../../base/images/icons/twotone/green/disfavourite.gif) no-repeat 0 45%;
 }
+.notice-options form.form_favor.processing input.submit,
+.notice-options form.form_disfavor.processing input.submit {
+background:transparent url(../../base/images/icons/icon_processing.gif) no-repeat 0 45%;
+}
 .notice-options .notice_delete {
 background:transparent url(../../base/images/icons/twotone/green/trash.gif) no-repeat 0 45%;
 }