forked from GNUsocial/gnu-social
Some reply buttons wouldn't work the first time they were clicked.
This commit is contained in:
parent
1a1b992858
commit
1442ca16b4
10
js/util.js
10
js/util.js
@ -659,6 +659,12 @@ var SN = { // StatusNet
|
|||||||
if (list.length == 0) {
|
if (list.length == 0) {
|
||||||
list = notice.closest('.threaded-replies');
|
list = notice.closest('.threaded-replies');
|
||||||
}
|
}
|
||||||
|
if (list.length == 0) {
|
||||||
|
list = $('<ul class="notices threaded-replies xoxo"></ul>');
|
||||||
|
notice.append(list);
|
||||||
|
list = notice.find('.threaded-replies');
|
||||||
|
}
|
||||||
|
|
||||||
var nextStep = function () {
|
var nextStep = function () {
|
||||||
// Override...?
|
// Override...?
|
||||||
replyForm.find('input[name=inreplyto]').val(id);
|
replyForm.find('input[name=inreplyto]').val(id);
|
||||||
@ -701,10 +707,10 @@ var SN = { // StatusNet
|
|||||||
data: {ajax: 1, inreplyto: id},
|
data: {ajax: 1, inreplyto: id},
|
||||||
success: function (data, textStatus, xhr) {
|
success: function (data, textStatus, xhr) {
|
||||||
var formEl = document._importNode($('form', data)[0], true);
|
var formEl = document._importNode($('form', data)[0], true);
|
||||||
replyItem.append(formEl);
|
replyForm = $(formEl);
|
||||||
|
replyItem.append(replyForm);
|
||||||
list.append(replyItem);
|
list.append(replyItem);
|
||||||
|
|
||||||
replyForm = $(formEl);
|
|
||||||
SN.Init.NoticeFormSetup(replyForm);
|
SN.Init.NoticeFormSetup(replyForm);
|
||||||
nextStep();
|
nextStep();
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user