diff options
author | zotlabs <mike@macgirvin.com> | 2017-08-12 16:11:07 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-08-12 16:11:07 -0700 |
commit | f99b62b5167c5d855b55be451cf54327fc515777 (patch) | |
tree | 90b6029578929e43806e4e8ac1489e3a3e5006cd /view | |
parent | 2f45182b4861397d317080d5a93c87c85866a2d9 (diff) | |
parent | 9da1439a4d71f925dcdfabc7882e71a17fe487ba (diff) | |
download | volse-hubzilla-f99b62b5167c5d855b55be451cf54327fc515777.tar.gz volse-hubzilla-f99b62b5167c5d855b55be451cf54327fc515777.tar.bz2 volse-hubzilla-f99b62b5167c5d855b55be451cf54327fc515777.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
Diffstat (limited to 'view')
-rw-r--r-- | view/js/main.js | 16 | ||||
-rwxr-xr-x | view/tpl/search_item.tpl | 4 |
2 files changed, 13 insertions, 7 deletions
diff --git a/view/js/main.js b/view/js/main.js index e4cfcf7b2..f928fa377 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -21,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(); } }; @@ -42,8 +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(); + $("#comment-tools-" + id).show(); $("#comment-edit-anon-" + id).show(); - openMenu("comment-tools-" + id); return true; } return false; @@ -55,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; diff --git a/view/tpl/search_item.tpl b/view/tpl/search_item.tpl index 28667eb58..50c0116fb 100755 --- a/view/tpl/search_item.tpl +++ b/view/tpl/search_item.tpl @@ -106,8 +106,8 @@ {{if $item.mode === 'moderate'}} <div class="wall-item-tools-left btn-group"> - <a href="moderate/{{$item.id}}/approve" class="btn btn-outline-secondary btn-small">{{$item.approve}}</a> - <a href="moderate/{{$item.id}}/drop" class="btn btn-outline-secondary btn-small">{{$item.delete}}</a> + <a href="moderate/{{$item.id}}/approve" class="btn btn-success btn-sm">{{$item.approve}}</a> + <a href="moderate/{{$item.id}}/drop" class="btn btn-danger btn-sm">{{$item.delete}}</a> </div> |