summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2009-10-30 21:11:56 +0000
committerSarven Capadisli <csarven@status.net>2009-10-30 21:11:56 +0000
commit900a0e2838e0c84649c3e09e683d0ad37dab9552 (patch)
tree426451bc311aa7e820eb8a2edde05e4787742ccb /js
parent87781b85c4eb0925f04bfb9f1468d8b4a26af39a (diff)
Running through importNode before checking for id
Diffstat (limited to 'js')
-rw-r--r--js/util.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/util.js b/js/util.js
index 75b9addb2..11b06298d 100644
--- a/js/util.js
+++ b/js/util.js
@@ -175,8 +175,8 @@ var SN = { // StatusNet
FormNoticeXHR: function() {
$('#'+SN.C.S.FormNotice).append('<input type="hidden" name="ajax" value="1"/>');
$('#'+SN.C.S.FormNotice).ajaxForm({
- timeout: '60000',
dataType: 'xml',
+ timeout: '60000',
beforeSend: function(xhr) {
if ($('#'+SN.C.S.NoticeDataText)[0].value.length === 0) {
$('#'+SN.C.S.FormNotice).addClass(SN.C.S.Warning);
@@ -223,7 +223,7 @@ var SN = { // StatusNet
alert(result.textContent || result.innerHTML);
}
else {
- notice = $('li', data)[0];
+ 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;
@@ -231,10 +231,10 @@ var SN = { // StatusNet
if(notice_irt_value.length > 0 && $(notice_irt+' .notices').length < 1) {
$(notice_irt).append('<ul class="notices"></ul>');
}
- $($(notice_irt+' .notices')[0]).append(document._importNode(notice, true));
+ $($(notice_irt+' .notices')[0]).append(notice);
}
else {
- $("#notices_primary .notices").prepend(document._importNode(notice, true));
+ $("#notices_primary .notices").prepend(notice);
}
$('#'+notice.id).css({display:'none'});
$('#'+notice.id).fadeIn(2500);