|
From: Jon O. <jon...@us...> - 2006-06-28 22:51:48
|
Update of /cvsroot/mxbb/core/templates/subSilver/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv30529/templates/subSilver/admin Modified Files: mx_module_admin_body.tpl mx_modulecp_admin_body.tpl mx_pagecp_admin_body.tpl Log Message: a couple of JS checks if important form fields are filled out...still many to do ;) Index: mx_modulecp_admin_body.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/admin/mx_modulecp_admin_body.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** mx_modulecp_admin_body.tpl 5 Apr 2006 20:35:41 -0000 1.4 --- mx_modulecp_admin_body.tpl 28 Jun 2006 22:51:44 -0000 1.5 *************** *** 3,7 **** function handleError() { return true; ! } window.onerror = handleError; --- 3,7 ---- function handleError() { return true; ! } [...988 lines suppressed...] </table> </td> </tr> ! <!-- END function --> </table> --- 718,730 ---- </div> </td> ! </tr> ! <!-- Block PRIVATE Auth --> ! <!-- END block --> </table> </td> </tr> ! <!-- END function --> </table> Index: mx_pagecp_admin_body.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/admin/mx_pagecp_admin_body.tpl,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** mx_pagecp_admin_body.tpl 3 May 2006 09:17:29 -0000 1.7 --- mx_pagecp_admin_body.tpl 28 Jun 2006 22:51:44 -0000 1.8 *************** *** 217,220 **** --- 217,249 ---- } + function checkForm() { + formErrors = ''; + var is_selected = false; + + if (document.forms['DYNAMIC_LIST'].function_id.selectedIndex < 0) { + formErrors += "Select a function\r\n"; + } + if (document.forms['DYNAMIC_LIST'].block_id.selectedIndex < 0) { + formErrors += "Select a block\r\n"; + } + for (i=0, n=document.forms['DYNAMIC_LIST'].id.length; i<n; i++) { + if (document.forms['DYNAMIC_LIST'].id[i].checked) { + is_selected = true; + } + } + if (!is_selected) { + formErrors += "Select a page column\r\n"; + } + if (formErrors) { + alert(formErrors); + return false; + } else { + bbstyle(-1); + //formObj.preview.disabled = true; + //formObj.submit.disabled = true; + return true; + } + } + var oldOnLoadMenuACP = window.onload; *************** *** 777,781 **** <!-- BEGIN has_columns --> <!-- dynamic_select --> ! <form name="DYNAMIC_LIST" method="post" action="{S_ACTION}"> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> --- 806,810 ---- <!-- BEGIN has_columns --> <!-- dynamic_select --> ! <form name="DYNAMIC_LIST" method="post" action="{S_ACTION}" onsubmit="return checkForm(this)"> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> Index: mx_module_admin_body.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/admin/mx_module_admin_body.tpl,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** mx_module_admin_body.tpl 5 Apr 2006 20:35:41 -0000 1.8 --- mx_module_admin_body.tpl 28 Jun 2006 22:51:44 -0000 1.9 *************** *** 58,83 **** var imageSCR = type+'image_'+cat_id; var strSubmitContent = ''; ! parentCatMode = 'adminModule_'; parentCat = parentCatMode + cat_id; ! currentCat = type + cat_id; ! currentStatus = menuCats[currentCat].status; queuedSteps = new Array(); cookieArray = new Array(); ! currentStep = 0; for( var forCat in menuCats ) { ! if( (init == 'true' && (menuCats[forCat].status == 'block') && menuCats[forCat].menu_mode == parentCatMode) || ! (init != 'true' && ( (menuCats[forCat].status == 'block') ))) { queuedSteps[currentStep++] = new queueStep(forCat, 'none'); menuCats[forCat].status = 'none'; ! forCatimage = menuCats[forCat].menu_mode+'image_'+menuCats[forCat].cat_id; if( document.images && document.images[forCatimage] ) --- 58,83 ---- var imageSCR = type+'image_'+cat_id; var strSubmitContent = ''; ! parentCatMode = 'adminModule_'; parentCat = parentCatMode + cat_id; ! currentCat = type + cat_id; ! currentStatus = menuCats[currentCat].status; queuedSteps = new Array(); cookieArray = new Array(); ! currentStep = 0; for( var forCat in menuCats ) { ! if( (init == 'true' && (menuCats[forCat].status == 'block') && menuCats[forCat].menu_mode == parentCatMode) || ! (init != 'true' && ( (menuCats[forCat].status == 'block') ))) { queuedSteps[currentStep++] = new queueStep(forCat, 'none'); menuCats[forCat].status = 'none'; ! forCatimage = menuCats[forCat].menu_mode+'image_'+menuCats[forCat].cat_id; if( document.images && document.images[forCatimage] ) *************** *** 87,97 **** } } ! if( currentStatus == 'none' ) { ! queuedSteps[currentStep++] = new queueStep(currentCat, 'block'); menuCats[currentCat].status = 'block'; ! if (currentCat == parentCat) { --- 87,97 ---- } } ! if( currentStatus == 'none' ) { ! queuedSteps[currentStep++] = new queueStep(currentCat, 'block'); menuCats[currentCat].status = 'block'; ! if (currentCat == parentCat) { *************** *** 103,111 **** ('{COOKIE_SECURE}' == '0') ? false : true); } ! if( document.images && document.images[imageSCR] ) { document.images[imageSCR].src = '{IMG_URL_CONTRACT}'; ! } } else --- 103,111 ---- ('{COOKIE_SECURE}' == '0') ? false : true); } ! if( document.images && document.images[imageSCR] ) { document.images[imageSCR].src = '{IMG_URL_CONTRACT}'; ! } } else *************** *** 115,135 **** ('{COOKIE_DOMAIN}' == '') ? null : '{COOKIE_DOMAIN}'); } ! for( var forCat in menuCats ) ! { if ( menuCats[forCat].status == 'block' ) { strSubmitContent += forCat + ','; } ! } // Remove trailing separator ! strSubmitContent = strSubmitContent.substr(0, strSubmitContent.length - 1); setCookie('{COOKIE_NAME}_admincp_blockstates', strSubmitContent, expdate, ('{COOKIE_PATH}' == '') ? null : '{COOKIE_PATH}', ('{COOKIE_DOMAIN}' == '') ? null : '{COOKIE_DOMAIN}', ! ('{COOKIE_SECURE}' == '0') ? false : true); ! currentStep = 0; setTimeout("execQueue();", execInterval); --- 115,135 ---- ('{COOKIE_DOMAIN}' == '') ? null : '{COOKIE_DOMAIN}'); } ! for( var forCat in menuCats ) ! { if ( menuCats[forCat].status == 'block' ) { strSubmitContent += forCat + ','; } ! } // Remove trailing separator ! strSubmitContent = strSubmitContent.substr(0, strSubmitContent.length - 1); setCookie('{COOKIE_NAME}_admincp_blockstates', strSubmitContent, expdate, ('{COOKIE_PATH}' == '') ? null : '{COOKIE_PATH}', ('{COOKIE_DOMAIN}' == '') ? null : '{COOKIE_DOMAIN}', ! ('{COOKIE_SECURE}' == '0') ? false : true); ! currentStep = 0; setTimeout("execQueue();", execInterval); *************** *** 150,154 **** cat_id = getCookie('{COOKIE_NAME}_adminModule_module_id'); } ! if( menuCats['adminModule_'+cat_id] ) { --- 150,154 ---- cat_id = getCookie('{COOKIE_NAME}_adminModule_module_id'); } ! if( menuCats['adminModule_'+cat_id] ) { *************** *** 157,161 **** } } ! if( oldOnLoadMenuACP ) { --- 157,161 ---- } } ! if( oldOnLoadMenuACP ) { *************** *** 163,167 **** } } ! var oldOnLoadMenuACP = window.onload; window.onload = doOnLoadMenuACP; --- 163,190 ---- } } ! ! function checkForm() { ! formErrors = ''; ! if (document.forms['post'].module_name.value.length < 2) { ! formErrors += "Fill out the module title\r\n"; ! } ! if (document.forms['post'].module_desc.value.length < 2) { ! formErrors += "Fill out the module description\r\n"; ! } ! if (document.forms['post'].module_path.value.length < 2) { ! formErrors += "Fill out the module path\r\n"; ! } ! ! if (formErrors) { ! alert(formErrors); ! return false; ! } else { ! bbstyle(-1); ! //formObj.preview.disabled = true; ! //formObj.submit.disabled = true; ! return true; ! } ! } ! var oldOnLoadMenuACP = window.onload; window.onload = doOnLoadMenuACP; *************** *** 177,181 **** <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> ! <td nowrap="nowrap" align="right"><span class="gensmall"><b>{L_QUICK_NAV}</b> {MODULE_SELECT_BOX} <input type="submit" value="{S_SUBMIT}" class="liteoption" /></span> --- 200,204 ---- <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> ! <td nowrap="nowrap" align="right"><span class="gensmall"><b>{L_QUICK_NAV}</b> {MODULE_SELECT_BOX} <input type="submit" value="{S_SUBMIT}" class="liteoption" /></span> *************** *** 186,190 **** <table width="100%" cellpadding="0" cellspacing="0" border="0" class="forumline" align="center"> ! <tr> <td align="center" colspan="5">{RESULT_MESSAGE}</td> </tr> --- 209,213 ---- <table width="100%" cellpadding="0" cellspacing="0" border="0" class="forumline" align="center"> ! <tr> <td align="center" colspan="5">{RESULT_MESSAGE}</td> </tr> *************** *** 192,212 **** <th class="thHead" colspan="5">{L_TITLE}</th> </tr> ! <tr> <td class="catBottom" colspan="5" align="center"> <form action="{S_ACTION}" method="post"> {S_MODULE_INSTALL_LIST}{S_HIDDEN_MODULE_INSTALL_FIELDS}<input class="mainoption" type="submit" name="import_pack" value="{L_IMPORT_PACK}"> ! </form> ! </td> ! </tr> <!-- BEGIN module --> ! <tr title="{L_TITLE}"> <td width="40%" class="catLeft" style="cursor:pointer;cursor:hand;" onclick="onMenuCatClick('{module.MODULE_ID}','adminModule_');"> <span class="cattitle"><img name="adminModule_image_{module.MODULE_ID}" src="{module.IMG_URL}" border="0" align="absmiddle"> <img src="{IMG_ICON_MODULE}" border="0" align="absmiddle"> {module.MODULE_TITLE}</span> <span class="gensmall">{module.MODULE_DESCRIPTION}</span><br /> <span class="gensmall"><i>{module.MODULE_VERSION}</i></span></td> <td width="15%" class="cat" align="center" valign="middle"> ! <!-- BEGIN settings --> <img src="{IMG_URL_EXPAND}" border="0" align="absmiddle"> <span class="cattitle"><a href="{module.U_MODULE}">{L_SETTING}</a></span> ! <!-- END settings --> </td> <td width="15%" class="cat" style="cursor:pointer;cursor:hand;" onclick="onMenuCatClick('{module.MODULE_ID}','adminModuleUpgrade_');"> ! <!-- BEGIN settings --> <img name="adminModuleUpgrade_image_{module.MODULE_ID}" src="{module.IMG_URL_UPGRADE}" border="0" align="absmiddle"> <span class="genmed">{L_UPGRADE_PACK}</span> <!-- END settings --> --- 215,235 ---- <th class="thHead" colspan="5">{L_TITLE}</th> </tr> ! <tr> <td class="catBottom" colspan="5" align="center"> <form action="{S_ACTION}" method="post"> {S_MODULE_INSTALL_LIST}{S_HIDDEN_MODULE_INSTALL_FIELDS}<input class="mainoption" type="submit" name="import_pack" value="{L_IMPORT_PACK}"> ! </form> ! </td> ! </tr> <!-- BEGIN module --> ! <tr title="{L_TITLE}"> <td width="40%" class="catLeft" style="cursor:pointer;cursor:hand;" onclick="onMenuCatClick('{module.MODULE_ID}','adminModule_');"> <span class="cattitle"><img name="adminModule_image_{module.MODULE_ID}" src="{module.IMG_URL}" border="0" align="absmiddle"> <img src="{IMG_ICON_MODULE}" border="0" align="absmiddle"> {module.MODULE_TITLE}</span> <span class="gensmall">{module.MODULE_DESCRIPTION}</span><br /> <span class="gensmall"><i>{module.MODULE_VERSION}</i></span></td> <td width="15%" class="cat" align="center" valign="middle"> ! <!-- BEGIN settings --> <img src="{IMG_URL_EXPAND}" border="0" align="absmiddle"> <span class="cattitle"><a href="{module.U_MODULE}">{L_SETTING}</a></span> ! <!-- END settings --> </td> <td width="15%" class="cat" style="cursor:pointer;cursor:hand;" onclick="onMenuCatClick('{module.MODULE_ID}','adminModuleUpgrade_');"> ! <!-- BEGIN settings --> <img name="adminModuleUpgrade_image_{module.MODULE_ID}" src="{module.IMG_URL_UPGRADE}" border="0" align="absmiddle"> <span class="genmed">{L_UPGRADE_PACK}</span> <!-- END settings --> *************** *** 215,236 **** <!-- BEGIN settings --> <img name="adminModuleExport_image_{module.MODULE_ID}" src="{module.IMG_URL_EXPORT}" border="0" align="absmiddle"> <span class="genmed">{L_EXPORT_PACK}</span> ! <!-- END settings --> </td> <td width="15%" class="catRight" style="cursor:pointer;cursor:hand;" onclick="onMenuCatClick('{module.MODULE_ID}','adminModuleDelete_');"> <!-- BEGIN settings --> <img name="adminModuleDelete_image_{module.MODULE_ID}" src="{module.IMG_URL_DELETE}" border="0" align="absmiddle"> <span class="genmed">{L_UNINSTALL}</span> ! <!-- END settings --> </td> ! </tr> <!-- Module Delete --> <tr> <td colspan="5" class="row1"> ! <div id="adminModuleDelete_{module.MODULE_ID}" style="display:{module.VISIBLE_DELETE};" class="genmed"> <table width="100%" cellpadding="1" cellspacing="2" border="0" align="center"> ! <tr> <td class="row2" colspan="2" align="center" style="cursor:pointer;cursor:hand;" onclick="onMenuCatClick('{module.MODULE_ID}','adminModuleDelete_');"><img src="{IMG_URL_CONTRACT}" border="0" align="absmiddle"> <span class="topictitle">{L_UNINSTALL}</span></td> </tr> ! <tr> <td width="50%" align="center" colspan="2">{module.MESSAGE_DELETE}</td> </tr> --- 238,259 ---- <!-- BEGIN settings --> <img name="adminModuleExport_image_{module.MODULE_ID}" src="{module.IMG_URL_EXPORT}" border="0" align="absmiddle"> <span class="genmed">{L_EXPORT_PACK}</span> ! <!-- END settings --> </td> <td width="15%" class="catRight" style="cursor:pointer;cursor:hand;" onclick="onMenuCatClick('{module.MODULE_ID}','adminModuleDelete_');"> <!-- BEGIN settings --> <img name="adminModuleDelete_image_{module.MODULE_ID}" src="{module.IMG_URL_DELETE}" border="0" align="absmiddle"> <span class="genmed">{L_UNINSTALL}</span> ! <!-- END settings --> </td> ! </tr> <!-- Module Delete --> <tr> <td colspan="5" class="row1"> ! <div id="adminModuleDelete_{module.MODULE_ID}" style="display:{module.VISIBLE_DELETE};" class="genmed"> <table width="100%" cellpadding="1" cellspacing="2" border="0" align="center"> ! <tr> <td class="row2" colspan="2" align="center" style="cursor:pointer;cursor:hand;" onclick="onMenuCatClick('{module.MODULE_ID}','adminModuleDelete_');"><img src="{IMG_URL_CONTRACT}" border="0" align="absmiddle"> <span class="topictitle">{L_UNINSTALL}</span></td> </tr> ! <tr> <td width="50%" align="center" colspan="2">{module.MESSAGE_DELETE}</td> </tr> *************** *** 239,253 **** </td> </tr> ! <!-- Module Delete --> ! <!-- Module Upgrade --> <tr> <td colspan="5" class="row1"> ! <div id="adminModuleUpgrade_{module.MODULE_ID}" style="display:{module.VISIBLE_UPGRADE};" class="genmed"> <table width="100%" cellpadding="1" cellspacing="2" border="0" align="center"> ! <tr> <td class="row2" colspan="2" align="center" style="cursor:pointer;cursor:hand;" onclick="onMenuCatClick('{module.MODULE_ID}','adminModuleUpgrade_');"><img src="{IMG_URL_CONTRACT}" border="0" align="absmiddle"> <span class="topictitle">{L_UPGRADE_PACK}</span></td> </tr> ! <tr> <td width="50%" align="center" colspan="2">{module.MESSAGE_UPGRADE}</td> </tr> --- 262,276 ---- </td> </tr> ! <!-- Module Delete --> ! <!-- Module Upgrade --> <tr> <td colspan="5" class="row1"> ! <div id="adminModuleUpgrade_{module.MODULE_ID}" style="display:{module.VISIBLE_UPGRADE};" class="genmed"> <table width="100%" cellpadding="1" cellspacing="2" border="0" align="center"> ! <tr> <td class="row2" colspan="2" align="center" style="cursor:pointer;cursor:hand;" onclick="onMenuCatClick('{module.MODULE_ID}','adminModuleUpgrade_');"><img src="{IMG_URL_CONTRACT}" border="0" align="absmiddle"> <span class="topictitle">{L_UPGRADE_PACK}</span></td> </tr> ! <tr> <td width="50%" align="center" colspan="2">{module.MESSAGE_UPGRADE}</td> </tr> *************** *** 256,270 **** </td> </tr> ! <!-- Module Upgrade --> ! <!-- Module Export --> <tr> <td colspan="5" class="row1"> ! <div id="adminModuleExport_{module.MODULE_ID}" style="display:{module.VISIBLE_EXPORT};" class="genmed"> <table width="100%" cellpadding="1" cellspacing="2" border="0" align="center"> ! <tr> <td class="row2" colspan="2" align="center" style="cursor:pointer;cursor:hand;" onclick="onMenuCatClick('{module.MODULE_ID}','adminModuleExport_');"><img src="{IMG_URL_CONTRACT}" border="0" align="absmiddle"> <span class="topictitle">{L_EXPORT_PACK}</span></td> </tr> ! <tr> <td width="50%" align="center" colspan="2">{module.MESSAGE_EXPORT}</td> </tr> --- 279,293 ---- </td> </tr> ! <!-- Module Upgrade --> ! <!-- Module Export --> <tr> <td colspan="5" class="row1"> ! <div id="adminModuleExport_{module.MODULE_ID}" style="display:{module.VISIBLE_EXPORT};" class="genmed"> <table width="100%" cellpadding="1" cellspacing="2" border="0" align="center"> ! <tr> <td class="row2" colspan="2" align="center" style="cursor:pointer;cursor:hand;" onclick="onMenuCatClick('{module.MODULE_ID}','adminModuleExport_');"><img src="{IMG_URL_CONTRACT}" border="0" align="absmiddle"> <span class="topictitle">{L_EXPORT_PACK}</span></td> </tr> ! <tr> <td width="50%" align="center" colspan="2">{module.MESSAGE_EXPORT}</td> </tr> *************** *** 274,313 **** </tr> <!-- Module Export --> ! <!-- Module Settings --> <tr> <td colspan="5" class="row1"> ! <div id="adminModule_{module.MODULE_ID}" style="display:{module.VISIBLE};" class="genmed"> ! <form action="{S_ACTION}" method="post"> <table width="100%" cellpadding="1" cellspacing="2" border="0" align="center"> ! <tr> <td class="row2" colspan="2" align="center" style="cursor:pointer;cursor:hand;" onclick="onMenuCatClick('{module.MODULE_ID}','adminModule_');"><img src="{IMG_URL_CONTRACT}" border="0" align="absmiddle"> <span class="topictitle">{module.L_TITLE}</span></td> </tr> ! <tr> <td width="50%" align="right" >{L_MODULE_NAME}</td> <td ><input type="text" size="50" name="module_name" value="{module.E_MODULE_NAME}" class="post" /></td> </tr> ! <tr> <td width="50%" align="right" >{L_MODULE_DESC}</td> <td ><input type="text" size="50" name="module_desc" value="{module.E_MODULE_DESC}" class="post" /></td> </tr> ! <tr> <td width="50%" align="right" >{L_MODULE_PATH}</td> <td ><input type="text" size="50" name="module_path" value="{module.E_MODULE_PATH}" class="post" /></td> </tr> ! <tr> <td width="50%" align="right" >{L_MODULE_INCLUDE_ADMIN}</td> <td ><input type="checkbox" size="45" name="module_include_admin" value="1" {module.E_MODULE_INCLUDE_CHECK_OPT}/></td> </tr> ! <tr> <td class="row2" colspan="2" align="center">{module.S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{module.S_SUBMIT}" class="liteoption" /></td> </tr> </table> ! </form> </div> </td> </tr> ! <!-- Module Settings --> ! <!-- END module --> </table> --- 297,336 ---- </tr> <!-- Module Export --> ! <!-- Module Settings --> <tr> <td colspan="5" class="row1"> ! <div id="adminModule_{module.MODULE_ID}" style="display:{module.VISIBLE};" class="genmed"> ! <form action="{S_ACTION}" onsubmit="return checkForm(this)" name="post" method="post"> <table width="100%" cellpadding="1" cellspacing="2" border="0" align="center"> ! <tr> <td class="row2" colspan="2" align="center" style="cursor:pointer;cursor:hand;" onclick="onMenuCatClick('{module.MODULE_ID}','adminModule_');"><img src="{IMG_URL_CONTRACT}" border="0" align="absmiddle"> <span class="topictitle">{module.L_TITLE}</span></td> </tr> ! <tr> <td width="50%" align="right" >{L_MODULE_NAME}</td> <td ><input type="text" size="50" name="module_name" value="{module.E_MODULE_NAME}" class="post" /></td> </tr> ! <tr> <td width="50%" align="right" >{L_MODULE_DESC}</td> <td ><input type="text" size="50" name="module_desc" value="{module.E_MODULE_DESC}" class="post" /></td> </tr> ! <tr> <td width="50%" align="right" >{L_MODULE_PATH}</td> <td ><input type="text" size="50" name="module_path" value="{module.E_MODULE_PATH}" class="post" /></td> </tr> ! <tr> <td width="50%" align="right" >{L_MODULE_INCLUDE_ADMIN}</td> <td ><input type="checkbox" size="45" name="module_include_admin" value="1" {module.E_MODULE_INCLUDE_CHECK_OPT}/></td> </tr> ! <tr> <td class="row2" colspan="2" align="center">{module.S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{module.S_SUBMIT}" class="liteoption" /></td> </tr> </table> ! </form> </div> </td> </tr> ! <!-- Module Settings --> ! <!-- END module --> </table> |