From fa65db9aa1d1b886fbe11b8e1812224c47ff6664 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 10 Sep 2012 18:06:18 -0700 Subject: [PATCH] bring back comment edit buttons --- view/theme/duepuntozero/style.css | 2 +- view/theme/slackr/theme.php | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index dde9b6915b..030ecdbe1f 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -1765,7 +1765,7 @@ input#dfrn-url { .comment-edit-text-empty { color: gray; - height: 5em; + height: 2em; width: 175px; overflow: auto; margin-bottom: 10px; diff --git a/view/theme/slackr/theme.php b/view/theme/slackr/theme.php index 9887008606..ff6d19ec9d 100644 --- a/view/theme/slackr/theme.php +++ b/view/theme/slackr/theme.php @@ -37,13 +37,22 @@ function insertFormatting(comment,BBcode,id) { return true; } -function cmtBbOpen(id) { - $(".comment-edit-bb-" + id).show(); +function cmtBbOpen(comment, id) { + if($(comment).hasClass('comment-edit-text-full')) { + $(".comment-edit-bb-" + id).show(); + return true; + } + return false; } -function cmtBbClose(id) { - $(".comment-edit-bb-" + id).hide(); +function cmtBbClose(comment, id) { + if($(comment).hasClass('comment-edit-text-empty')) { + $(".comment-edit-bb-" + id).hide(); + return true; + } + return false; } + function hidecal() { if(editor) return; $('.fc').hide(); -- 2.39.5