Better UI for showing 'processing' for NewDirectMessage. Displays it
only while it GETs the form.
This commit is contained in:
parent
5bacd98905
commit
58a75b0968
@ -365,9 +365,9 @@ var SN = { // StatusNet
|
|||||||
NDM = $('.entity_send-a-message a');
|
NDM = $('.entity_send-a-message a');
|
||||||
NDM.attr({'href':NDM.attr('href')+'&ajax=1'});
|
NDM.attr({'href':NDM.attr('href')+'&ajax=1'});
|
||||||
NDM.bind('click', function() {
|
NDM.bind('click', function() {
|
||||||
$(this).addClass('processing');
|
|
||||||
var NDMF = $('.entity_send-a-message form');
|
var NDMF = $('.entity_send-a-message form');
|
||||||
if (NDMF.length === 0) {
|
if (NDMF.length === 0) {
|
||||||
|
$(this).addClass('processing');
|
||||||
$.get(NDM.attr('href'), null, function(data) {
|
$.get(NDM.attr('href'), null, function(data) {
|
||||||
$('.entity_send-a-message').append(document._importNode($('form', data)[0], true));
|
$('.entity_send-a-message').append(document._importNode($('form', data)[0], true));
|
||||||
NDMF = $('.entity_send-a-message .form_notice');
|
NDMF = $('.entity_send-a-message .form_notice');
|
||||||
@ -378,14 +378,13 @@ var SN = { // StatusNet
|
|||||||
NDMF.hide();
|
NDMF.hide();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
NDM.removeClass('processing');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
NDMF.show();
|
NDMF.show();
|
||||||
$('.entity_send-a-message textarea').focus();
|
$('.entity_send-a-message textarea').focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
$(this).removeClass('processing');
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user