|
From: FlorinCB <ory...@us...> - 2008-09-12 05:18:32
|
Update of /cvsroot/mxbb/mx_smartor/templates/_core In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9295/mx_smartor/templates/_core Modified Files: album_showpage_body.tpl Log Message: function get_username_string() Index: album_showpage_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/templates/_core/album_showpage_body.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** album_showpage_body.tpl 29 Aug 2008 13:34:38 -0000 1.4 --- album_showpage_body.tpl 12 Sep 2008 05:17:58 -0000 1.5 *************** *** 1,10 **** <script language="JavaScript" type="text/javascript"> <!-- ! function checkForm() ! { formErrors = false; ! //if ((document.commentform.comment.value.length < 2) && (document.commentform.rate.value == -1)) ! if (document.commentform.comment.value.length < 2) { formErrors = "{L_COMMENT_NO_TEXT}"; --- 1,8 ---- <script language="JavaScript" type="text/javascript"> <!-- ! function checkForm() { formErrors = false; ! if ((document.commentform.comment.value.length < 2) && (document.commentform.rate.value == -1)) { formErrors = "{L_COMMENT_NO_TEXT}"; *************** *** 15,24 **** } ! if (formErrors) { alert(formErrors); return false; ! } ! else { return true; --- 13,22 ---- } ! if (formErrors) { alert(formErrors); return false; ! } ! else { return true; *************** *** 26,29 **** --- 24,58 ---- } + function storeCaret(textEl) + { + if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate(); + } + + //how to add smilies + function emotions(text) + { + if (document.commentform.comment.createTextRange && document.commentform.comment.caretPos) + { + var caretPos = document.commentform.comment.caretPos; + caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text; + document.commentform.comment.focus(); + } + else + { + document.commentform.comment.value += text; + document.commentform.comment.focus(); + } + } + + + //pops up a window with all smilies + function openAllSmiles() + { + smiles = window.open('{U_ALBUM_SMILIES}', '_phpbbsmilies', 'HEIGHT=600,resizable=yes,scrollbars=yes,WIDTH=470'); + smiles.focus(); + return false; + } + + function checkFormRate() { *************** *** 141,152 **** txtarea.focus(); } - - //pops up a window with all smilies - function openAllSmiles() - { - smiles = window.open('{U_ALBUM_SMILIES}', '_phpbbsmilies', 'HEIGHT=600,resizable=yes,scrollbars=yes,WIDTH=470'); - smiles.focus(); - return true; - } // --> </script> --- 170,173 ---- *************** *** 319,375 **** </div> <br clear="all" /> - <script language="JavaScript" type="text/javascript"> - <!-- - function checkForm() { - formErrors = false; - - if ((document.commentform.comment.value.length < 2) && (document.commentform.rate.value == -1)) - { - formErrors = "{L_COMMENT_NO_TEXT}"; - } - else if (document.commentform.comment.value.length > {S_MAX_LENGTH}) - { - formErrors = "{L_COMMENT_TOO_LONG}"; - } - - if (formErrors) { - alert(formErrors); - return false; - } else { - return true; - } - } - - - function storeCaret(textEl) { - if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate(); - } - - //how to add smilies - function emotions(text) - { - if (document.commentform.comment.createTextRange && document.commentform.comment.caretPos) - { - var caretPos = document.commentform.comment.caretPos; - caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text; - document.commentform.comment.focus(); - } - else - { - document.commentform.comment.value += text; - document.commentform.comment.focus(); - } - } - - - //pops up a window with all smilies - function openAllSmiles() - { - smiles = window.open('{U_ALBUM_SMILIES}', '_phpbbsmilies', 'HEIGHT=600,resizable=yes,scrollbars=yes,WIDTH=470'); - smiles.focus(); - return false; - } - // --> - </script> <div class="forabg"> --- 340,343 ---- *************** *** 390,394 **** <!-- END logout --> <tr> ! <td class="row1 bg1" valign="top" width="20%"><span class="genmed">{L_MESSAGE}<br> {L_MAX_LENGTH}: <b>{S_MAX_LENGTH}</b></span></td> --- 358,362 ---- <!-- END logout --> <tr> ! <td class="row1 bg1" valign="top" width="20%"><span class="genmed">{L_MESSAGE}<br /> {L_MAX_LENGTH}: <b>{S_MAX_LENGTH}</b></span></td> *************** *** 404,408 **** </select> ! <br><textarea name="comment" class="post" cols="40" rows="9" wrap='virtual' class='post' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'>{S_MESSAGE}</textarea></td> --- 372,376 ---- </select> ! <br /><textarea name="comment" class="post" cols="40" rows="9" wrap='virtual' class='post' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'>{S_MESSAGE}</textarea></td> *************** *** 421,425 **** </table> ! <INPUT TYPE='button' CLASS=BUTTON NAME="SmilesButt" VALUE="Show All Smilies" ONCLICK="openAllSmiles();"> </td> --- 389,393 ---- </table> ! <INPUT TYPE='button' CLASS=BUTTON NAME="SmilesButt" VALUE="Show All Smilies" ONCLICK="openAllSmiles();" /> </td> |