示例#1
0
 function displayQuickNote2()
 {
     global $wgServer, $wgTitle;
     $id = rand(0, 10000);
     $newpage = $wgTitle->getArticleId() == 0 ? "true" : "false";
     list($tb1, $tb2, $tb3) = QuickNoteEdit::getQNTemplates();
     $display = self::getJSMsgs();
     $display .= "\n\n\n<script type='text/javascript'>\n var gPreviewText = '<br/>Generating Preview...';\n var gPreviewURL = '" . $wgServer . "/Special:PostcommentPreview';\n var gPostURL = '" . $wgServer . "/Special:Postcomment';\n var gPreviewMsg = 'Preview Message:';\n var gNewpage = " . $newpage . ";\n var qnMsgBody = '" . wfMsg('Quicknote_MsgBody') . "';\n if (screen.height < 701) {\n\t document.getElementById('modalContainer').style.top = '1%';\n }\n</script>\n\t <div id=qnEditorInfo></div><br />\n\n\t <form id='postcommentForm_" . $id . "' name='postcommentForm_" . $id . "' method='POST' action='" . $wgServer . "/Special:Postcomment' target='_blank' \n\t\t onsubmit=\"return qnSend('postcomment_newmsg_" . $id . "', document.postcommentForm_" . $id . ");\">\n\t\t <input id='qnTarget' name='target' type='hidden' value=''/>\n\n\t\t <?echo wfMsg('Quicknote_Instructions1'); ?><br /><br />\n\n\t\t <input tabindex='1' type='button' value='" . wfMsg('Quicknote_Button1') . "' onclick=\"qnButtons('postcommentForm_" . $id . "', '" . $tb1 . "')\" />\n\t\t <input tabindex='2' type='button' value='" . wfMsg('Quicknote_Button2') . "' onclick=\"qnButtons('postcommentForm_" . $id . "', '" . $tb2 . "')\" />\n\t\t <input tabindex='3' type='button' value='" . wfMsg('Quicknote_Button3') . "' onclick=\"qnButtons('postcommentForm_" . $id . "', '" . $tb3 . "')\" /><br /><br />\n\n\t\t <?echo wfMsg('Quicknote_Instructions2'); ?><br /><br />\n\n\t\t <textarea tabindex='4' id='comment_text' name='comment_text' cols=40 rows=8 onkeyup='qnCountchars(this);'></textarea>\n\t\t <div id='qnCharcount' ></div>\n\t\t <br />\n\n\t\t <input tabindex='5' type='submit' value='" . wfMsg('qn_post_button') . "' cl1ass='btn' id='postcommentbutton_" . $id . "' style='font-size: 110%; font-weight:bold'/>\n\t\t <input tabindex='6' type='button' value='" . wfMsg('qn_cancel_link') . "' onclick='return qnClose();' />\n\t </form> \n";
     return $display;
 }