summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2009-12-03 06:06:42 +0000
committerZach Copley <zach@status.net>2009-12-03 06:06:42 +0000
commit7ed3328c47ee9aac1d7663bce0c6c6349f7b2570 (patch)
treeb83202df9316920272ca7df36583ee0a7121f9a1
parent15fafb71624dcd826850b43768241365e0d36fa2 (diff)
Revert "If an XHR notice is sent form a page that has no timeline, show a"
This reverts commit 987d59c2421bc44b6c860c8bce47af2b33339929.
-rw-r--r--js/util.js42
1 files changed, 17 insertions, 25 deletions
diff --git a/js/util.js b/js/util.js
index 766201a45..5c581afb9 100644
--- a/js/util.js
+++ b/js/util.js
@@ -218,33 +218,25 @@ var SN = { // StatusNet
alert(result.textContent || result.innerHTML);
}
else {
- var notices = $('#notices_primary .notices');
- if (notices.length > 0) {
- var notice = document._importNode($('li', data)[0], true);
- if ($('#'+notice.id).length === 0) {
- var notice_irt_value = $('#'+SN.C.S.NoticeInReplyTo).val();
- var notice_irt = '#notices_primary #notice-'+notice_irt_value;
- if($('body')[0].id == 'conversation') {
- if(notice_irt_value.length > 0 && $(notice_irt+' .notices').length < 1) {
- $(notice_irt).append('<ul class="notices"></ul>');
- }
- $($(notice_irt+' .notices')[0]).append(notice);
+ notice = document._importNode($('li', data)[0], true);
+ if ($('#'+notice.id).length === 0) {
+ var notice_irt_value = $('#'+SN.C.S.NoticeInReplyTo).val();
+ var notice_irt = '#notices_primary #notice-'+notice_irt_value;
+ if($('body')[0].id == 'conversation') {
+ if(notice_irt_value.length > 0 && $(notice_irt+' .notices').length < 1) {
+ $(notice_irt).append('<ul class="notices"></ul>');
}
- else {
- notices.prepend(notice);
- }
- $('#'+notice.id).css({display:'none'});
- $('#'+notice.id).fadeIn(2500);
- SN.U.NoticeWithAttachment($('#'+notice.id));
- SN.U.NoticeReplyTo($('#'+notice.id));
- SN.U.FormXHR($('#'+notice.id+' .form_favor'));
+ $($(notice_irt+' .notices')[0]).append(notice);
}
- }
- else {
- result = document._importNode($('title', data)[0], true);
- result_title = result.textContent || result.innerHTML;
- form.append('<p class="success">'+result_title+'</p>');
- }
+ else {
+ $("#notices_primary .notices").prepend(notice);
+ }
+ $('#'+notice.id).css({display:'none'});
+ $('#'+notice.id).fadeIn(2500);
+ SN.U.NoticeAttachments();
+ SN.U.NoticeReplyTo($('#'+notice.id));
+ SN.U.FormXHR($('#'+notice.id+' .form_favor'));
+ }
}
$('#'+form_id+' #'+SN.C.S.NoticeDataText).val('');
$('#'+form_id+' #'+SN.C.S.NoticeDataAttach).val('');