Acceptable ajax loader for the aspect dropdown.
This commit is contained in:
parent
3a18044821
commit
d228f50557
3 changed files with 17 additions and 2 deletions
BIN
public/images/ajax-loader_inverted.gif
Normal file
BIN
public/images/ajax-loader_inverted.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
|
|
@ -11,6 +11,7 @@ var ContactEdit = {
|
|||
|
||||
processClick: function(li, evt){
|
||||
var dropdown = li.closest('.dropdown');
|
||||
li.addClass('loading');
|
||||
if (dropdown.hasClass('inviter')) {
|
||||
ContactEdit.inviteFriend(li, evt);
|
||||
}
|
||||
|
|
@ -24,6 +25,7 @@ var ContactEdit = {
|
|||
"aspect_id" : li.data("aspect_id"),
|
||||
"uid" : li.parent().data("service_uid")
|
||||
}, function(data){
|
||||
li.removeClass('loading')
|
||||
window.location = data.url;
|
||||
});
|
||||
},
|
||||
|
|
@ -41,6 +43,7 @@ var ContactEdit = {
|
|||
"person_id": li.parent().data("person_id"),
|
||||
"_method": (selected) ? "DELETE" : "POST"
|
||||
}, function(aspectMembership) {
|
||||
li.removeClass('loading')
|
||||
li.toggleClass("selected");
|
||||
ContactEdit.updateNumber(li.closest(".dropdown_list"), li.parent().data("person_id"), aspectMembership.aspect_ids.length);
|
||||
Diaspora.widgets.publish("aspectDropdown/updated", [li.parent().data("person_id"), li.parents(".dropdown").parent(".right").html()]);
|
||||
|
|
|
|||
|
|
@ -148,6 +148,18 @@
|
|||
/* bump top position up 1px to compensate for the 1px added top border */
|
||||
:position 3px 0px
|
||||
|
||||
&.loading
|
||||
:background
|
||||
:image url('/images/ajax-loader.gif')
|
||||
:repeat no-repeat
|
||||
:position 4px 2px
|
||||
|
||||
&.loading:hover
|
||||
:background
|
||||
:image url('/images/ajax-loader_inverted.gif')
|
||||
/* bump top position up 1px to compensate for the 1px added top border */
|
||||
:position 4px 1px
|
||||
|
||||
&.newItem
|
||||
a
|
||||
:color #999
|
||||
|
|
|
|||
Loading…
Reference in a new issue