[Vtigercrm-commits] [vtiger-commits] r4936 - in /vtigercrm/trunk: Smarty/templates/ Smarty/templates/Settings/ modules/Settings/ modules/Settings/language/ themes/blue/images/
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu Apr 6 09:09:43 EDT 2006
Author: saraj
Date: Thu Apr 6 07:09:20 2006
New Revision: 4936
Log:
files added and code modified to integrate new UI for picklistsettings
Added:
vtigercrm/trunk/Smarty/templates/Settings/EditPickList.tpl
vtigercrm/trunk/Smarty/templates/Settings/PickList.tpl
vtigercrm/trunk/Smarty/templates/Settings/PickListContents.tpl
vtigercrm/trunk/modules/Settings/PickList.php
vtigercrm/trunk/themes/blue/images/one.gif (with props)
vtigercrm/trunk/themes/blue/images/picklistEditor.gif (with props)
vtigercrm/trunk/themes/blue/images/two.gif (with props)
Modified:
vtigercrm/trunk/Smarty/templates/Settings.tpl
vtigercrm/trunk/Smarty/templates/SettingsMenu.tpl
vtigercrm/trunk/modules/Settings/EditComboField.php
vtigercrm/trunk/modules/Settings/UpdateComboValues.php
vtigercrm/trunk/modules/Settings/language/en_us.lang.php
Modified: vtigercrm/trunk/Smarty/templates/Settings.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/Settings.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/Settings.tpl Thu Apr 6 07:09:20 2006
@@ -70,8 +70,8 @@
<td width="25%"><a href="index.php?module=Settings&action=SettingsSubMenu&type=CustomField&parenttab=Settings"><img src="{$IMAGE_PATH}user_mgmt.gif" border="0" alt="{$MOD.LBL_CREATE_AND_MANAGE_USER_DEFINED_FIELDS}" title="{$MOD.LBL_CREATE_AND_MANAGE_USER_DEFINED_FIELDS}"/></a><br />
<a href="index.php?module=Settings&action=SettingsSubMenu&type=CustomField&parenttab=Settings" alt="{$MOD.LBL_CREATE_AND_MANAGE_USER_DEFINED_FIELDS}" title="{$MOD.LBL_CREATE_AND_MANAGE_USER_DEFINED_FIELDS}">{$MOD.LBL_CUSTOM_FIELD_SETTINGS}</a></td>
-<td width="25%"><a href="index.php?module=Settings&action=SettingsSubMenu&type=PickList&parenttab=Settings"><img src="{$IMAGE_PATH}user_mgmt.gif" alt="{$MOD.LBL_EDIT_PICKLIST_VALUES}" title="{$MOD.LBL_EDIT_PICKLIST_VALUES}" border="0"/></a><br />
-<a href="index.php?module=Settings&action=SettingsSubMenu&type=PickList&parenttab=Settings" alt="{$MOD.LBL_EDIT_PICKLIST_VALUES}" title="{$MOD.LBL_EDIT_PICKLIST_VALUES}">{$MOD.LBL_PICKLIST_SETTINGS}</a> </td>
+<td width="25%"><a href="index.php?module=Settings&action=PickList&parenttab=Settings"><img src="{$IMAGE_PATH}user_mgmt.gif" alt="{$MOD.LBL_EDIT_PICKLIST_VALUES}" title="{$MOD.LBL_EDIT_PICKLIST_VALUES}" border="0"/></a><br />
+<a href="index.php?module=Settings&action=PickList&parenttab=Settings" alt="{$MOD.LBL_EDIT_PICKLIST_VALUES}" title="{$MOD.LBL_EDIT_PICKLIST_VALUES}">{$MOD.LBL_PICKLIST_SETTINGS}</a> </td>
<td width="25%"><a href="index.php?module=Settings&action=SettingsSubMenu&type=FieldOrder&parenttab=Settings"><img src="{$IMAGE_PATH}user_mgmt.gif" alt="{$MOD.LBL_FIELD_ORDERING_DESC}" title="{$MOD.LBL_FIELD_ORDERING_DESC}" border="0" /></a><br />
<a href="index.php?module=Settings&action=SettingsSubMenu&type=FieldOrder&parenttab=Settings" alt="{$MOD.LBL_FIELD_ORDERING_DESC}" title="{$MOD.LBL_FIELD_ORDERING_DESC}">{$MOD.LBL_FIELD_ORDERING}</a> </td>
Modified: vtigercrm/trunk/Smarty/templates/SettingsMenu.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/SettingsMenu.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/SettingsMenu.tpl Thu Apr 6 07:09:20 2006
@@ -35,7 +35,7 @@
<div id="top2">
<div id="studio" style="height:70px;">
<a href="index.php?module=Settings&action=SettingsSubMenu&type=CustomField&parenttab=Settings" class="lftSubMnu" onmouseover="fnvsh(this,'subMnuCusFld')" onmouseout="fninvsh('subMnuCusFld')">{$MOD.LBL_CUSTOM_FIELD_SETTINGS}</a>
- <a href="index.php?module=Settings&action=SettingsSubMenu&type=PickList&parenttab=Settings" class="lftSubMnu" onmouseover="fnvsh(this,'subMnuPickList')" onmouseout="fninvsh('subMnuPickList')">{$MOD.LBL_PICKLIST_SETTINGS}</a>
+ <a href="index.php?module=Settings&action=PickList&parenttab=Settings" class="lftSubMnu">{$MOD.LBL_PICKLIST_SETTINGS}</a>
<a href="index.php?module=Settings&action=SettingsSubMenu&type=FieldOrder&parenttab=Settings" class="lftSubMnu" onmouseover="fnvsh(this,'subMnuEditFld')" onmouseout="fninvsh('subMnuEditFld')">{$MOD.LBL_FIELD_ORDERING}</a>
</div></div>
Modified: vtigercrm/trunk/modules/Settings/EditComboField.php
==============================================================================
--- vtigercrm/trunk/modules/Settings/EditComboField.php (original)
+++ vtigercrm/trunk/modules/Settings/EditComboField.php Thu Apr 6 07:09:20 2006
@@ -9,41 +9,35 @@
*
********************************************************************************/
require_once('include/database/PearDatabase.php');
-require_once('XTemplate/xtpl.php');
+require_once('Smarty_setup.php');
global $mod_strings;
global $app_strings;
global $app_list_strings;
-$fld_module=$_REQUEST["fld_module"];
-$fld_name=$_REQUEST["fld_name"];
-$tableName=$_REQUEST["table_name"];
-$columnName=$_REQUEST["column_name"];
-
-echo get_module_title("Settings", $mod_strings['LBL_MODULE_NAME'].": ".$fld_module." ".$mod_strings['EditPickListValues'], true);
-echo '<br>';
+$tableName=$_REQUEST["fieldname"];
+$moduleName=$_REQUEST["fld_module"];
global $theme;
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
require_once($theme_path.'layout_utils.php');
-$xtpl=new XTemplate ('modules/Settings/EditField.html');
-$xtpl->assign("MOD", $mod_strings);
-$xtpl->assign("APP", $app_strings);
-$xtpl->assign("FIELDNAME", $fld_name);
-$xtpl->assign("TABLENAME", $tableName);
-$xtpl->assign("COLUMNNAME", $columnName);
-$xtpl->assign("FIELDMODULE", $fld_module);
+$smarty = new vtigerCRM_Smarty;
$query = "select * from ".$tableName ;//." order by sortorderid";
$result = $adb->query($query);
$fldVal='';
while($row = $adb->fetch_array($result))
{
- $fldVal .= $row[$columnName];
+ $fldVal .= $row[$tableName];
$fldVal .= "\n";
}
-$xtpl->assign("FLDVALUES", $fldVal);
-$xtpl->parse("main");
-$xtpl->out("main");
+$smarty->assign("ENTRIES",$fldVal);
+$smarty->assign("MODULE",$moduleName);
+$smarty->assign("FIELDNAME",$tableName);
+$smarty->assign("MOD", return_module_language($current_language,'Settings'));
+$smarty->assign("IMAGE_PATH",$image_path);
+$smarty->assign("APP", $app_strings);
+$smarty->assign("CMOD", $mod_strings);
+$smarty->display("Settings/EditPickList.tpl");
?>
Modified: vtigercrm/trunk/modules/Settings/UpdateComboValues.php
==============================================================================
--- vtigercrm/trunk/modules/Settings/UpdateComboValues.php (original)
+++ vtigercrm/trunk/modules/Settings/UpdateComboValues.php Thu Apr 6 07:09:20 2006
@@ -9,16 +9,14 @@
*
********************************************************************************/
require_once('include/database/PearDatabase.php');
-$fld_module=$_REQUEST["field_module"];
-$fldName=$_REQUEST["field_name"];
+$fld_module=$_REQUEST["fld_module"];
$tableName=$_REQUEST["table_name"];
-$columnName=$_REQUEST["column_name"];
$fldPickList = $_REQUEST['listarea'];
//Deleting the already existing values
-//$delquery="truncate ".$tableName;
$delquery="delete from ".$tableName;
$adb->query($delquery);
+
$pickArray = explode("\n",$fldPickList);
$count = count($pickArray);
@@ -36,9 +34,8 @@
$query = "insert into ".$tableName." values('".$pickArray[$i]."')";
else
$query = "insert into ".$tableName." values('','".$pickArray[$i]."',".$i.",1)";
-
- $adb->query($query);
+ $adb->query($query);
}
}
-header("Location:index.php?module=Settings&action=EditComboField&fld_module=".$fld_module."&fld_name=".$fldName."&table_name=".$tableName."&column_name=".$columnName);
+header("Location:index.php?action=SettingsAjax&module=Settings&directmode=ajax&file=PickList&fld_module=".$fld_module);
?>
Modified: vtigercrm/trunk/modules/Settings/language/en_us.lang.php
==============================================================================
--- vtigercrm/trunk/modules/Settings/language/en_us.lang.php (original)
+++ vtigercrm/trunk/modules/Settings/language/en_us.lang.php Thu Apr 6 07:09:20 2006
@@ -543,6 +543,12 @@
'LBL_EMAIL_CONTENTS'=>'Email Contents',
'LBL_SUBJECT'=>'Subject',
'LBL_MESSAGE'=>'Message',
+'LBL_PICKLIST_EDITOR'=>'Picklist Editor',
+'LBL_PICKLIST_AVAIL'=>'Picklists Availabe in',
+'LBL_PICKLIST_AVAILINFO1'=>'The picklists available in',
+'LBL_PICKLIST_AVAILINFO2'=>'are shown below. Click Edit to modify the contents of the list.',
+'LBL_EDIT_PICKLIST'=>'Edit Pick List',
+'LBL_PICKLIST_SAVEINFO'=>'Type the entries one - by - one below and click the Save button to save the list.',
);
More information about the vtigercrm-commits
mailing list