Revert "If an XHR notice is sent form a page that has no timeline, show a"

This reverts commit 987d59c242.
This commit is contained in:
Zach Copley 2009-12-03 06:06:42 +00:00
parent 15fafb7162
commit 7ed3328c47
1 changed files with 17 additions and 25 deletions

View File

@ -218,33 +218,25 @@ var SN = { // StatusNet
alert(result.textContent || result.innerHTML); alert(result.textContent || result.innerHTML);
} }
else { else {
var notices = $('#notices_primary .notices'); notice = document._importNode($('li', data)[0], true);
if (notices.length > 0) { if ($('#'+notice.id).length === 0) {
var notice = document._importNode($('li', data)[0], true); var notice_irt_value = $('#'+SN.C.S.NoticeInReplyTo).val();
if ($('#'+notice.id).length === 0) { var notice_irt = '#notices_primary #notice-'+notice_irt_value;
var notice_irt_value = $('#'+SN.C.S.NoticeInReplyTo).val(); if($('body')[0].id == 'conversation') {
var notice_irt = '#notices_primary #notice-'+notice_irt_value; if(notice_irt_value.length > 0 && $(notice_irt+' .notices').length < 1) {
if($('body')[0].id == 'conversation') { $(notice_irt).append('<ul class="notices"></ul>');
if(notice_irt_value.length > 0 && $(notice_irt+' .notices').length < 1) {
$(notice_irt).append('<ul class="notices"></ul>');
}
$($(notice_irt+' .notices')[0]).append(notice);
} }
else { $($(notice_irt+' .notices')[0]).append(notice);
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'));
} }
} else {
else { $("#notices_primary .notices").prepend(notice);
result = document._importNode($('title', data)[0], true); }
result_title = result.textContent || result.innerHTML; $('#'+notice.id).css({display:'none'});
form.append('<p class="success">'+result_title+'</p>'); $('#'+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.NoticeDataText).val('');
$('#'+form_id+' #'+SN.C.S.NoticeDataAttach).val(''); $('#'+form_id+' #'+SN.C.S.NoticeDataAttach).val('');