|
From: Jon O. <jon...@us...> - 2005-05-26 21:54:19
|
Update of /cvsroot/mxbb/core27x/modules/mx_textblocks/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4750/core27x/modules/mx_textblocks/templates/subSilver Modified Files: mx_textblock_edit.tpl Log Message: massive commit, for 2.7.7 http://www.mx-system.com/forum/viewtopic.php?t=6902 Index: mx_textblock_edit.tpl =================================================================== RCS file: /cvsroot/mxbb/core27x/modules/mx_textblocks/templates/subSilver/mx_textblock_edit.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mx_textblock_edit.tpl 6 May 2005 06:48:10 -0000 1.1 --- mx_textblock_edit.tpl 26 May 2005 21:54:09 -0000 1.2 *************** *** 15,27 **** var is_ie = ((clientPC.indexOf("msie") != -1) && (clientPC.indexOf("opera") == -1)); ! var is_nav = ((clientPC.indexOf('mozilla')!=-1) && (clientPC.indexOf('spoofer')==-1) && (clientPC.indexOf('compatible') == -1) && (clientPC.indexOf('opera')==-1) && (clientPC.indexOf('webtv')==-1) && (clientPC.indexOf('hotjava')==-1)); ! var is_win = ((clientPC.indexOf("win")!=-1) || (clientPC.indexOf("16bit") != -1)); ! var is_mac = (clientPC.indexOf("mac")!=-1); ! ! // Helpline texts b_help = "{L_BBCODE_B_HELP}"; i_help = "{L_BBCODE_I_HELP}"; --- 15,27 ---- var is_ie = ((clientPC.indexOf("msie") != -1) && (clientPC.indexOf("opera") == -1)); ! var is_nav = ((clientPC.indexOf('mozilla')!=-1) && (clientPC.indexOf('spoofer')==-1) && (clientPC.indexOf('compatible') == -1) && (clientPC.indexOf('opera')==-1) && (clientPC.indexOf('webtv')==-1) && (clientPC.indexOf('hotjava')==-1)); + var is_moz = 0; ! var is_win = ((clientPC.indexOf("win")!=-1) || (clientPC.indexOf("16bit") != -1)); ! var is_mac = (clientPC.indexOf("mac")!=-1); ! // Helpline messages b_help = "{L_BBCODE_B_HELP}"; i_help = "{L_BBCODE_I_HELP}"; *************** *** 42,46 **** imageTag = false; ! // Shows the help texts in the helpline window function helpline(help) { document.post.helpbox.value = eval(help + "_help"); --- 42,46 ---- imageTag = false; ! // Shows the help messages in the helpline window function helpline(help) { document.post.helpbox.value = eval(help + "_help"); *************** *** 78,86 **** if (document.post.Text.value.length < 2) { ! formErrors = "{L_EMPTY_BLOCK_INFO}"; ! } ! ! if (document.post.block_title.value.length < 2) { ! formErrors = "{L_EMPTY_BLOCK_TITLE}"; } --- 78,82 ---- if (document.post.Text.value.length < 2) { ! formErrors = "{L_EMPTY_MESSAGE}"; } *************** *** 97,133 **** function emoticon(text) { text = ' ' + text + ' '; ! if (document.post.Text.createTextRange && document.post.Text.caretPos) { ! var caretPos = document.post.Text.caretPos; ! caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text; ! document.post.Text.focus(); } else { ! document.post.Text.value += text; ! document.post.Text.focus(); } } function bbfontstyle(bbopen, bbclose) { if ((clientVer >= 4) && is_ie && is_win) { theSelection = document.selection.createRange().text; if (!theSelection) { ! document.post.Text.value += bbopen + bbclose; ! document.post.Text.focus(); return; } document.selection.createRange().text = bbopen + theSelection + bbclose; ! document.post.Text.focus(); return; ! } else { ! document.post.Text.value += bbopen + bbclose; ! document.post.Text.focus(); return; } ! storeCaret(document.post.Text); } function bbstyle(bbnumber) { donotinsert = false; theSelection = false; --- 93,140 ---- function emoticon(text) { + var txtarea = document.post.Text; text = ' ' + text + ' '; ! if (txtarea.createTextRange && txtarea.caretPos) { ! var caretPos = txtarea.caretPos; ! caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text; ! txtarea.focus(); } else { ! txtarea.value += text; ! txtarea.focus(); } } function bbfontstyle(bbopen, bbclose) { + var txtarea = document.post.Text; + if ((clientVer >= 4) && is_ie && is_win) { theSelection = document.selection.createRange().text; if (!theSelection) { ! txtarea.value += bbopen + bbclose; ! txtarea.focus(); return; } document.selection.createRange().text = bbopen + theSelection + bbclose; ! txtarea.focus(); return; ! } ! else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0)) ! { ! mozWrap(txtarea, bbopen, bbclose); return; } ! else ! { ! txtarea.value += bbopen + bbclose; ! txtarea.focus(); ! } ! storeCaret(txtarea); } function bbstyle(bbnumber) { + var txtarea = document.post.Text; + txtarea.focus(); donotinsert = false; theSelection = false; *************** *** 137,157 **** while (bbcode[0]) { butnumber = arraypop(bbcode) - 1; ! document.post.Text.value += bbtags[butnumber + 1]; buttext = eval('document.post.addbbcode' + butnumber + '.value'); eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"'); } imageTag = false; // All tags are closed including image tags :D ! document.post.Text.focus(); return; } if ((clientVer >= 4) && is_ie && is_win) theSelection = document.selection.createRange().text; // Get text selection ! ! if (theSelection) { ! // Add tags around selection ! document.selection.createRange().text = bbtags[bbnumber] + theSelection + bbtags[bbnumber+1]; ! document.post.Text.focus(); ! theSelection = ''; return; } --- 144,170 ---- while (bbcode[0]) { butnumber = arraypop(bbcode) - 1; ! txtarea.value += bbtags[butnumber + 1]; buttext = eval('document.post.addbbcode' + butnumber + '.value'); eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"'); } imageTag = false; // All tags are closed including image tags :D ! txtarea.focus(); return; } if ((clientVer >= 4) && is_ie && is_win) + { theSelection = document.selection.createRange().text; // Get text selection ! if (theSelection) { ! // Add tags around selection ! document.selection.createRange().text = bbtags[bbnumber] + theSelection + bbtags[bbnumber+1]; ! txtarea.focus(); ! theSelection = ''; ! return; ! } ! } ! else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0)) ! { ! mozWrap(txtarea, bbtags[bbnumber], bbtags[bbnumber+1]); return; } *************** *** 168,182 **** while (bbcode[bblast]) { butnumber = arraypop(bbcode) - 1; ! document.post.Text.value += bbtags[butnumber + 1]; buttext = eval('document.post.addbbcode' + butnumber + '.value'); eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"'); imageTag = false; } ! document.post.Text.focus(); return; } else { // Open tags if (imageTag && (bbnumber != 14)) { // Close image tag before adding another ! document.post.Text.value += bbtags[15]; lastValue = arraypop(bbcode) - 1; // Remove the close image tag from the list document.post.addbbcode14.value = "Img"; // Return button back to normal state --- 181,195 ---- while (bbcode[bblast]) { butnumber = arraypop(bbcode) - 1; ! txtarea.value += bbtags[butnumber + 1]; buttext = eval('document.post.addbbcode' + butnumber + '.value'); eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"'); imageTag = false; } ! txtarea.focus(); return; } else { // Open tags if (imageTag && (bbnumber != 14)) { // Close image tag before adding another ! txtarea.value += bbtags[15]; lastValue = arraypop(bbcode) - 1; // Remove the close image tag from the list document.post.addbbcode14.value = "Img"; // Return button back to normal state *************** *** 185,196 **** // Open tag ! document.post.Text.value += bbtags[bbnumber]; if ((bbnumber == 14) && (imageTag == false)) imageTag = 1; // Check to stop additional tags after an unclosed image tag arraypush(bbcode,bbnumber+1); eval('document.post.addbbcode'+bbnumber+'.value += "*"'); ! document.post.Text.focus(); return; } ! storeCaret(document.post.Text); } --- 198,225 ---- // Open tag ! txtarea.value += bbtags[bbnumber]; if ((bbnumber == 14) && (imageTag == false)) imageTag = 1; // Check to stop additional tags after an unclosed image tag arraypush(bbcode,bbnumber+1); eval('document.post.addbbcode'+bbnumber+'.value += "*"'); ! txtarea.focus(); return; } ! storeCaret(txtarea); ! } ! ! // From http://www.massless.org/mozedit/ ! function mozWrap(txtarea, open, close) ! { ! var selLength = txtarea.textLength; ! var selStart = txtarea.selectionStart; ! var selEnd = txtarea.selectionEnd; ! if (selEnd == 1 || selEnd == 2) ! selEnd = selLength; ! ! var s1 = (txtarea.value).substring(0,selStart); ! var s2 = (txtarea.value).substring(selStart, selEnd) ! var s3 = (txtarea.value).substring(selEnd, selLength); ! txtarea.value = s1 + open + s2 + close + s3; ! return; } *************** *** 204,207 **** --- 233,253 ---- </script> + <!-- BEGIN tinyMCE --> + <script language="javascript" type="text/javascript" src="../../tinymce/jscripts/tiny_mce/tiny_mce.js"></script> + <script language="javascript" type="text/javascript"> + tinyMCE.init({ + mode : "textareas", + theme : "advanced", + theme_advanced_toolbar_location : "top", + plugins : "table", + theme_advanced_buttons3_add_before : "tablecontrols, separator" + }); + </script> + <!-- END tinyMCE --> + + <h1>{L_TITLE}</h1> + + <p>{L_EXPLAIN}</p> + <form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)"> *************** *** 214,217 **** --- 260,264 ---- <th class="thHead" colspan="2" height="25"><b>{L_POST_A}</b></th> </tr> + <!-- <tr> <td class="row1" width="22%"><span class="gen"><b>{L_BLOCK_TITLE}</b></span></td> *************** *** 220,223 **** --- 267,295 ---- </span> </td> </tr> + --> + <tr> + <td class="row1" width="30%"><span class="gen"><b>{L_BLOCK_TITLE}</b></span></td> + <td class="row2"><input type="text" size="65" name="block_title" value="{E_BLOCK_TITLE}" class="post" /></td> + </tr> + <!-- + <tr> + <td class="row1" width="30%"><span class="gen">{L_BLOCK_DESC}</span></td> + <td class="row2"><input type="text" size="65" name="block_desc" value="{E_BLOCK_DESC}" class="post" /></td> + </tr> + + <tr> + <td class="row1" width="30%"><span class="gen">{L_SHOW_TITLE}</span><br /><span class="gensmall">{L_SHOW_TITLE_EXPLAIN}</span></td> + <td class="row2"><input type="radio" name="show_title" value="1" {S_SHOW_TITLE_YES} /> <span class="gen">{L_YES}</span> <input type="radio" name="show_title" value="0" {S_SHOW_TITLE_NO} /> <span class="gen">{L_NO}</span></td> + </tr> + <tr> + <td class="row1" width="30%"><span class="gen">{L_SHOW_STATS}</span></td> + <td class="row2"><input type="radio" name="show_stats" value="1" {S_SHOW_STATS_YES} /> <span class="gen">{L_YES} </span><input type="radio" name="show_stats" value="0" {S_SHOW_STATS_NO} /> <span class="gen">{L_NO}</span></td> + </tr> + + <tr> + <td class="row1" width="30%"><span class="gen">{L_SHOW_BLOCK}</span></td> + <td class="row2"><input type="radio" name="show_block" value="1" {S_SHOW_BLOCK_YES} /> <span class="gen">{L_YES} </span><input type="radio" name="show_block" value="0" {S_SHOW_BLOCK_NO} /> <span class="gen">{L_NO}</span></td> + </tr> + --> <tr> <td class="row1" valign="top"> *************** *** 249,255 **** </table> </td> ! <td class="row2" valign="top"><span class="gen"> <span class="genmed"> </span> <table width="450" border="0" cellspacing="0" cellpadding="2"> ! <!-- BEGIN switch_bbcodes --> <tr align="center" valign="middle"> <td><span class="genmed"> --- 321,327 ---- </table> </td> ! <td class="row2" valign="top"><span class="gen"> <table width="450" border="0" cellspacing="0" cellpadding="2"> ! <!-- BEGIN switch_bbcodes --> <tr align="center" valign="middle"> <td><span class="genmed"> *************** *** 323,327 **** <tr> <td colspan="9"><span class="gen"> ! <textarea name="{BLOCK_TEXT_NAME}" rows="15" cols="35" wrap="virtual" style="width:450px" tabindex="3" class="post" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{BLOCK_INFO}</textarea> </span></td> </tr> --- 395,399 ---- <tr> <td colspan="9"><span class="gen"> ! <textarea name="{BLOCK_TEXT_NAME}" rows="40" cols="35" wrap="virtual" style="width:550px" tabindex="3" class="post" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{BLOCK_INFO}</textarea> </span></td> </tr> *************** *** 333,336 **** --- 405,432 ---- <td class="row2"><span class="gen"> </span> <table cellspacing="0" cellpadding="1" border="0"> + <!-- BEGIN switch_allow_bbcode --> + <tr> + <td class="row2" width="50%"><span class="genmed">{L_ALLOW_BBCODE}</span></td> + <td class="row2" width="50%"><input type="radio" name="allow_bbcode" value="TRUE" {S_ALLOW_BBCODE_YES} /> <span class="gensmall">{L_YES}</span> <input type="radio" name="allow_bbcode" value="FALSE" {S_ALLOW_BBCODE_NO} /> <span class="gensmall">{L_NO}</span></td> + </tr> + <!-- END switch_allow_bbcode --> + <!-- BEGIN switch_allow_html --> + <tr> + <td class="row2" width="50%"><span class="genmed">{L_ALLOW_HTML}</span></td> + <td class="row2" width="50%"><input type="radio" name="allow_html" value="TRUE" {S_ALLOW_HTML_YES} /> <span class="gensmall">{L_YES}</span> <input type="radio" name="allow_html" value="FALSE" {S_ALLOW_HTML_NO} /> <span class="gensmall">{L_NO}</span></td> + </tr> + <!-- END switch_allow_html --> + <!-- BEGIN switch_html_tags --> + <tr> + <td class="row2" width="30%"><span class="genmed">{L_HTML_TAGS}</span></td> + <td class="row2"><input type="text" size="35" name="html_tags" value="{S_HTML_TAGS}" class="post" /></td> + </tr> + <!-- END switch_html_tags --> + <!-- BEGIN switch_allow_smilies --> + <tr> + <td class="row2" width="50%"><span class="genmed">{L_ALLOW_SMILIES}</span></td> + <td class="row2" width="50%"><input type="radio" name="allow_smilies" value="TRUE" {S_ALLOW_SMILIES_YES} /> <span class="gensmall">{L_YES}</span> <input type="radio" name="allow_smilies" value="FALSE" {S_ALLOW_SMILIES_NO} /> <span class="gensmall">{L_NO}</span></td> + </tr> + <!-- END switch_allow_smilies --> <!-- BEGIN switch_block_style --> <tr> *************** *** 351,360 **** </tr> <!-- END switch_title_style --> - <!-- BEGIN switch_show_title --> - <tr> - <td class="row2" width="50%"><span class="genmed">{L_SHOW_TITLE}</span><br /><span class="gensmall">{L_SHOW_TITLE_EXPLAIN}</span></td> - <td class="row2" width="50%"><input type="radio" name="show_title" value="TRUE" {S_SHOW_TITLE_YES} /> <span class="gensmall">{L_YES}</span> <input type="radio" name="show_title" value="FALSE" {S_SHOW_TITLE_NO} /> <span class="gensmall">{L_NO}</span></td> - </tr> - <!-- END switch_show_title --> </table> </td> --- 447,450 ---- |