minor js and css changes
This commit is contained in:
parent
ff1d900ccb
commit
4848dc5ec8
@ -746,9 +746,9 @@ class ThreadItem {
|
|||||||
'$sourceapp' => \App::$sourcename,
|
'$sourceapp' => \App::$sourcename,
|
||||||
'$observer' => get_observer_hash(),
|
'$observer' => get_observer_hash(),
|
||||||
'$anoncomments' => (($conv->get_mode() === 'channel' && perm_is_allowed($conv->get_profile_owner(),'','post_comments')) ? true : false),
|
'$anoncomments' => (($conv->get_mode() === 'channel' && perm_is_allowed($conv->get_profile_owner(),'','post_comments')) ? true : false),
|
||||||
'$anonname' => [ 'anonname', t('Your full name (required)'),'','' ],
|
'$anonname' => [ 'anonname', t('Your full name (required)'),'','','','onBlur="commentCloseUI(this,\'' . $this->get_id() . '\')"' ],
|
||||||
'$anonmail' => [ 'anonmail', t('Your email address (required)'),'','' ],
|
'$anonmail' => [ 'anonmail', t('Your email address (required)'),'','','','onBlur="commentCloseUI(this,\'' . $this->get_id() . '\')"' ],
|
||||||
'$anonurl' => [ 'anonurl', t('Your website URL (optional)'),'','' ]
|
'$anonurl' => [ 'anonurl', t('Your website URL (optional)'),'','','','onBlur="commentCloseUI(this,\'' . $this->get_id() . '\')"' ]
|
||||||
));
|
));
|
||||||
|
|
||||||
return $comment_box;
|
return $comment_box;
|
||||||
|
@ -21,15 +21,20 @@ function commentOpenUI(obj, id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function commentCloseUI(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() {
|
var handler = function() {
|
||||||
if(obj.value === '') {
|
if($('#comment-edit-text-' + id).val() === '') {
|
||||||
obj.value = aStr.comment;
|
$('#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).removeClass("comment-edit-text-full").addClass("comment-edit-text-empty");
|
||||||
$("#comment-edit-text-" + id).removeAttr('tabindex');
|
$("#comment-edit-text-" + id).removeAttr('tabindex');
|
||||||
$("#comment-edit-submit-" + id).removeAttr('tabindex');
|
$("#comment-edit-submit-" + id).removeAttr('tabindex');
|
||||||
$("#comment-tools-" + id).hide();
|
$("#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).addClass("comment-edit-text-full");
|
||||||
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
|
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
|
||||||
$("#mod-cmnt-wrap-" + id).show();
|
$("#mod-cmnt-wrap-" + id).show();
|
||||||
|
$("#comment-tools-" + id).show();
|
||||||
$("#comment-edit-anon-" + id).show();
|
$("#comment-edit-anon-" + id).show();
|
||||||
openMenu("comment-tools-" + id);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -55,7 +60,8 @@ function commentClose(obj, id) {
|
|||||||
$("#comment-edit-text-" + id).removeClass("comment-edit-text-full");
|
$("#comment-edit-text-" + id).removeClass("comment-edit-text-full");
|
||||||
$("#comment-edit-text-" + id).addClass("comment-edit-text-empty");
|
$("#comment-edit-text-" + id).addClass("comment-edit-text-empty");
|
||||||
$("#mod-cmnt-wrap-" + id).hide();
|
$("#mod-cmnt-wrap-" + id).hide();
|
||||||
closeMenu("comment-tools-" + id);
|
$("#comment-tools-" + id).hide();
|
||||||
|
$("#comment-edit-anon-" + id).hide();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -106,8 +106,8 @@
|
|||||||
{{if $item.mode === 'moderate'}}
|
{{if $item.mode === 'moderate'}}
|
||||||
|
|
||||||
<div class="wall-item-tools-left btn-group">
|
<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}}/approve" class="btn btn-success btn-sm">{{$item.approve}}</a>
|
||||||
<a href="moderate/{{$item.id}}/drop" class="btn btn-outline-secondary btn-small">{{$item.delete}}</a>
|
<a href="moderate/{{$item.id}}/drop" class="btn btn-danger btn-sm">{{$item.delete}}</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user