X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=js%2Futil.js;h=55f2920cd5f4a9e25a13bb9c92ce2304b3e25266;hb=c30dcbebbcb383fbd2d4ba92ef5294fbb3e44244;hp=844a5adb8dfab8ee294a924f95696c07643f2883;hpb=4d61760154a53e39d1e0499d5fe7a4a586e7a9f0;p=quix0rs-gnu-social.git
diff --git a/js/util.js b/js/util.js
index 844a5adb8d..55f2920cd5 100644
--- a/js/util.js
+++ b/js/util.js
@@ -609,8 +609,7 @@ var SN = { // StatusNet
$('#content .notice_reply').live('click', function(e) {
e.preventDefault();
var notice = $(this).closest('li.notice');
- var nickname = ($('.author .nickname', notice).length > 0) ? $($('.author .nickname', notice)[0]) : $('.author .nickname.uid');
- SN.U.NoticeInlineReplyTrigger(notice, '@' + nickname.text());
+ SN.U.NoticeInlineReplyTrigger(notice);
return false;
});
},
@@ -644,8 +643,8 @@ var SN = { // StatusNet
// and we'll add on the end of it. Will add if needed.
list = $('ul.threaded-replies', notice);
if (list.length == 0) {
- list = $('
');
- notice.append(list);
+ SN.U.NoticeInlineReplyPlaceholder(notice);
+ list = $('ul.threaded-replies', notice);
}
}
@@ -655,6 +654,10 @@ var SN = { // StatusNet
var nextStep = function() {
// Override...?
replyForm.find('input[name=inreplyto]').val(id);
+ replyForm.find('#notice_to').attr('disabled', 'disabled').hide();
+ replyForm.find('#notice_private').attr('disabled', 'disabled').hide();
+ replyForm.find('label[for=notice_to]').hide();
+ replyForm.find('label[for=notice_private]').hide();
// Set focus...
var text = replyForm.find('textarea');
@@ -714,6 +717,11 @@ var SN = { // StatusNet
NoticeInlineReplyPlaceholder: function(notice) {
var list = notice.find('ul.threaded-replies');
+ if (list.length == 0) {
+ list = $('
');
+ notice.append(list);
+ list = notice.find('ul.threaded-replies');
+ }
var placeholder = $('
' +
'' +
'
');
@@ -1385,6 +1393,14 @@ var SN = { // StatusNet
$('#input_form_nav_'+tag).addClass('current');
}
+ // Don't remove 'current' if we also have the "nonav" class.
+ // An example would be the message input form. removing
+ // 'current' will cause the form to vanish from the page.
+ var nonav = $('.input_form.current.nonav');
+ if (nonav.length > 0) {
+ return;
+ }
+
$('.input_form.current').removeClass('current');
$('#input_form_'+tag)
.addClass('current')