aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgit-marijus <mario@mariovavti.com>2017-08-12 22:29:57 +0200
committergit-marijus <mario@mariovavti.com>2017-08-12 22:32:06 +0200
commit57602647efe1a3f8ae22651366eaa59b1b1334e8 (patch)
treeb13655c7f147cafaf455444f770f1bb843c99cd7
parent8b5a190d71342cbeac50c42e30cdcef24831b0df (diff)
downloadvolse-hubzilla-57602647efe1a3f8ae22651366eaa59b1b1334e8.tar.gz
volse-hubzilla-57602647efe1a3f8ae22651366eaa59b1b1334e8.tar.bz2
volse-hubzilla-57602647efe1a3f8ae22651366eaa59b1b1334e8.zip
minor js and css changes
-rw-r--r--Zotlabs/Lib/ThreadItem.php6
-rw-r--r--view/js/main.js16
-rwxr-xr-xview/tpl/search_item.tpl4
3 files changed, 16 insertions, 10 deletions
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php
index 9a36480cc..17d65dbc7 100644
--- a/Zotlabs/Lib/ThreadItem.php
+++ b/Zotlabs/Lib/ThreadItem.php
@@ -743,9 +743,9 @@ class ThreadItem {
'$sourceapp' => \App::$sourcename,
'$observer' => get_observer_hash(),
'$anoncomments' => (($conv->get_mode() === 'channel' && perm_is_allowed($conv->get_profile_owner(),'','post_comments')) ? true : false),
- '$anonname' => [ 'anonname', t('Your full name (required)'),'','' ],
- '$anonmail' => [ 'anonmail', t('Your email address (required)'),'','' ],
- '$anonurl' => [ 'anonurl', t('Your website URL (optional)'),'','' ]
+ '$anonname' => [ 'anonname', t('Your full name (required)'),'','','','onBlur="commentCloseUI(this,\'' . $this->get_id() . '\')"' ],
+ '$anonmail' => [ 'anonmail', t('Your email address (required)'),'','','','onBlur="commentCloseUI(this,\'' . $this->get_id() . '\')"' ],
+ '$anonurl' => [ 'anonurl', t('Your website URL (optional)'),'','','','onBlur="commentCloseUI(this,\'' . $this->get_id() . '\')"' ]
));
return $comment_box;
diff --git a/view/js/main.js b/view/js/main.js
index 61a37aa99..8f981fe31 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 4ca6378b8..aaafe9797 100755
--- a/view/tpl/search_item.tpl
+++ b/view/tpl/search_item.tpl
@@ -105,8 +105,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>