[Vtigercrm-commits] [vtiger-commits] r6905 - in /vtigercrm/trunk: Smarty/templates/DetailView.tpl Smarty/templates/DetailViewUI.tpl include/js/dtlviewajax.js
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue Jun 6 10:44:48 EDT 2006
Author: don
Date: Tue Jun 6 08:44:42 2006
New Revision: 6905
Log:
inplace edit has been reverted back
Modified:
vtigercrm/trunk/Smarty/templates/DetailView.tpl
vtigercrm/trunk/Smarty/templates/DetailViewUI.tpl
vtigercrm/trunk/include/js/dtlviewajax.js
Modified: vtigercrm/trunk/Smarty/templates/DetailView.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/DetailView.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/DetailView.tpl Tue Jun 6 08:44:42 2006
@@ -15,6 +15,10 @@
<script language="JavaScript" type="text/javascript" src="include/js/dtlviewajax.js"></script>
+<span id="crmspanid" style="display:none;position:absolute;" onmouseover="show('crmspanid');">
+ <a class="link" align="right" href="javascript:;">Edit</a>
+</span>
+
{if $MODULE eq 'Leads' or $MODULE eq 'Contacts' or $MODULE eq 'Accounts'}
<div id="sendmail_cont" style="z-index:100001;position:absolute;"></div>
{/if}
Modified: vtigercrm/trunk/Smarty/templates/DetailViewUI.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/DetailViewUI.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/DetailViewUI.tpl Tue Jun 6 08:44:42 2006
@@ -13,57 +13,137 @@
-->*}
<!-- This file is used to display the fields based on the ui type in detailview -->
-{if $keyid eq '1' || $keyid eq 2 || $keyid eq '11' || $keyid eq '7' || $keyid eq '9' || $keyid eq '55' || $keyid eq '71' || $keyid eq '72'} <!--TextBox-->
- <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" >
- {if $keyid eq '55'}<!--SalutationSymbol-->
- {$keysalut}
- {/if}
-
- <div id="dtlview_{$label}" onClick="hndMouseOver({$keyid},'{$label}');">{$keyval} </div>
- <div id="editarea_{$label}" style="display:none;">
- <input class="detailedViewTextBox" onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'" type="text" id="txtbox_{$label}" name="{$keyfldname}" maxlength='100' value="{$keyval}"></input>
- <br>
- <input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');"/> or
- <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
- </div>
- </td>
-{elseif $keyid eq '13'} <!--Email-->
- <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}"><div id="dtlview_{$label}" onClick="hndMouseOver({$keyid},'{$label}');">
- {if $INT_MAILER eq 'true'}
- <a href="javascript:InternalMailer('{$keyval}','email_addy');"> {$keyval}</a></div>
- {else}
- <a href="mailto:{$keyval}" target="_blank"> {$keyval}</a></div>
- {/if}
- <div id="editarea_{$label}" style="display:none;">
- <input class="detailedViewTextBox" onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'" type="text" id="txtbox_{$label}" name="{$keyfldname}" maxlength='100' value="{$keyval}"></input>
- <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');"/> or
- <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
- </div>
- </td>
- {elseif $keyid eq '15' || $keyid eq '16'} <!--ComboBox-->
- <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}"><div id="dtlview_{$label}" onClick="hndMouseOver({$keyid},'{$label}');"> {$keyval}</div>
- <div id="editarea_{$label}" style="display:none;">
- <select id="txtbox_{$label}" name="{$keyfldname}">
- {foreach item=arr from=$keyoptions}
- {foreach key=sel_value item=value from=$arr}
- <option value="{$sel_value}" {$value}>{$sel_value}</option>
- {/foreach}
- {/foreach}
- </select>
- <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');"/> or
- <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
- </div>
- </td>
- {elseif $keyid eq '53'} <!--Assigned To-->
- <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}">
- <div id="dtlview_{$label}" onClick="hndMouseOver({$keyid},'{$label}');">
+ {if $keyid eq '1' || $keyid eq 2 || $keyid eq '11' || $keyid eq '7' || $keyid eq '9' || $keyid eq '55' || $keyid eq '71' || $keyid eq '72'} <!--TextBox-->
+ <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');">
+ {if $keyid eq '55'}<!--SalutationSymbol-->
+ {$keysalut}
+ {elseif $keyid eq '71' || $keyid eq '72'} <!--CurrencySymbol-->
+ {$keycursymb}
+ {/if}
+ <span id="dtlview_{$label}">{$keyval}</span>
+ <div id="editarea_{$label}" style="display:none;">
+ <input class="detailedViewTextBox" onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'" type="text" id="txtbox_{$label}" name="textbox_{$label}" maxlength='100' value="{$keyval}"></input>
+ <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');fnhide('crmspanid');"/> or
+ <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
+ </div>
+ </td>
+ {elseif $keyid eq '13'} <!--Email-->
+ <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');"><span id="dtlview_{$label}"><a href="mailto:{$keyval}" target="_blank">{$keyval}</a></span>
+ <div id="editarea_{$label}" style="display:none;">
+ <input class="detailedViewTextBox" onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'" type="text" id="txtbox_{$label}" name="textbox_{$label}" maxlength='100' value="{$keyval}"></input>
+ <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');fnhide('crmspanid');"/> or
+ <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
+ </div>
+ </td>
+ {elseif $keyid eq '15' || $keyid eq '16'} <!--ComboBox-->
+ <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');"><span id="dtlview_{$label}">{$keyval}</span>
+ <div id="editarea_{$label}" style="display:none;">
+ <select id="txtbox_{$label}" name="{$keyfldname}">
+ {foreach item=arr from=$keyoptions}
+ {foreach key=sel_value item=value from=$arr}
+ <option value="{$sel_value}" {$value}>{$sel_value}</option>
+ {/foreach}
+ {/foreach}
+ </select>
+ <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');fnhide('crmspanid');"/> or
+ <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
+ </div>
+ </td>
+ {elseif $keyid eq '17'} <!--WebSite-->
+ <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');"><span id="dtlview_{$label}"><a href="http://{$keyval}" target="_blank">{$keyval}</a></span>
+ <div id="editarea_{$label}" style="display:none;">
+ <input class="detailedViewTextBox" onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'" type="text" id="txtbox_{$label}" name="textbox_{$label}" maxlength='100' value="{$keyval}"></input>
+ <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');fnhide('crmspanid');"/> or
+ <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
+ </div>
+ </td>
+ {elseif $keyid eq '19' || $keyid eq '20'} <!--TextArea/Description-->
+ <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');"><span id="dtlview_{$label}">{$keyval}</span>
+ <div id="editarea_{$label}" style="display:none;">
+ <textarea id="txtbox_{$label}" name="txtbox_{$label}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'"onBlur="this.className='detailedViewTextBox'" cols="90" rows="8">{$keyval}</textarea>
+ <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');fnhide('crmspanid');"/> or
+ <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
+ </div>
+ </td>
+ {elseif $keyid eq '21' || $keyid eq '24' || $keyid eq '22'} <!--TextArea/Street-->
+ <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');"><span id="dtlview_{$label}">{$keyval}</span>
+ <div id="editarea_{$label}" style="display:none;">
+ <textarea id="txtbox_{$label}" name="txtbox_{$label}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'"onBlur="this.className='detailedViewTextBox'" rows=2>{$keyval}</textarea>
+ <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');fnhide('crmspanid');"/> or
+ <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
+ </div>
+ </td>
+ {elseif $keyid eq '50' || $keyid eq '73' || $keyid eq '51'} <!--AccountPopup-->
+ <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');"><span id="dtlview_{$label}"><a href="{$keyseclink}">{$keyval}</a></span>
+ <div id="editarea_{$label}" style="display:none;">
+ <input readonly id="popuptxt_{$label}" name="account_name" type="text" value="{$keyval}"><input id="txtbox_{$label}" name="{$keyfldname}" type="hidden" value="{$keysecid}"> <img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Accounts&action=Popup&popuptype=specific&form=TasksEditView&form_submit=false","test","width=600,height=400,resizable=1,scrollbars=1");' align="absmiddle" style='cursor:hand;cursor:pointer'>
+ <!--AccountPopup/WithClear-->{if $keyid eq '51'} <input type="image" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.account_id.value=''; this.form.account_name.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>{/if}
+ <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');fnhide('crmspanid');"/> or
+ <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
+ </div>
+ </td>
+ {elseif $keyid eq '57'} <!--ContactPopup-->
+ <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');"><span id="dtlview_{$label}"><a href="{$keyseclink}">{$keyval}</a></span>
+ <div id="editarea_{$label}" style="display:none;">
+ <input id="popuptxt_{$label}" name="contact_name" readonly type="text" style="border:1px solid #bababa;" value="{$keyval}"><input id="txtbox_{$label}" name="{$keyfldname}" type="hidden" value="{$keysecid}"> <img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Contacts&action=Popup&html=Popup_picker&popuptype=specific&form=EditView","test","width=600,height=400,resizable=1,scrollbars=1");' align="absmiddle" style='cursor:hand;cursor:pointer'> <input type="image" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.contact_id.value=''; this.form.contact_name.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
+ <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');fnhide('crmspanid');"/> or
+ <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
+ </div>
+ </td>
+ {elseif $keyid eq '59'} <!--ProductPopup-->
+ <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');"><span id="dtlview_{$label}"><a href="{$keyseclink}">{$keyval}</a></span>
+ <div id="editarea_{$label}" style="display:none;">
+ <input id="popuptxt_{$label}" name="product_name" readonly type="text" value="{$keyval}"><input id="txtbox_{$label}" name="{$keyfldname}" type="hidden" value="{$keysecid}"> <img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Products&action=Popup&html=Popup_picker&form=HelpDeskEditView&popuptype=specific","test","width=600,height=400,resizable=1,scrollbars=1,top=150,left=200");' align="absmiddle" style='cursor:hand;cursor:pointer'> <input type="image" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.product_id.value=''; this.form.product_name.value=''; return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
+ <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');fnhide('crmspanid');"/> or
+ <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
+ </div>
+ </td>
+ {elseif $keyid eq '75' || $keyid eq '81'} <!--VendorPopup-->
+ <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');"><span id="dtlview_{$label}"><a href="{$keyseclink}">{$keyval}</a></span>
+ <div id="editarea_{$label}" style="display:none;">
+ <input id="popuptxt_{$label}" name="vendor_name" readonly type="text" style="border:1px solid #bababa;" value="{$keyval}"><input id="txtbox_{$label}" name="{$fldname}" type="hidden" value="{$keysecid}"> <img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Vendors&action=Popup&html=Popup_picker&popuptype=specific&form=EditView","test","width=600,height=400,resizable=1,scrollbars=1");' align="absmiddle" style='cursor:hand;cursor:pointer'>
+ {if $uitype eq 75} <input type="image" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.vendor_id.value='';this.form.vendor_name.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>{/if}
+ <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');fnhide('crmspanid');"/> or
+ <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
+ </div>
+ </td>
+ {elseif $keyid eq 76} <!--PotentialPopup-->
+ <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');"><span id="dtlview_{$label}"><a href="{$keyseclink}">{$keyval}</a></span>
+ <div id="editarea_{$label}" style="display:none;">
+ <input id="popuptxt_{$label}" name="potential_name" readonly type="text" style="border:1px solid #bababa;" value="{$keyval}"><input id="txtbox_{$label}" name="{$keyfldname}" type="hidden" value="{$keysecid}"> <img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Potentials&action=Popup&html=Popup_picker&popuptype=specific_potential_account_address&form=EditView","test","width=600,height=400,resizable=1,scrollbars=1");' align="absmiddle" style='cursor:hand;cursor:pointer'> <input type="image" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.potential_id.value=''; this.form.potential_name.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
+ <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');fnhide('crmspanid');"/> or
+ <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
+ </div>
+ </td>
+ {elseif $keyid eq 78} <!--QuotePopup-->
+ <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');"><span id="dtlview_{$label}"><a href="{$keyseclink}">{$keyval}</a></span>
+ <div id="editarea_{$label}" style="display:none;">
+ <input id="popuptxt_{$label}" name="quote_name" readonly type="text" style="border:1px solid #bababa;" value="{$keyval}"><input id="txtbox_{$label}" name="{$keyfldname}" type="hidden" value="{$keysecid}"> <img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Quotes&action=Popup&html=Popup_picker&popuptype=specific&form=EditView","test","width=600,height=400,resizable=1,scrollbars=1");' align="absmiddle" style='cursor:hand;cursor:pointer'> <input type="image" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.quote_id.value=''; this.form.quote_name.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
+ <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');fnhide('crmspanid');"/> or
+ <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
+ </div>
+ </td>
+ {elseif $keyid eq 82} <!--Email Body-->
+ <td colspan="3" width=100% class="dvtCellInfo" align="left"><div id="dtlview_{$label}" style="width:100%;height:200px;overflow:hidden;border:1px solid gray" class="detailedViewTextBox" onmouseover="this.className='detailedViewTextBoxOn'" onmouseout="this.className='detailedViewTextBox'">{$keyval}</div>
+ </td>
+ {elseif $keyid eq 80} <!--SalesOrderPopup-->
+ <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');"><span id="dtlview_{$label}"><a href="{$keyseclink}">{$keyval}</a></span>
+ <div id="editarea_{$label}" style="display:none;">
+ <input id="popuptxt_{$label}" name="salesorder_name" readonly type="text" style="border:1px solid #bababa;" value="{$keyval}"><input id="txtbox_{$label}" name="{$keyfldname}" type="hidden" value="{$keysecid}"> <img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=SalesOrder&action=Popup&html=Popup_picker&popuptype=specific&form=EditView","test","width=600,height=400,resizable=1,scrollbars=1");' align="absmiddle" style='cursor:hand;cursor:pointer'> <input type="image" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.salesorder_id.value=''; this.form.salesorder_name.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
+ <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');fnhide('crmspanid');"/> or
+ <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
+ </div>
+ </td>
+ {elseif $keyid eq '53'} <!--Assigned To-->
+ <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');">
+ <span id="dtlview_{$label}">
{if $keyseclink eq ''}
{$keyval}
{else}
<a href="{$keyseclink}">{$keyval}</a>
{/if}
- </div>
+ </span>
<div id="editarea_{$label}" style="display:none;">
<input type="hidden" id="hdtxt_{$label}" value="{$keyval}"></input>
<select id="txtbox_{$label}" onchange="setSelectValue('{$label}')" name="{$keyfldname}">
@@ -78,45 +158,8 @@
<a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
</div>
</td>
- {elseif $keyid eq '17'} <!--WebSite-->
- <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}"><div id="dtlview_{$label}" onClick="hndMouseOver({$keyid},'{$label}');"><a href="http://{$keyval}" target="_blank"> {$keyval}</a></div>
- <div id="editarea_{$label}" style="display:none;">
- <input class="detailedViewTextBox" onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'" type="text" id="txtbox_{$label}" name="{$keyfldname}" maxlength='100' value="{$keyval}"></input>
- <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');"/> or
- <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
- </div>
- </td>
- {elseif $keyid eq '19' || $keyid eq '20'} <!--TextArea/Description-->
- <!-- In Add Comment are we should not display anything -->
- {if $label eq 'Add Comment'}
- {assign var=keyval value=""}
- {/if}
- <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}"><div id="dtlview_{$label}" onClick="hndMouseOver({$keyid},'{$label}');"> {$keyval}</div>
- <div id="editarea_{$label}" style="display:none;">
- <textarea id="txtbox_{$label}" name="txtbox_{$label}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'"onBlur="this.className='detailedViewTextBox'" cols="90" rows="8">{$keyval}</textarea>
- <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');"/> or
- <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
- </div>
- </td>
- {elseif $keyid eq '21' || $keyid eq '24' || $keyid eq '22'} <!--TextArea/Street-->
- <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}"><div id="dtlview_{$label}" onClick="hndMouseOver({$keyid},'{$label}');"> {$keyval}</div>
- <div id="editarea_{$label}" style="display:none;">
- <textarea id="txtbox_{$label}" name="txtbox_{$label}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'"onBlur="this.className='detailedViewTextBox'" rows=2>{$keyval}</textarea>
- <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');"/> or
- <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
- </div>
- </td>
- {elseif $keyid eq '50' || $keyid eq '73' || $keyid eq '51'} <!--AccountPopup-->
- <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}"><div id="dtlview_{$label}" onClick="hndMouseOver({$keyid},'{$label}');"><a href="{$keyseclink}"> {$keyval}</a></div>
- <div id="editarea_{$label}" style="display:none;">
- <input readonly id="popuptxt_{$label}" name="account_name" type="text" value="{$keyval}"><input id="txtbox_{$label}" name="{$keyfldname}" type="hidden" value="{$keysecid}"> <img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Accounts&action=Popup&popuptype=specific&form=TasksEditView&form_submit=false","test","width=600,height=400,resizable=1,scrollbars=1");' align="absmiddle" style='cursor:hand;cursor:pointer'>
- <!--AccountPopup/WithClear-->{if $keyid eq '51'} <input type="image" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.account_id.value=''; this.form.account_name.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>{/if}
- <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');"/> or
- <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
- </div>
- </td>
- {elseif $keyid eq '56'} <!--CheckBox-->
- <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}"><div id="dtlview_{$label}" onClick="hndMouseOver({$keyid},'{$label}');">{$keyval} </div>
+ {elseif $keyid eq '56'} <!--CheckBox-->
+ <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onMouseOver="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');"><span id="dtlview_{$label}">{$keyval} </span>
<div id="editarea_{$label}" style="display:none;">
{if $keyval eq 'yes'}
<input id="txtbox_{$label}" type="checkbox" style="border:1px solid #bababa;" checked value="1">
@@ -127,58 +170,6 @@
<a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
</div>
</td>
- {elseif $keyid eq '57'} <!--ContactPopup-->
- <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}"><div id="dtlview_{$label}" onClick="hndMouseOver({$keyid},'{$label}');"><a href="{$keyseclink}"> {$keyval}</a></div>
- <div id="editarea_{$label}" style="display:none;">
- <input id="popuptxt_{$label}" name="contact_name" readonly type="text" style="border:1px solid #bababa;" value="{$keyval}"><input id="txtbox_{$label}" name="{$keyfldname}" type="hidden" value="{$keysecid}"> <img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Contacts&action=Popup&html=Popup_picker&popuptype=specific&form=EditView","test","width=600,height=400,resizable=1,scrollbars=1");' align="absmiddle" style='cursor:hand;cursor:pointer'> <input type="image" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.contact_id.value=''; this.form.contact_name.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
- <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');"/> or
- <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
- </div>
- </td>
- {elseif $keyid eq '59'} <!--ProductPopup-->
- <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}"><div id="dtlview_{$label}" onClick="hndMouseOver({$keyid},'{$label}');"><a href="{$keyseclink}"> {$keyval}</a></div>
- <div id="editarea_{$label}" style="display:none;">
- <input id="popuptxt_{$label}" name="product_name" readonly type="text" value="{$keyval}"><input id="txtbox_{$label}" name="{$keyfldname}" type="hidden" value="{$keysecid}"> <img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Products&action=Popup&html=Popup_picker&form=HelpDeskEditView&popuptype=specific","test","width=600,height=400,resizable=1,scrollbars=1,top=150,left=200");' align="absmiddle" style='cursor:hand;cursor:pointer'> <input type="image" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.product_id.value=''; this.form.product_name.value=''; return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
- <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');"/> or
- <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
- </div>
- </td>
- {elseif $keyid eq '75' || $keyid eq '81'} <!--VendorPopup-->
- <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}"><div id="dtlview_{$label}" onClick="hndMouseOver({$keyid},'{$label}');"><a href="{$keyseclink}"> {$keyval}</a></div>
- <div id="editarea_{$label}" style="display:none;">
- <input id="popuptxt_{$label}" name="vendor_name" readonly type="text" style="border:1px solid #bababa;" value="{$keyval}"><input id="txtbox_{$label}" name="{$fldname}" type="hidden" value="{$keysecid}"> <img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Vendors&action=Popup&html=Popup_picker&popuptype=specific&form=EditView","test","width=600,height=400,resizable=1,scrollbars=1");' align="absmiddle" style='cursor:hand;cursor:pointer'>
- {if $uitype eq 75} <input type="image" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.vendor_id.value='';this.form.vendor_name.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>{/if}
- <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');"/> or
- <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
- </div>
- </td>
- {elseif $keyid eq 76} <!--PotentialPopup-->
- <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}"><div id="dtlview_{$label}" onClick="hndMouseOver({$keyid},'{$label}');"><a href="{$keyseclink}"> {$keyval}</a></div>
- <div id="editarea_{$label}" style="display:none;">
- <input id="popuptxt_{$label}" name="potential_name" readonly type="text" style="border:1px solid #bababa;" value="{$keyval}"><input id="txtbox_{$label}" name="{$keyfldname}" type="hidden" value="{$keysecid}"> <img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Potentials&action=Popup&html=Popup_picker&popuptype=specific_potential_account_address&form=EditView","test","width=600,height=400,resizable=1,scrollbars=1");' align="absmiddle" style='cursor:hand;cursor:pointer'> <input type="image" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.potential_id.value=''; this.form.potential_name.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
- <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');"/> or
- <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
- </div>
- </td>
- {elseif $keyid eq 78} <!--QuotePopup-->
- <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}"><div id="dtlview_{$label}" onClick="hndMouseOver({$keyid},'{$label}');"><a href="{$keyseclink}"> {$keyval}</a></div>
- <div id="editarea_{$label}" style="display:none;">
- <input id="popuptxt_{$label}" name="quote_name" readonly type="text" style="border:1px solid #bababa;" value="{$keyval}"><input id="txtbox_{$label}" name="{$keyfldname}" type="hidden" value="{$keysecid}"> <img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Quotes&action=Popup&html=Popup_picker&popuptype=specific&form=EditView","test","width=600,height=400,resizable=1,scrollbars=1");' align="absmiddle" style='cursor:hand;cursor:pointer'> <input type="image" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.quote_id.value=''; this.form.quote_name.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
- <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');"/> or
- <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
- </div>
- </td>
- {elseif $keyid eq 82} <!--Email Body-->
- <td colspan="3" width=100% class="dvtCellInfo" align="left"><div id="dtlview_{$label}" style="width:100%;height:200px;overflow:hidden;border:1px solid gray" class="detailedViewTextBox" onmouseover="this.className='detailedViewTextBoxOn'" onmouseout="this.className='detailedViewTextBox'"> {$keyval}</div>
- </td>
- {elseif $keyid eq 80} <!--SalesOrderPopup-->
- <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}"><div id="dtlview_{$label}" onClick="hndMouseOver({$keyid},'{$label}');"><a href="{$keyseclink}"> {$keyval}</a></div>
- <div id="editarea_{$label}" style="display:none;">
- <input id="popuptxt_{$label}" name="salesorder_name" readonly type="text" style="border:1px solid #bababa;" value="{$keyval}"><input id="txtbox_{$label}" name="{$keyfldname}" type="hidden" value="{$keysecid}"> <img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=SalesOrder&action=Popup&html=Popup_picker&popuptype=specific&form=DetailView","test","width=600,height=400,resizable=1,scrollbars=1");' align="absmiddle" style='cursor:hand;cursor:pointer'> <input type="image" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.salesorder_id.value=''; this.form.salesorder_name.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
- <br><input name="button_{$label}" type="button" class="small" value="Save" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');"/> or
- <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
- </div>
- </td>
{elseif $keyid eq 83}<!-- Handle the Tax in Inventory -->
<td align="right" class="dvtCellLabel">
{$APP.LBL_VAT} {$APP.COVERED_PERCENTAGE}
@@ -206,6 +197,7 @@
{$SERVICE_TAX}
</td>
+
{else}
<td class="dvtCellInfo" align="left" width=25%">{$keyval}</td>
{/if}
Modified: vtigercrm/trunk/include/js/dtlviewajax.js
==============================================================================
--- vtigercrm/trunk/include/js/dtlviewajax.js (original)
+++ vtigercrm/trunk/include/js/dtlviewajax.js Tue Jun 6 08:44:42 2006
@@ -10,16 +10,20 @@
var globaldtlviewspanid = "";
var globaleditareaspanid = "";
var globaltxtboxid = "";
+var itsonview=false;
function showHide(showId, hideId)
{
- showBlock(showId);
- hide(hideId);
+ show(showId);
+ fnhide(hideId);
}
function hndCancel(valuespanid,textareapanid,fieldlabel)
{
+
showHide(valuespanid,textareapanid);
+ itsonview=false;
+ return false;
}
function hndMouseOver(uitype,fieldLabel)
@@ -27,17 +31,37 @@
var mouseArea="";
mouseArea="mouseArea_"+ fieldLabel;
+ if(itsonview)
+ {
+ return;
+ }
+
+ show("crmspanid");
globaldtlviewspanid= "dtlview_"+ fieldLabel;//valuespanid;
globaleditareaspanid="editarea_"+ fieldLabel;//textareapanid;
globaltxtboxid="txtbox_"+ fieldLabel;//textboxpanid;
- handleEdit();
+ divObj = getObj('crmspanid');
+ crmy = findPosY(getObj(mouseArea));
+ crmx = findPosX(getObj(mouseArea));
+ if(document.all)
+ {
+ divObj.onclick=handleEdit;
+ }
+ else
+ {
+ divObj.setAttribute('onclick','handleEdit();');
+ }
+ divObj.style.left=(crmx+getObj(mouseArea).offsetWidth -divObj.offsetWidth)+"px";
+ divObj.style.top=crmy+"px";
}
function handleEdit()
{
- showBlock(globaleditareaspanid) ;
- hide(globaldtlviewspanid);
+ show(globaleditareaspanid) ;
+ fnhide(globaldtlviewspanid);
getObj(globaltxtboxid).focus();
+ fnhide('crmspanid');
+ itsonview=true;
return false;
}
@@ -50,7 +74,7 @@
}
else if(item.indexOf(":#:SUCCESS")>-1)
{
- hide("vtbusy_info");
+ fnhide("vtbusy_info");
}
}
@@ -64,111 +88,136 @@
function dtlViewAjaxSave(fieldLabel,module,uitype,tableName,fieldName,crmId)
{
- var dtlView = "dtlview_"+ fieldLabel;
- var editArea = "editarea_"+ fieldLabel;
- var txtBox= "txtbox_"+ fieldLabel;
- var popupTxt= "popuptxt_"+ fieldLabel;
- var hdTxt = "hdtxt_"+ fieldLabel;
-
- if(formValidate() == false)
- {
- return false;
- }
-
-
- var isAdmin = document.getElementById("hdtxt_IsAdmin").value;
- var tagValue = trim(document.getElementById(txtBox).value);
-
- //overriden the tagValue based on UI Type for checkbox
- if(uitype == '56')
- {
- if(document.getElementById(txtBox).checked == true)
- {
- tagValue = "1";
- }else
- {
- tagValue = "0";
- }
- }
-
- var data = "module=" + module + "&action=" + module + "Ajax&file=DetailViewAjax&recordid=" + crmId ;
- data = data + "&fldName=" + fieldName + "&fieldValue=" + escape(tagValue) + "&ajxaction=DETAILVIEW";
- show("vtbusy_info");
-
- var ajaxObj = new VtigerAjax(dtlViewAjaxResponse);
- ajaxObj.process("index.php?",data);
- if(uitype == '13')
- {
- getObj(dtlView).innerHTML = "<a href=\"mailto:"+ tagValue+"\" target=\"_blank\">"+tagValue+" </a>";
- }
- else if(uitype == '17')
- {
- getObj(dtlView).innerHTML = "<a href=\"http://"+ tagValue+"\" target=\"_blank\">"+tagValue+" </a>";
- }
- else if(getObj(popupTxt))
- {
- var popObj = getObj(popupTxt);
- if(uitype == '50' || uitype == '73' || uitype == '51')
- {
- getObj(dtlView).innerHTML = "<a href=\"index.php?module=Accounts&action=DetailView&record="+tagValue+"\">"+popObj.value+" </a>";
- }
- else if(uitype == '57')
- {
- getObj(dtlView).innerHTML = "<a href=\"index.php?module=Contacts&action=DetailView&record="+tagValue+"\">"+popObj.value+" </a>";
- }
- else if(uitype == '59')
- {
- getObj(dtlView).innerHTML = "<a href=\"index.php?module=Products&action=DetailView&record="+tagValue+"\">"+popObj.value+" </a>";
- }
- else if(uitype == '75' || uitype == '81' )
- {
- getObj(dtlView).innerHTML = "<a href=\"index.php?module=Vendors&action=DetailView&record="+tagValue+"\">"+popObj.value+" </a>";
-
- }
- else if(uitype == '76')
- {
- getObj(dtlView).innerHTML = "<a href=\"index.php?module=Potentials&action=DetailView&record="+tagValue+"\">"+popObj.value+" </a>";
- }
- else if(uitype == '78')
- {
- getObj(dtlView).innerHTML = "<a href=\"index.php?module=Quotes&action=DetailView&record="+tagValue+"\">"+popObj.value+" </a>";
- }
- else if(uitype == '80')
- {
- getObj(dtlView).innerHTML = "<a href=\"index.php?module=SalesOrder&action=DetailView&record="+tagValue+"\">"+popObj.value+" </a>";
- }
- else
- {
- getObj(dtlView).innerHTML = popObj.value;
- }
- }
- else if(uitype == '53')
- {
- var hdObj = getObj(hdTxt);
- if(isAdmin == "0")
- {
- getObj(dtlView).innerHTML = hdObj.value;
- }else if(isAdmin == "1")
- {
- getObj(dtlView).innerHTML = "<a href=\"index.php?module=Users&action=DetailView&record="+tagValue+"\">"+hdObj.value+" </a>";;
- }
- }
- else if(uitype == '56')
- {
- if(tagValue == '1')
- {
- getObj(dtlView).innerHTML = "yes";
- }else
- {
- getObj(dtlView).innerHTML = "";
- }
-
- }
- else
- {
- getObj(dtlView).innerHTML = tagValue;
- }
- showHide(dtlView,editArea); //show,hide
+ var dtlView = "dtlview_"+ fieldLabel;
+ var editArea = "editarea_"+ fieldLabel;
+ var txtBox= "txtbox_"+ fieldLabel;
+ var popupTxt= "popuptxt_"+ fieldLabel;
+ var hdTxt = "hdtxt_"+ fieldLabel;
+
+ if(formValidate() == false)
+ {
+ return false;
+ }
+
+
+ var isAdmin = document.getElementById("hdtxt_IsAdmin").value;
+
+ var tagValue = trim(document.getElementById(txtBox).value);
+
+ //overriden the tagValue based on UI Type for checkbox
+ if(uitype == '56')
+ {
+ if(document.getElementById(txtBox).checked == true)
+ {
+ tagValue = "1";
+ }else
+ {
+ tagValue = "0";
+ }
+ }
+
+ var data = "file=DetailViewAjax&module=" + module + "&action=" + module + "Ajax&recordid=" + crmId ;
+ data = data + "&fldName=" + fieldName + "&fieldValue=" + escape(tagValue) + "&ajxaction=DETAILVIEW";
+ show("vtbusy_info");
+
+ var ajaxObj = new VtigerAjax(dtlViewAjaxResponse);
+ ajaxObj.process("index.php?",data);
+ if(uitype == '13')
+ {
+ getObj(dtlView).innerHTML = "<a href=\"mailto:"+ tagValue+"\" target=\"_blank\">"+tagValue+" </a>";
+ }
+ else if(uitype == '17')
+ {
+ getObj(dtlView).innerHTML = "<a href=\"http://"+ tagValue+"\" target=\"_blank\">"+tagValue+" </a>";
+ }
+ else if(uitype == '53')
+ {
+ var hdObj = getObj(hdTxt);
+ if(isAdmin == "0")
+ {
+ getObj(dtlView).innerHTML = hdObj.value;
+ }else if(isAdmin == "1")
+ {
+ getObj(dtlView).innerHTML = "<a href=\"index.php?module=Users&action=DetailView&record="+tagValue+"\">"+hdObj.value+" </a>";;
+ }
+ }
+ else if(uitype == '56')
+ {
+ if(tagValue == '1')
+ {
+ getObj(dtlView).innerHTML = "yes";
+ }else
+ {
+ getObj(dtlView).innerHTML = "";
+ }
+
+ }
+
+ else if(getObj(popupTxt))
+ {
+ var popObj = getObj(popupTxt);
+ if(uitype == '50' || uitype == '73' || uitype == '51')
+ {
+ getObj(dtlView).innerHTML = "<a href=\"index.php?module=Accounts&action=DetailView&record="+tagValue+"\">"+popObj.value+" </a>";
+ }
+ else if(uitype == '57')
+ {
+ getObj(dtlView).innerHTML = "<a href=\"index.php?module=Contacts&action=DetailView&record="+tagValue+"\">"+popObj.value+" </a>";
+ }
+ else if(uitype == '59')
+ {
+ getObj(dtlView).innerHTML = "<a href=\"index.php?module=Products&action=DetailView&record="+tagValue+"\">"+popObj.value+" </a>";
+ }
+ else if(uitype == '75' || uitype == '81' )
+ {
+ getObj(dtlView).innerHTML = "<a href=\"index.php?module=Vendors&action=DetailView&record="+tagValue+"\">"+popObj.value+" </a>";
+
+ }
+ else if(uitype == '76')
+ {
+ getObj(dtlView).innerHTML = "<a href=\"index.php?module=Potentials&action=DetailView&record="+tagValue+"\">"+popObj.value+" </a>";
+ }
+ else if(uitype == '78')
+ {
+ getObj(dtlView).innerHTML = "<a href=\"index.php?module=Quotes&action=DetailView&record="+tagValue+"\">"+popObj.value+" </a>";
+ }
+ else if(uitype == '80')
+ {
+ getObj(dtlView).innerHTML = "<a href=\"index.php?module=SalesOrder&action=DetailView&record="+tagValue+"\">"+popObj.value+" </a>";
+ }
+ else if(uitype == '53')
+ {
+ var hdObj = getObj(hdTxt);
+ if(isAdmin == "0")
+ {
+ getObj(dtlView).innerHTML = hdObj.value;
+ }else if(isAdmin == "1")
+ {
+ getObj(dtlView).innerHTML = "<a href=\"index.php?module=Users&action=DetailView&record="+tagValue+"\">"+hdObj.value+" </a>";;
+ }
+ }
+ else if(uitype == '56')
+ {
+ if(tagValue == '1')
+ {
+ getObj(dtlView).innerHTML = "yes";
+ }else
+ {
+ getObj(dtlView).innerHTML = "";
+ }
+
+ }
+ else
+ {
+ getObj(dtlView).innerHTML = popObj.value;
+ }
+ }
+ else
+ {
+ getObj(dtlView).innerHTML = tagValue;
+ }
+ showHide(dtlView,editArea); //show,hide
+ itsonview=false;
}
@@ -176,26 +225,26 @@
{
var item = response.responseText;
getObj('tagfields').innerHTML = item;
- hide("vtbusy_info");
+ fnhide("vtbusy_info");
}
function SaveTag(txtBox,crmId,module)
{
var tagValue = document.getElementById(txtBox).value;
document.getElementById(txtBox).value ='';
- var data = "module=" + module + "&action=" + module + "Ajax&file=TagCloud&recordid=" + crmId + "&file=TagCloud&ajxaction=SAVETAG&tagfields=" +tagValue;
+ var data = "file=TagCloud&module=" + module + "&action=" + module + "Ajax&recordid=" + crmId + "&ajxaction=SAVETAG&tagfields=" +tagValue;
var ajaxObj = new VtigerAjax(dtlViewAjaxTagResponse);
ajaxObj.process("index.php?",data);
show("vtbusy_info");
}
-
function setSelectValue(fieldLabel)
{
- var hdTxtBox = 'hdtxt_'+fieldLabel;
- var selCombo= 'txtbox_'+fieldLabel;
- var oHdTxtBox = document.getElementById(hdTxtBox);
- var oSelCombo = document.getElementById(selCombo);
-
- oHdTxtBox.value = oSelCombo.options[oSelCombo.selectedIndex].text;
-}
+ var hdTxtBox = 'hdtxt_'+fieldLabel;
+ var selCombo= 'txtbox_'+fieldLabel;
+ var oHdTxtBox = document.getElementById(hdTxtBox);
+ var oSelCombo = document.getElementById(selCombo);
+
+ oHdTxtBox.value = oSelCombo.options[oSelCombo.selectedIndex].text;
+}
+
More information about the vtigercrm-commits
mailing list