📄 comments.vm
字号:
<table cellspacing="0" cellpadding="1" border="0" width="95%"> <tr><th>$text.get( "macro.weblog.name" )</th> <td><input type="text" name="name" value="$commentForm.name" size="50" maxlength="255" /></td> </tr> <tr><th>$text.get( "macro.weblog.email" )</th> <td><input type="text" name="email" value="$commentForm.email" size="50" maxlength="255" /></td> </tr> <tr><th>$text.get( "macro.weblog.url" )</th> <td><input type="text" name="url" value="$commentForm.url" size="50" maxlength="255" /></td> </tr> #if ($pageModel.emailComments) <tr> <td></td> <td> <input type="checkbox" id="notify" name="notify" /> <label for="notify">$text.get( "macro.weblog.notifyMeOfComments" )</label> </td> </tr> #end <tr> <td></td> <td> <input type="checkbox" id="rememberInfo" name="rememberInfo" /> <label for="rememberInfo">$text.get( "macro.weblog.rememberinfo" )</label> </td> </tr> </table> <br/> <table> <tr><th align="left">$text.get( "macro.weblog.yourcomment" )</th></tr> <tr> <td> <textarea name="content" cols="50" rows="10">$commentForm.content</textarea><br /> <span style="comments-syntax-indicator"> $text.get( "macro.weblog.htmlsyntax" ) #if( $escapeHtml ) <span class="disabled">$text.get( "macro.weblog.htmldisabled" )</span> #else <span class="enabled">$text.get( "macro.weblog.htmlenabled" )</span> #end </span> </td> </tr> </table> #showStatusMessage() <p class="commentAuthenticator"> $pageHelper.commentAuthenticatorHtml </p> <table cellspacing="0" cellpadding="1" border="0" width="95%"> <tr> <td align="left" nowrap="nowrap"> <input type="button" name="post" value=" $text.get( "macro.weblog.preview" ) " onClick="this.form.method.value='preview';this.form.submit()" /> <input type="submit" name="post" value=" $text.get( "macro.weblog.post" ) " /> </td> <td align="right"> <!-- <input type="button" value=" $text.get( "macro.weblog.clear" ) " /> --> </td> </tr> </table> </form> <script type="text/javascript" src="$ctxPath/theme/scripts/roller.js"></script> <script type="text/javascript"> var author = getCookie("commentAuthor"); var email = getCookie("commentEmail"); var url = getCookie("commentUrl"); // check each field - IE will render "null" if (author) { theForm.name.value = author; } if (email) { theForm.email.value = email; } if (url) { theForm.url.value = url; } if (author || email || url) { theForm.rememberInfo.checked = true; } function fixURL(theForm) { if (theForm.url.value != "" && theForm.url.value.indexOf("http://") == -1) { //prepend http:// theForm.url.value = "http://"+theForm.url.value; } saveUserInformation(theForm); } function saveUserInformation(theForm) { if (theForm.rememberInfo.checked) { rememberUser(theForm); } else { forgetUser(theForm); } } function validateComments(theForm) { if (theForm.content.value == "") { alert("$text.get( "macro.weblog.commentwarning" )"); theForm.content.focus(); return false; } } </script> </div>#end#** * Display hidden comment form for a weblog entry. * @param entry WeblogEntry object for which form is to be shown, *##macro( showHiddenCommentForm ) <div style="display: none" class="comments"> <div id="commentBoxTemplate" class="commentBox"> <form class="commentFormBox" id="commentForm" method="post" action="$ctxPath/comments" onsubmit="onSubmitComments(this.entryid.value);fixURL(this);return validateComments(this)"> <table> <tr class="commentFormRow"> <td>$text.get( "macro.weblog.name" )</td> <td> <input name="name" type="text" class="commentFormInput" size="50"/> <input type="hidden" name="method" value="updateFromPage" /> <input type="hidden" name="entryid" value="" id="entryid" /> </td> </tr> <tr class="commentFormRow"> <td>$text.get( "macro.weblog.email" )</td> <td><input name="email" type="text" class="commentFormInput" size="50"/></td> </tr> <tr class="commentFormRow"> <td>$text.get( "macro.weblog.url" )</td> <td><input name="url" type="text" class="commentFormInput" size="50"/></td> </tr> #if ($model.emailComments) <tr> <td></td> <td> <input type="checkbox" id="notify" name="notify" /> <label for="notify">$text.get( "macro.weblog.notifyMeOfComments" )</label> </td> </tr> #end <tr> <td></td> <td> <input type="checkbox" id="rememberInfo" name="rememberInfo" /> <label for="rememberInfo">$text.get( "macro.weblog.rememberinfo" )</label> </td> </tr> </table> <div class="commentFormRow"> <textarea name="content" class="commentFormTextarea" rows="4" cols="60"></textarea> <div class="htmlSyntax"> $text.get( "macro.weblog.htmlsyntax" ) #if( $escapeHtml ) <span class="disabled">$text.get( "macro.weblog.htmldisabled" )</span> #else <span class="enabled">$text.get( "macro.weblog.htmlenabled" )</span> #end </div> </div> $pageHelper.commentAuthenticatorHtml <div class="commentFormRow"> <input type="submit" name="post" value=" $text.get( "macro.weblog.postcomment" ) " /> </div> </form> </div> <script type="text/javascript"> // add a target to the iframe on the commentForm var commentForm = document.getElementById("commentForm"); commentForm.target = "commentFrame"; </script> <div id="commentTemplate" class="comment"> <div class="commentBody" id="commentBody"></div> <div class="commentByline"> <a class="commentAuthor" id="commentAuthorLink"></a> <span> on </span><span id="commentTimestamp"></span> </div> </div> <iframe name="commentFrame" src="about:blank"></iframe> <script type="text/javascript" src="$ctxPath/theme/scripts/roller.js"></script> </div>#end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -