mirror of
https://github.com/friendica/friendica
synced 2024-12-23 15:20:17 +00:00
Merge pull request #3167 from Hypolite/bug/comment-box-undefined
Bug comment box undefined
This commit is contained in:
commit
d27b342f7d
2 changed files with 22 additions and 36 deletions
|
@ -81,10 +81,6 @@ function showHideCommentBox(id) {
|
|||
}
|
||||
|
||||
function commentOpenUI(obj, id) {
|
||||
$(document).unbind( "click.commentOpen", handler );
|
||||
|
||||
var handler = function() {
|
||||
if (obj.value == '') {
|
||||
$("#comment-edit-text-" + id).addClass("comment-edit-text-full").removeClass("comment-edit-text-empty");
|
||||
// Choose an arbitrary tab index that's greater than what we're using in jot (3 of them)
|
||||
// The submit button gets tabindex + 1
|
||||
|
@ -93,16 +89,9 @@ function commentOpenUI(obj, id) {
|
|||
$("#comment-edit-submit-wrapper-" + id).show();
|
||||
// initialize autosize for this comment
|
||||
autosize($("#comment-edit-text-" + id + ".text-autosize"));
|
||||
}
|
||||
};
|
||||
|
||||
$(document).bind( "click.commentOpen", handler );
|
||||
}
|
||||
|
||||
function commentCloseUI(obj, id) {
|
||||
$(document).unbind( "click.commentClose", handler );
|
||||
|
||||
var handler = function() {
|
||||
if (obj.value === '') {
|
||||
$("#comment-edit-text-" + id).removeClass("comment-edit-text-full").addClass("comment-edit-text-empty");
|
||||
$("#comment-edit-text-" + id).removeAttr('tabindex');
|
||||
|
@ -111,9 +100,6 @@ function commentCloseUI(obj, id) {
|
|||
// destroy the automatic textarea resizing
|
||||
autosize.destroy($("#comment-edit-text-" + id + ".text-autosize"));
|
||||
}
|
||||
};
|
||||
|
||||
$(document).bind( "click.commentClose", handler );
|
||||
}
|
||||
|
||||
function jotTextOpenUI(obj) {
|
||||
|
|
Loading…
Reference in a new issue