[Vtigercrm-commits] [vtiger-commits] r5167 - /vtigercrm/trunk/Smarty/templates/CustomFieldList.tpl
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon Apr 17 11:52:04 EDT 2006
Author: saraj
Date: Mon Apr 17 09:52:01 2006
New Revision: 5167
Log:
new UI for customfield has been integrated
Modified:
vtigercrm/trunk/Smarty/templates/CustomFieldList.tpl
Modified: vtigercrm/trunk/Smarty/templates/CustomFieldList.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/CustomFieldList.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/CustomFieldList.tpl Mon Apr 17 09:52:01 2006
@@ -8,20 +8,44 @@
* All Rights Reserved.
*
********************************************************************************/ *}
+<script language="JavaScript" type="text/javascript" src="include/js/customview.js"></script>
<script language="javascript">
function ajaxSaveResponse(response)
{ldelim}
document.getElementById("cfList").innerHTML=response.responseText;
+ //document.getElementById("test").value=response.responseText;
{rdelim}
function getCustomFieldList(customField)
{ldelim}
var ajaxObj = new Ajax(ajaxSaveResponse);
var modulename = customField.options[customField.options.selectedIndex].value;
- var urlstring ="module=Settings&action=CustomFieldList&fld_module="+modulename+"&parenttab=Settings&ajax=true";
+ var urlstring ="module=Settings&action=SettingsAjax&file=CustomFieldList&fld_module="+modulename+"&parenttab=Settings&ajax=true";
ajaxObj.process("index.php?",urlstring);
{rdelim}
+
+function deleteCustomField(id, fld_module, colName, uitype)
+{ldelim}
+ if(confirm("Are you sure?"))
+ {ldelim}
+ document.form.action="index.php?module=Settings&action=DeleteCustomField&fld_module="+fld_module+"&fld_id="+id+"&colName="+colName+"&uitype="+uitype
+ document.form.submit()
+ {rdelim}
+{rdelim}
+
+function ajaxCFSaveResponse(response)
+{ldelim}
+ document.getElementById("createcf").innerHTML=response.responseText;
+{rdelim}
+function getCreateCustomFieldForm(customField,id,tabid,ui)
+{ldelim}
+ var ajaxObj = new Ajax(ajaxCFSaveResponse);
+ var modulename = customField;
+ var urlstring ="module=Settings&action=SettingsAjax&file=CreateCustomField&fld_module="+modulename+"&parenttab=Settings&ajax=true&fieldid="+id+"&tabid="+tabid+"&uitype="+ui;
+ ajaxObj.process("index.php?",urlstring);
+{rdelim}
+
</script>
-
+<div id="createcf" style="display:block;position:absolute;top:175px;left:275px;"></div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
{include file='SettingsMenu.tpl'}
@@ -43,14 +67,15 @@
<img src="images/picklistEditor.gif" align="left" />
</td>
<td style="padding:5px;border-bottom:2px dotted #AAAAAA;">
- <span class="genHeaderGrayBig">Custom Filed Settings</span>
+ <span class="genHeaderGrayBig">Custom Field Settings</span>
<br />
<span class="big">Feature Explanation......</span>
+ {*<textarea rows=20 cols=70 id="test"></textarea>*}
</td>
</tr>
<tr><td colspan="2"> </td></tr>
<tr>
- <td align="right"><img src="images/one.gif" /></td>
+ <td align="right"><img src="{$IMAGE_PATH}one.gif" /></td>
<td><b class="lvtHeaderText">Select Module</b></td>
</tr>
<tr>
@@ -67,95 +92,18 @@
</form>
</tr>
<tr><td colspan="2"> </td></tr>
- <tr>
- <td align="right"><img src="images/two.gif" width="29" height="31" /></td>
- <td>
- <b class="lvtHeaderText">Custom Fields in Leads</b>
- </td>
- </tr>
- <tr>
- <td> </td>
- <td>
- <form action="index.php" method="post" name="new" id="form">
- <input type="hidden" name="fld_module" value="{$MODULE}">
- <input type="hidden" name="module" value="Settings">
- <input type="hidden" name="parenttab" value="Settings">
- <input type="hidden" name="mode">
- <input type="hidden" name="action" value="CreateCustomField">
- <table width="95%" border="0" cellpadding="5" cellspacing="0">
- <tr><td align="right"><input type="button" value=" New Custom Field " onclick="fnvshNrm('orgLay')" class="classBtn"/></td></tr>
- </table>
- </form>
+ <tr><td colspan ="2">
+
<div id="cfList">
- <table style="background-color: rgb(204, 204, 204);" class="small" border="0" cellpadding="5" cellspacing="1" width="95%">
- <tbody>
- <tr>
- <td class="lvtCol" width="5%">#</td>
- <td class="lvtCol" width="35%">Field Lable </td>
- <td class="lvtCol" width="50%">Field Type </td>
- <td class="lvtCol" width="10%">Tools</td>
- </tr>
- {foreach item=entries key=id from=$CFENTRIES}
- <tr class="lvtColData" onmouseover="this.className='lvtColDataHover'" onmouseout="this.className='lvtColData'" bgcolor="white">
- {foreach item=value from=$entries}
- <td nowrap>{$value}</td>
- {/foreach}
- </tr>
- {/foreach}
- </tbody>
- </table><br />
- {if $MODULE eq 'Leads'}
- <table width="35%" style="border:1px dashed #CCCCCC;background-color:#FFFFEC;" cellpadding="5" cellspacing="0">
- <tr>
- <td style="padding:5px;" width="5%" >
- <img src="themes/blue/images/mapping.gif" align="absmiddle" /> </td>
- <td><span class="genHeaderSmall">Filed Mapping</span><br />
- Field Mapping allows you to ....
- </td>
- </tr>
- <tr><td colspan="2" align="right"><input type="button" value=" Edit Field Mapping " class="classBtn" /></td></tr>
- </table>
- {/if}
+ {include file="CustomFieldEntries.tpl"}
</div>
- </td>
- </tr>
+
+ </td></tr>
<tr><td colspan="2"> </td></tr>
</table>
</td>
</tr>
</table>
-<div id="orgLay" style="top:175px;left:275px; ">
- <table width="100%" border="0" cellpadding="5" cellspacing="0">
- <tr>
- <td width="40%" align="left" class="genHeaderSmall">Add Field </td>
- <td width="60%" align="right"><a href="javascript:fninvsh('orgLay');"><img src="{$IMAGE_PATH}close.gif" border="0" align="absmiddle" /></a></td>
- </tr>
- <tr><td colspan="2"><hr /></td></tr>
- <tr>
-
- <td width="30%">
- <iframe name="fieldLayer" src="index.php?module=Settings&action=fieldtypes" height="170" scrolling="yes" width="150"></iframe>
- </td>
- <td width="70%" align="left" valign="top">
- <table border="0" cellpadding="5" cellspacing="0" width="100%">
- <tr>
- <td class="dataLabel" nowrap="nowrap" width="30%" align="right"><b>Label : </b></td>
- <td width="70%" align="left"><input name="fldLabel" value="" type="text" class="txtBox"></td>
- </tr>
- </table>
- </td>
- </tr>
- <tr><td style="border-bottom:1px dashed #CCCCCC;" colspan="2"> </td></tr>
- <tr>
- <td colspan="2" align="center">
- <input type="button" name="save" value=" Save " class="classBtn" />
- <input type="button" name="cancel" value=" Cancel " class="classBtn" onclick="fninvsh('orgLay');" />
- </td>
-
- </tr>
- <tr><td colspan="2" style="border-top:1px dashed #CCCCCC;"> </td></tr>
- </table>
-</div>
</td>
</tr>
</table>
More information about the vtigercrm-commits
mailing list