CommentBox is now hidden by default, this can be toggled with a fake link

2022.09-rc
Domovoy 2012-07-27 22:47:18 +02:00
rodzic 8ecf8167db
commit d558d25540
4 zmienionych plików z 13 dodań i 4 usunięć

Wyświetl plik

@ -473,7 +473,6 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr
}
}
logger('item, page_writeable:'. ($page_writeable ? 'yes' : 'no') .', show comment box: '. ($show_comment_box ? 'yes' : 'no'), LOGGER_DEBUG);
if($page_writeable) {
$buttons = array(
'like' => array( t("I like this \x28toggle\x29"), t("like")),
@ -489,7 +488,6 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr
$qc = ((local_user()) ? get_pconfig(local_user(),'qcomment','words') : null);
$qcomment = (($qc) ? explode("\n",$qc) : null);
}
$comment = replace_macros($cmnt_tpl,array(
'$return_path' => '',
'$jsreload' => (($mode === 'display') ? $_SESSION['return_url'] : ''),

Wyświetl plik

@ -1,5 +1,6 @@
<div class="comment-wwedit-wrapper" id="comment-edit-wrapper-$id" style="display: block;">
<form class="comment-edit-form" id="comment-edit-form-$id" action="item" method="post" onsubmit="post_comment($id); return false;">
<span id="hide-commentbox-$id" class="hide-commentbox fakelink" onclick="showHideCommentBox($id);">$comment</span>
<form class="comment-edit-form" style="display: none;" id="comment-edit-form-$id" action="item" method="post" onsubmit="post_comment($id); return false;">
<input type="hidden" name="type" value="$type" />
<input type="hidden" name="profile_uid" value="$profile_uid" />
<input type="hidden" name="parent" value="$parent" />

Wyświetl plik

@ -96,6 +96,15 @@
}
}
function showHideCommentBox(id) {
if( $('#comment-edit-form-' + id).is(':visible')) {
$('#comment-edit-form-' + id).hide();
}
else {
$('#comment-edit-form-' + id).show();
}
}
</script>

Wyświetl plik

@ -1,5 +1,6 @@
<div class="comment-wwedit-wrapper" id="comment-edit-wrapper-$id" style="display: block;">
<form class="comment-edit-form" id="comment-edit-form-$id" action="item" method="post" onsubmit="post_comment($id); return false;">
<span id="hide-commentbox-$id" class="hide-commentbox fakelink" onclick="showHideCommentBox($id);">$comment</span>
<form class="comment-edit-form" style="display: none;" id="comment-edit-form-$id" action="item" method="post" onsubmit="post_comment($id); return false;">
<input type="hidden" name="type" value="$type" />
<input type="hidden" name="profile_uid" value="$profile_uid" />
<input type="hidden" name="parent" value="$parent" />