[Vtigercrm-commits] [vtiger-commits] r7335 - in /vtigercrm/trunk/Smarty/templates/Settings: EditPickList.tpl PickList.tpl PickListContents.tpl
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Jun 21 04:44:40 EDT 2006
Author: saraj
Date: Wed Jun 21 02:44:35 2006
New Revision: 7335
Log:
Updated Pick lIst files
Modified:
vtigercrm/trunk/Smarty/templates/Settings/EditPickList.tpl
vtigercrm/trunk/Smarty/templates/Settings/PickList.tpl
vtigercrm/trunk/Smarty/templates/Settings/PickListContents.tpl
Modified: vtigercrm/trunk/Smarty/templates/Settings/EditPickList.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/Settings/EditPickList.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/Settings/EditPickList.tpl Wed Jun 21 02:44:35 2006
@@ -33,8 +33,8 @@
<tr><td style="border-bottom: 1px dashed rgb(204, 204, 204);" colspan="2"> </td></tr>
<tr>
<td colspan="2" align="center">
- <input name="save" value=" Save " class="classBtn" onClick="SavePickList('{$FIELDNAME}','{$MODULE}');" type="button">
- <input name="cancel" value=" Cancel " class="classBtn" onClick="hide('editdiv');" type="button">
+ <input name="save" value=" Save " class="crmButton small save" onClick="SavePickList('{$FIELDNAME}','{$MODULE}');" type="button">
+ <input name="cancel" value=" Cancel " class="crmButton small cancel" onClick="hide('editdiv');" type="button">
</td>
</tr>
<tr><td colspan="2" style="border-top: 1px dashed rgb(204, 204, 204);"> </td></tr>
Modified: vtigercrm/trunk/Smarty/templates/Settings/PickList.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/Settings/PickList.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/Settings/PickList.tpl Wed Jun 21 02:44:35 2006
@@ -1,212 +1,219 @@
-{*<!--
-/*********************************************************************************
- ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
- * ("License"); You may not use this file except in compliance with the License
- * The Original Code is: vtiger CRM Open Source
- * The Initial Developer of the Original Code is vtiger.
- * Portions created by vtiger are Copyright (C) vtiger.
- * All Rights Reserved.
- *
- ********************************************************************************/
--->*}
-<script language="JavaScript" type="text/javascript" src="include/js/menu.js"></script>
-<script src="include/scriptaculous/prototype.js" type="text/javascript"></script>
-<script src="include/scriptaculous/scriptaculous.js" type="text/javascript"></script>
-<script>
-{literal}
-function splitvalues() {
- var picklistobj=getobj("listarea")
- var picklistcontent=picklistobj.value
- var picklistary=new array()
- var i=0;
-
- //splitting up of values
- if (picklistcontent.indexof("\n")!=-1) {
- while(picklistcontent.indexof("\n")!=-1) {
- if (picklistcontent.replace(/^\s+/g, '').replace(/\s+$/g, '').length>0) {
- picklistary[i]=picklistcontent.substr(0,picklistcontent.indexof("\n")).replace(/^\s+/g, '').replace(/\s+$/g, '')
- picklistcontent=picklistcontent.substr(picklistcontent.indexof("\n")+1,picklistcontent.length)
- i++
- } else break;
- }
- } else if (picklistcontent.replace(/^\s+/g, '').replace(/\s+$/g, '').length>0) {
- picklistary[0]=picklistcontent.replace(/^\s+/g, '').replace(/\s+$/g, '')
- }
-
- return picklistary;
-}
-function setdefaultlist() {
- var picklistary=new array()
- picklistary=splitvalues()
-
- getobj("defaultlist").innerhtml=""
-
- for (i=0;i<picklistary.length;i++) {
- var objoption=document.createelement("option")
- if (browser_ie) {
- objoption.innertext=picklistary[i]
- objoption.value=picklistary[i]
- } else if (browser_nn4 || browser_nn6) {
- objoption.text=picklistary[i]
- objoption.setattribute("value",picklistary[i])
- }
-
- getobj("defaultlist").appendchild(objoption)
- }
-}
-function validate() {
- if (emptycheck("listarea","picklist values")) {
- var picklistary=new array()
- picklistary=splitvalues()
- //empty check validation
- for (i=0;i<picklistary.length;i++) {
- if (picklistary[i]=="") {
- alert("picklist value cannot be empty")
- picklistobj.focus()
- return false
- }
- }
-
- //duplicate values' validation
- for (i=0;i<picklistary.length;i++) {
- for (j=i+1;j<picklistary.length;j++) {
- if (picklistary[i]==picklistary[j]) {
- alert("duplicate values found")
- picklistobj.focus()
- return false
- }
- }
- }
-
- return true;
- }
-}
-
-{/literal}
-</script>
-<style type="text/css">@import url(themes/blue/style.css);</style>
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
-<tr>
- {include file='SettingsMenu.tpl'}
-<td width="75%" valign="top">
-
-<table width="100%" border="0" cellpadding="0" cellspacing="0" height="100%">
-<td class="showPanelBg" valign="top" width="100%" colspan="3" style="padding-left:20px; "><br/>
-<span class="lvtHeaderText"><b><a href="index.php?module=Settings&action=index&parenttab=Settings">{$MOD.LBL_SETTINGS} </a> > {$MOD.LBL_STUDIO} > {$MOD.LBL_PICKLIST_SETTINGS}</b></span>
-<hr noshade="noshade" size="1" />
-</td>
-</tr>
-<tr>
-<td width="75%" style="padding-left:20px;" valign="top">
-
- <table class="leadTable" align="center" cellpadding="5" cellspacing="0" width="95%">
- <tbody><tr>
- <td style="border-bottom: 2px dotted rgb(204, 204, 204); padding: 5px;" width="5%">
- <img src="{$IMAGE_PATH}picklistEditor.gif" align="left">
- </td>
- <td style="border-bottom: 2px dotted rgb(170, 170, 170); padding: 5px;">
- <span class="genHeaderGrayBig">{$MOD.LBL_PICKLIST_EDITOR}</span><br>
-
- </td>
- </tr>
- <tr><td colspan="2"> </td></tr>
- <tr>
- <td align="right"><img src="{$IMAGE_PATH}one.gif"></td>
- <td><b class="lvtHeaderText">{$MOD.LBL_SELECT_MODULE}</b></td>
- </tr>
-
- <tr>
- <td> </td>
- <td>
- {$MOD.LBL_SELECT_CRM_MODULE} :
- <select name="pickmodule" class="importBox" onChange="changeModule(this);">
- {foreach key=tabid item=module from=$MODULE_LISTS}
- <option value="{$module}">{$module}</option>
- {/foreach}
- </select>
- </td>
- </tr>
- <tr><td colspan="2"> </td></tr>
- <tr>
-
- <td align="right" valign="top"><img src="{$IMAGE_PATH}two.gif" height="31" width="29"></td>
- <td rowspan="2">
- <div id="picklist_datas">
- {include file='Settings/PickListContents.tpl'}
- </div>
- </td>
- </tr>
- <tr>
- <td> </td>
- </tr>
- <tr><td colspan="2"> </td></tr>
- </tbody>
- </table>
-
-
-
-</td>
-<td width="1%" style="border-right:1px dotted #CCCCCC;"> </td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
- {include file='SettingsSubMenu.tpl'}
-<div id="editdiv" style="display:block;position:absolute;width:510px;"></div>
-{literal}
-<script>
-function SavePickList(fieldname,module)
-{
- $("status").style.display="inline";
- Effect.Puff($('editdiv'),{duration:2});
- var body = $("picklist_values").value;
- new Ajax.Request(
- 'index.php',
- {queue: {position: 'end', scope: 'command'},
- method: 'post',
- postBody: 'action=SettingsAjax&module=Settings&directmode=ajax&file=UpdateComboValues&table_name='+fieldname+'&fld_module='+module+'&listarea='+body,
- onComplete: function(response) {
- $("status").style.display="none";
- $("picklist_datas").innerHTML=response.responseText;
- }
- }
- );
-}
-function changeModule(pickmodule)
-{
- $("status").style.display="inline";
- var module=pickmodule.options[pickmodule.options.selectedIndex].value;
- new Ajax.Request(
- 'index.php',
- {queue: {position: 'end', scope: 'command'},
- method: 'post',
- postBody: 'action=SettingsAjax&module=Settings&directmode=ajax&file=PickList&fld_module='+module,
- onComplete: function(response) {
- $("status").style.display="none";
- $("picklist_datas").innerHTML=response.responseText;
- }
- }
- );
-}
-function fetchEditPickList(module,fieldname)
-{
- $("status").style.display="inline";
- new Ajax.Request(
- 'index.php',
- {queue: {position: 'end', scope: 'command'},
- method: 'post',
- postBody: 'action=SettingsAjax&module=Settings&mode=edit&file=EditComboField&fld_module='+module+'&fieldname='+fieldname,
- onComplete: function(response) {
- $("status").style.display="none";
- $("editdiv").innerHTML=response.responseText;
- Effect.Grow('editdiv');
- }
- }
- );
-}
-</script>
-{/literal}
+{*<!--
+/*********************************************************************************
+ ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
+ * ("License"); You may not use this file except in compliance with the License
+ * The Original Code is: vtiger CRM Open Source
+ * The Initial Developer of the Original Code is vtiger.
+ * Portions created by vtiger are Copyright (C) vtiger.
+ * All Rights Reserved.
+ *
+ ********************************************************************************/
+-->*}
+<script language="JAVASCRIPT" type="text/javascript" src="include/js/smoothscroll.js"></script>
+<script language="JavaScript" type="text/javascript" src="include/js/menu.js"></script>
+<script src="include/scriptaculous/prototype.js" type="text/javascript"></script>
+<script src="include/scriptaculous/scriptaculous.js" type="text/javascript"></script>
+<script>
+{literal}
+function splitvalues() {
+ var picklistobj=getobj("listarea")
+ var picklistcontent=picklistobj.value
+ var picklistary=new array()
+ var i=0;
+
+ //splitting up of values
+ if (picklistcontent.indexof("\n")!=-1) {
+ while(picklistcontent.indexof("\n")!=-1) {
+ if (picklistcontent.replace(/^\s+/g, '').replace(/\s+$/g, '').length>0) {
+ picklistary[i]=picklistcontent.substr(0,picklistcontent.indexof("\n")).replace(/^\s+/g, '').replace(/\s+$/g, '')
+ picklistcontent=picklistcontent.substr(picklistcontent.indexof("\n")+1,picklistcontent.length)
+ i++
+ } else break;
+ }
+ } else if (picklistcontent.replace(/^\s+/g, '').replace(/\s+$/g, '').length>0) {
+ picklistary[0]=picklistcontent.replace(/^\s+/g, '').replace(/\s+$/g, '')
+ }
+
+ return picklistary;
+}
+function setdefaultlist() {
+ var picklistary=new array()
+ picklistary=splitvalues()
+
+ getobj("defaultlist").innerhtml=""
+
+ for (i=0;i<picklistary.length;i++) {
+ var objoption=document.createelement("option")
+ if (browser_ie) {
+ objoption.innertext=picklistary[i]
+ objoption.value=picklistary[i]
+ } else if (browser_nn4 || browser_nn6) {
+ objoption.text=picklistary[i]
+ objoption.setattribute("value",picklistary[i])
+ }
+
+ getobj("defaultlist").appendchild(objoption)
+ }
+}
+function validate() {
+ if (emptycheck("listarea","picklist values")) {
+ var picklistary=new array()
+ picklistary=splitvalues()
+ //empty check validation
+ for (i=0;i<picklistary.length;i++) {
+ if (picklistary[i]=="") {
+ alert("picklist value cannot be empty")
+ picklistobj.focus()
+ return false
+ }
+ }
+
+ //duplicate values' validation
+ for (i=0;i<picklistary.length;i++) {
+ for (j=i+1;j<picklistary.length;j++) {
+ if (picklistary[i]==picklistary[j]) {
+ alert("duplicate values found")
+ picklistobj.focus()
+ return false
+ }
+ }
+ }
+
+ return true;
+ }
+}
+
+{/literal}
+</script>
+<br>
+<table align="center" border="0" cellpadding="0" cellspacing="0" width="98%">
+<tbody><tr>
+ <td valign="top"><img src="{$IMAGE_PATH}showPanelTopLeft.gif"></td>
+ <td class="showPanelBg" style="padding: 10px;" valign="top" width="100%">
+<br>
+ <div align=center>
+
+ {include file='SetMenu.tpl'}
+ <!-- DISPLAY -->
+ <table border=0 cellspacing=0 cellpadding=5 width=100% class="settingsSelUITopLine">
+ <tr>
+ <td width=50 rowspan=2 valign=top><img src="{$IMAGE_PATH}picklist.gif" width="48" height="48" border=0 ></td>
+ <td class=heading2 valign=bottom><b><a href="index.php?module=Settings&action=index&parenttab=Settings">{$MOD.LBL_SETTINGS}</a> > {$MOD.LBL_PICKLIST_EDITOR}</b></td>
+ </tr>
+ <tr>
+ <td valign=top class="small">{$MOD.LBL_PICKLIST_DESC}</td>
+ </tr>
+ </table>
+
+
+ <table border=0 cellspacing=0 cellpadding=10 width=100% >
+ <tr>
+ <td valign=top>
+
+ <table border=0 cellspacing=0 cellpadding=5 width=100% class="tableHeading">
+ <tr>
+ <td class="big"><strong>1. {$MOD.LBL_SELECT_MODULE}</strong></td>
+ <td class="small" align=right> </td>
+ </tr>
+ </table>
+ <table width="100%" border="0" cellpadding="5" cellspacing="0" class="small">
+ <tr class="small">
+ <td width="35%" class="small cellLabel"><strong>{$MOD.LBL_SELECT_CRM_MODULE}</strong></td>
+ <td width="65%" class="cellText" >
+ <select name="pickmodule" class="detailedViewTextBox" onChange="changeModule(this);">
+ {foreach key=tabid item=module from=$MODULE_LISTS}
+ <option value="{$module}">{$APP.$module}</option>
+ {/foreach}
+ </select>
+ </td>
+ </tr>
+ </table>
+ <br>
+ <table border=0 cellspacing=0 cellpadding=5 width=100% class="tableHeading">
+ <tr>
+ <td class="big" rowspan="2">
+ <div id="picklist_datas">
+ {include file='Settings/PickListContentsN.tpl'}
+ </div>
+ </td>
+ </td>
+ </tr>
+ </table>
+ <table border=0 cellspacing=0 cellpadding=5 width=100% >
+ <tr><td class="small" nowrap align=right><a href="#top">Scroll to Top</a></td></tr>
+ </table>
+
+ </td>
+ </tr>
+ </table>
+
+
+
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ </div>
+
+</td>
+ <td valign="top"><img src="{$IMAGE_PATH}showPanelTopRight.gif"></td>
+ </tr>
+</tbody>
+</table>
+<div id="editdiv" style="display:block;position:absolute;width:510px;"></div>
+{literal}
+<script>
+function SavePickList(fieldname,module)
+{
+ $("status").style.display="inline";
+ Effect.Puff($('editdiv'),{duration:2});
+ var body = $("picklist_values").value;
+ new Ajax.Request(
+ 'index.php',
+ {queue: {position: 'end', scope: 'command'},
+ method: 'post',
+ postBody: 'action=SettingsAjax&module=Settings&directmode=ajax&file=UpdateComboValues&table_name='+fieldname+'&fld_module='+module+'&listarea='+body,
+ onComplete: function(response) {
+ $("status").style.display="none";
+ $("picklist_datas").innerHTML=response.responseText;
+ }
+ }
+ );
+}
+function changeModule(pickmodule)
+{
+ $("status").style.display="inline";
+ var module=pickmodule.options[pickmodule.options.selectedIndex].value;
+ new Ajax.Request(
+ 'index.php',
+ {queue: {position: 'end', scope: 'command'},
+ method: 'post',
+ postBody: 'action=SettingsAjax&module=Settings&directmode=ajax&file=PickList&fld_module='+module,
+ onComplete: function(response) {
+ $("status").style.display="none";
+ $("picklist_datas").innerHTML=response.responseText;
+ }
+ }
+ );
+}
+function fetchEditPickList(module,fieldname)
+{
+ $("status").style.display="inline";
+ new Ajax.Request(
+ 'index.php',
+ {queue: {position: 'end', scope: 'command'},
+ method: 'post',
+ postBody: 'action=SettingsAjax&module=Settings&mode=edit&file=EditComboField&fld_module='+module+'&fieldname='+fieldname,
+ onComplete: function(response) {
+ $("status").style.display="none";
+ $("editdiv").innerHTML=response.responseText;
+ Effect.Grow('editdiv');
+ }
+ }
+ );
+}
+</script>
+{/literal}
Modified: vtigercrm/trunk/Smarty/templates/Settings/PickListContents.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/Settings/PickListContents.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/Settings/PickListContents.tpl Wed Jun 21 02:44:35 2006
@@ -1,46 +1,38 @@
-{*<!--
-/*********************************************************************************
- ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
- * ("License"); You may not use this file except in compliance with the License
- * The Original Code is: vtiger CRM Open Source
- * The Initial Developer of the Original Code is vtiger.
- * Portions created by vtiger are Copyright (C) vtiger.
- * All Rights Reserved.
- *
- ********************************************************************************/
--->*}
-<b class="lvtHeaderText">{$MOD.LBL_PICKLIST_AVAIL} {$MODULE}</b><br>
- {$MOD.LBL_PICKLIST_AVAILINFO1} {$MODULE} {$MOD.LBL_PICKLIST_AVAILINFO2}<br>
- <table style="background-color: rgb(204, 204, 204);" class="small" border="0" cellpadding="5" cellspacing="1" width="90%"><tbody>
-
- {foreach item=picklists from=$PICKLIST_VALUES}
- <tr>
- {foreach item=picklistfields from=$picklists}
- {if $picklistfields neq ''}
- <td class="lvtCol" width="25%">{$picklistfields.fieldlabel}</td>
- <td class="lvtCol" width="5%"><a href="javascript:;" onclick="fetchEditPickList('{$MODULE}','{$picklistfields.fieldname}');posLay(this,'editdiv');">{$MOD.LBL_EDIT}</a></td>
- {else}
- <td class="lvtCol" colspan="2"> </td>
- {/if}
- {/foreach}
- </tr>
-
- <tr bgcolor="#ffffff">
- {foreach item=picklistelements from=$picklists}
- {if $picklistelements neq ''}
- <td colspan="2" valign="top">
- <ul style="list-style-type: none;">
- {foreach item=elements from=$picklistelements.value}
- <li>{$elements}</li>
- {/foreach}
- </ul>
- </td>
- {else}
- <td colspan="2"> </td>
- {/if}
- {/foreach}
- </tr>
- {/foreach}
-
- </tbody></table>
-
+ <strong>2. {$MOD.LBL_PICKLIST_AVAIL} {$MODULE} </strong></td>
+ <td class="small" align=right> </td>
+ </tr>
+ </table>
+ <table border=0 cellspacing=0 cellpadding=0 width=100% class="listTable">
+ <tr>
+ <td valign=top width="50%">
+ <table width="100%" class="listTable" cellpadding="5" cellspacing="0">
+ {foreach item=picklists from=$PICKLIST_VALUES}
+ <tr>
+ {foreach item=picklistfields from=$picklists}
+ {if $picklistfields neq ''}
+ <td class="listTableTopButtons small" valign="top" align="left"><b>{$picklistfields.fieldlabel}</b></td>
+ <td class="listTableTopButtons" valign="top" align="right">
+ <input type="button" value="Edit" class="crmButton small edit" onclick="fetchEditPickList('{$MODULE}','{$picklistfields.fieldname}');posLay(this,'editdiv');" >
+ </td>
+ {else}
+ <td class="listTableTopButtons small" colspan="2"> </td>
+ {/if}
+ {/foreach}
+ </tr>
+ <tr>
+ {foreach item=picklistelements from=$picklists}
+ {if $picklistelements neq ''}
+ <td colspan="2" valign="top">
+ <ul style="list-style-type: none;">
+ {foreach item=elements from=$picklistelements.value}
+ <li>{$elements}</li>
+ {/foreach}
+ </ul>
+ </td>
+ {else}
+ <td colspan="2"> </td>
+ {/if}
+ {/foreach}
+ </tr>
+ {/foreach}
+ </table>
More information about the vtigercrm-commits
mailing list