aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'view/js/main.js')
-rw-r--r--view/js/main.js20
1 files changed, 14 insertions, 6 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 38b9754a1..8f981fe31 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -13,6 +13,7 @@ function commentOpenUI(obj, id) {
$("#comment-edit-text-" + id).attr('tabindex','9');
$("#comment-edit-submit-" + id).attr('tabindex','10');
$("#comment-tools-" + id).show();
+ $("#comment-edit-anon-" + id).show();
}
};
@@ -20,15 +21,20 @@ function commentOpenUI(obj, id) {
}
function commentCloseUI(obj, id) {
- $(document).unbind( "click.commentClose", handler );
+ var form_id = $(obj)[0].form.id;
+
+ $('#' + form_id).on('click', function(e) {
+ $(document).unbind( "click.commentClose", handler );
+ });
var handler = function() {
- if(obj.value === '') {
- obj.value = aStr.comment;
+ if($('#comment-edit-text-' + id).val() === '') {
+ $('#comment-edit-text-' + id).val(aStr.comment);
$("#comment-edit-text-" + id).removeClass("comment-edit-text-full").addClass("comment-edit-text-empty");
$("#comment-edit-text-" + id).removeAttr('tabindex');
$("#comment-edit-submit-" + id).removeAttr('tabindex');
$("#comment-tools-" + id).hide();
+ $("#comment-edit-anon-" + id).hide();
}
};
@@ -41,7 +47,8 @@ function commentOpen(obj, id) {
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
$("#mod-cmnt-wrap-" + id).show();
- openMenu("comment-tools-" + id);
+ $("#comment-tools-" + id).show();
+ $("#comment-edit-anon-" + id).show();
return true;
}
return false;
@@ -53,7 +60,8 @@ function commentClose(obj, id) {
$("#comment-edit-text-" + id).removeClass("comment-edit-text-full");
$("#comment-edit-text-" + id).addClass("comment-edit-text-empty");
$("#mod-cmnt-wrap-" + id).hide();
- closeMenu("comment-tools-" + id);
+ $("#comment-tools-" + id).hide();
+ $("#comment-edit-anon-" + id).hide();
return true;
}
return false;
@@ -373,7 +381,7 @@ function NavUpdate() {
}
else {
$('#notifications-btn').css('opacity', 0.5);
- $('#navbar-collapse-1').removeClass('in');
+ $('#navbar-collapse-1').removeClass('show');
}
if(data.network == 0) {