summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2009-11-27 20:52:35 +0000
committerSarven Capadisli <csarven@status.net>2009-11-27 20:52:35 +0000
commit58a75b09684a88181d8bd6ead440d27832886b80 (patch)
treeee47d058291ede881d33ccca99fd6c0ab112aa18 /js
parent5bacd98905ed55db6ece546356407f1514fb7fe5 (diff)
Better UI for showing 'processing' for NewDirectMessage. Displays it
only while it GETs the form.
Diffstat (limited to 'js')
-rw-r--r--js/util.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/js/util.js b/js/util.js
index b29ce7f02..f3b71cea8 100644
--- a/js/util.js
+++ b/js/util.js
@@ -365,9 +365,9 @@ var SN = { // StatusNet
NDM = $('.entity_send-a-message a');
NDM.attr({'href':NDM.attr('href')+'&ajax=1'});
NDM.bind('click', function() {
- $(this).addClass('processing');
var NDMF = $('.entity_send-a-message form');
if (NDMF.length === 0) {
+ $(this).addClass('processing');
$.get(NDM.attr('href'), null, function(data) {
$('.entity_send-a-message').append(document._importNode($('form', data)[0], true));
NDMF = $('.entity_send-a-message .form_notice');
@@ -378,14 +378,13 @@ var SN = { // StatusNet
NDMF.hide();
return false;
});
+ NDM.removeClass('processing');
});
}
else {
NDMF.show();
$('.entity_send-a-message textarea').focus();
}
-
- $(this).removeClass('processing');
return false;
});
}