forked from GNUsocial/gnu-social
Dynamic notice item insertion for conversation page.
This commit is contained in:
parent
c594d99167
commit
dbbb3a4fb5
19
js/util.js
19
js/util.js
@ -203,10 +203,20 @@ $(document).ready(function(){
|
|||||||
else {
|
else {
|
||||||
li = $("li", xml).get(0);
|
li = $("li", xml).get(0);
|
||||||
if ($("#"+li.id).length == 0) {
|
if ($("#"+li.id).length == 0) {
|
||||||
$("#notices_primary .notices").prepend(document._importNode(li, true));
|
var notice_irt_value = $('#notice_in-reply-to').val();
|
||||||
$("#notices_primary .notice:first").css({display:"none"});
|
var notice_irt = '#notices_primary #notice-'+notice_irt_value;
|
||||||
$("#notices_primary .notice:first").fadeIn(2500);
|
if($('body')[0].id == 'conversation') {
|
||||||
NoticeReply();
|
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(li, true));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$("#notices_primary .notices").prepend(document._importNode(li, true));
|
||||||
|
}
|
||||||
|
$('#'+li.id).css({display:'none'});
|
||||||
|
$('#'+li.id).fadeIn(2500);
|
||||||
|
NoticeReply();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$("#notice_data-text").val("");
|
$("#notice_data-text").val("");
|
||||||
@ -310,4 +320,3 @@ function NoticeAttachments() {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user