forked from GNUsocial/gnu-social
Use spinner icon while performing AJAX submissions of favorite/unfavorite button so there's some visual feedback that something's happening.
This commit is contained in:
parent
136a69a387
commit
84227dd4e1
@ -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');
|
||||
|
@ -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%;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user