[Vtigercrm-commits] [vtiger-commits] r7264 - in /vtigercrm/trunk: Smarty/templates/DisplayFields.tpl include/utils/CommonUtils.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon Jun 19 11:01:13 EDT 2006
Author: saraj
Date: Mon Jun 19 09:01:04 2006
New Revision: 7264
Log:
Changes made to have logical cursor crawling in the form fields. Fixes #727 and #78, and refs #78 and #727.
Modified:
vtigercrm/trunk/Smarty/templates/DisplayFields.tpl
vtigercrm/trunk/include/utils/CommonUtils.php
Modified: vtigercrm/trunk/Smarty/templates/DisplayFields.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/DisplayFields.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/DisplayFields.tpl Mon Jun 19 09:01:04 2006
@@ -28,25 +28,26 @@
{assign var="fldvalue" value="$maindata[3][0]"}
{assign var="secondvalue" value="$maindata[3][1]"}
{assign var="thirdvalue" value="$maindata[3][2]"}
+ {assign var="vt_tab" value="$maindata[4][0]"}
{if $uitype eq 2}
<td width=20% class="dvtCellLabel" align=right>
<font color="red">*</font>{$fldlabel}
</td>
<td width=30% align=left class="dvtCellInfo">
- <input type="text" name="{$fldname}" value="{$fldvalue}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'">
+ <input type="text" name="{$fldname}" tabindex="{$vt_tab}" value="{$fldvalue}" tabindex="{$vt_tab}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'">
</td>
{elseif $uitype eq 11 || $uitype eq 1 || $uitype eq 13 || $uitype eq 7 || $uitype eq 9}
<td width=20% class="dvtCellLabel" align=right>{$fldlabel}</td>
{if $fldname eq 'tickersymbol' && $MODULE eq 'Accounts'}
<td width=30% align=left class="dvtCellInfo">
- <input type="text" name="{$fldname}" id ="{$fldname}" value="{$fldvalue}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn';" onBlur="this.className='detailedViewTextBox';{if $fldname eq 'tickersymbol' && $MODULE eq 'Accounts'}sensex_info(){/if}">
+ <input type="text" name="{$fldname}" tabindex="{$vt_tab}" id ="{$fldname}" value="{$fldvalue}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn';" onBlur="this.className='detailedViewTextBox';{if $fldname eq 'tickersymbol' && $MODULE eq 'Accounts'}sensex_info(){/if}">
<span id="vtbusy_info" style="display:none;">
<img src="themes/blue/images/vtbusy.gif" border="0"></span>
</td>
{else}
- <td width=30% align=left class="dvtCellInfo"><input type="text" name="{$fldname}" id ="{$fldname}" value="{$fldvalue}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'"></td>
+ <td width=30% align=left class="dvtCellInfo"><input type="text" tabindex="{$vt_tab}" name="{$fldname}" id ="{$fldname}" value="{$fldvalue}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'"></td>
{/if}
{elseif $uitype eq 19 || $uitype eq 20}
<!-- In Add Comment are we should not display anything -->
@@ -60,7 +61,7 @@
{$fldlabel}
</td>
<td colspan=3>
- <textarea class="detailedViewTextBox" onFocus="this.className='detailedViewTextBoxOn'" name="{$fldname}" onBlur="this.className='detailedViewTextBox'" cols="90" rows="8">{$fldvalue}</textarea>
+ <textarea class="detailedViewTextBox" tabindex="{$vt_tab}" onFocus="this.className='detailedViewTextBoxOn'" name="{$fldname}" onBlur="this.className='detailedViewTextBox'" cols="90" rows="8">{$fldvalue}</textarea>
</td>
{elseif $uitype eq 21 || $uitype eq 24}
<td width=20% class="dvtCellLabel" align=right>
@@ -70,7 +71,7 @@
{$fldlabel}
</td>
<td width=30% align=left class="dvtCellInfo">
- <textarea value="{$fldvalue}" name="{$fldname}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'" rows=2>{$fldvalue}</textarea>
+ <textarea value="{$fldvalue}" name="{$fldname}" tabindex="{$vt_tab}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'" rows=2>{$fldvalue}</textarea>
</td>
{elseif $uitype eq 15 || $uitype eq 16}
<td width="20%" class="dvtCellLabel" align=right>
@@ -80,7 +81,7 @@
{$fldlabel}
</td>
<td width="30%" align=left class="dvtCellInfo">
- <select name="{$fldname}">
+ <select name="{$fldname}" tabindex="{$vt_tab}" >
{foreach item=arr from=$fldvalue}
{foreach key=sel_value item=value from=$arr}
<option value="{$sel_value}" {$value}>{$sel_value}</option>
@@ -93,7 +94,7 @@
{$fldlabel}
</td>
<td width="30%" align=left class="dvtCellInfo">
- <select MULTIPLE name="{$fldname}[]" size="2">
+ <select MULTIPLE name="{$fldname}[]" size="2" tabindex="{$vt_tab}" >
{foreach item=arr from=$fldvalue}
{foreach key=sel_value item=value from=$arr}
<option value="{$sel_value}" {$value}>{$sel_value}</option>
@@ -128,7 +129,7 @@
{assign var=style_group value='display:block'}
{/if}
- <input type="radio" name="assigntype" {$select_user} value="U" onclick="toggleAssignType(this.value)"> User
+ <input type="radio" tabindex="{$vt_tab}" name="assigntype" {$select_user} value="U" onclick="toggleAssignType(this.value)"> User
{if $secondvalue neq ''}
<input type="radio" name="assigntype" {$select_group} value="T" onclick="toggleAssignType(this.value)"> Group
@@ -163,9 +164,9 @@
{if $uitype eq 52}
<select name="assigned_user_id">
{elseif $uitype eq 77}
- <select name="assigned_user_id1">
- {else}
- <select name="{$fldname}">
+ <select name="assigned_user_id1" tabindex="{$vt_tab}" >
+ {else}
+ <select name="{$fldname}" tabindex="{$vt_tab}" >
{/if}
{foreach key=key_one item=arr from=$fldvalue}
@@ -185,7 +186,7 @@
{$fldlabel}
</td>
<td width="30%" align=left class="dvtCellInfo">
- <input readonly name="account_name" style="border:1px solid #bababa;" type="text" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$secondvalue}"> <img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Accounts&action=Popup&popuptype={$popuptype}&form=TasksEditView&form_submit=false","test","width=640,height=565,resizable=0,scrollbars=0");' 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.account_id.value=''; this.form.account_name.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
+ <input readonly name="account_name" style="border:1px solid #bababa;" type="text" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$secondvalue}"> <img tabindex="{$vt_tab}" src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Accounts&action=Popup&popuptype={$popuptype}&form=TasksEditView&form_submit=false","test","width=640,height=565,resizable=0,scrollbars=0");' 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.account_id.value=''; this.form.account_name.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
</td>
{elseif $uitype eq 50}
@@ -215,7 +216,7 @@
<td width="30%" align=left class="dvtCellInfo">
<input name="vendor_name" readonly type="text" style="border:1px solid #bababa;" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$secondvalue}"> <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={$pop_type}&form=EditView","test","width=640,height=565,resizable=0,scrollbars=0");' 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'>
+ <input type="image" tabindex="{$vt_tab}" 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}
</td>
{elseif $uitype eq 57}
@@ -223,7 +224,7 @@
{$fldlabel}
</td>
<td width="30%" align=left class="dvtCellInfo">
- <input name="contact_name" readonly type="text" style="border:1px solid #bababa;" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$secondvalue}"> <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=640,height=565,resizable=0,scrollbars=0");' 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'>
+ <input name="contact_name" readonly type="text" style="border:1px solid #bababa;" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$secondvalue}"> <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=640,height=565,resizable=0,scrollbars=0");' align="absmiddle" style='cursor:hand;cursor:pointer'> <input type="image" tabindex="{$vt_tab}" 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'>
</td>
{elseif $uitype eq 58}
@@ -231,7 +232,7 @@
{$fldlabel}
</td>
<td width="30%" align=left class="dvtCellInfo">
- <input name="campaignname" readonly type="text" style="border:1px solid #bababa;" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$secondvalue}"> <img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Campaigns&action=Popup&html=Popup_picker&popuptype=specific_campaign&form=EditView","test","width=640,height=565,resizable=0,scrollbars=0");' 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.campaignid.value=''; this.form.campaignname.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
+ <input name="campaignname" readonly type="text" style="border:1px solid #bababa;" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$secondvalue}"> <img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module=Campaigns&action=Popup&html=Popup_picker&popuptype=specific_campaign&form=EditView","test","width=640,height=565,resizable=0,scrollbars=0");' align="absmiddle" style='cursor:hand;cursor:pointer'> <input type="image" tabindex="{$vt_tab}" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.campaignid.value=''; this.form.campaignname.value='';return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
</td>
{elseif $uitype eq 80}
@@ -239,7 +240,7 @@
{$fldlabel}
</td>
<td width="30%" align=left class="dvtCellInfo">
- <input name="salesorder_name" readonly type="text" style="border:1px solid #bababa;" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$secondvalue}"> <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=640,height=565,resizable=0,scrollbars=0");' 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'>
+ <input name="salesorder_name" readonly type="text" style="border:1px solid #bababa;" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$secondvalue}"> <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=640,height=565,resizable=0,scrollbars=0");' align="absmiddle" style='cursor:hand;cursor:pointer'> <input type="image" tabindex="{$vt_tab}" 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'>
</td>
{elseif $uitype eq 78}
@@ -247,7 +248,7 @@
{$fldlabel}
</td>
<td width="30%" align=left class="dvtCellInfo">
- <input name="quote_name" readonly type="text" style="border:1px solid #bababa;" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$ID}"> <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=640,height=565,resizable=0,scrollbars=0");' 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'>
+ <input name="quote_name" readonly type="text" style="border:1px solid #bababa;" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$ID}"> <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=640,height=565,resizable=0,scrollbars=0");' align="absmiddle" style='cursor:hand;cursor:pointer'> <input type="image" tabindex="{$vt_tab}" 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'>
</td>
{elseif $uitype eq 76}
@@ -255,7 +256,7 @@
{$fldlabel}
</td>
<td width="30%" align=left class="dvtCellInfo">
- <input name="potential_name" readonly type="text" style="border:1px solid #bababa;" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$secondvalue}"> <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=640,height=565,resizable=0,scrollbars=0");' 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'>
+ <input name="potential_name" readonly type="text" style="border:1px solid #bababa;" value="{$fldvalue}"><input name="{$fldname}" type="hidden" value="{$secondvalue}"> <img tabindex="{$vt_tab}" 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=640,height=565,resizable=0,scrollbars=0");' 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'>
</td>
{elseif $uitype eq 17}
@@ -264,7 +265,7 @@
</td>
<td width="30%" align=left class="dvtCellInfo">
http://
- <input type="text" name="{$fldname}" style="border:1px solid #bababa;" size="27" onFocus="this.className='detailedViewTextBoxOn'"onBlur="this.className='detailedViewTextBox'" value="{$fldvalue}">
+ <input type="text" tabindex="{$vt_tab}" name="{$fldname}" style="border:1px solid #bababa;" size="27" onFocus="this.className='detailedViewTextBoxOn'"onBlur="this.className='detailedViewTextBox'" value="{$fldvalue}">
</td>
{elseif $uitype eq 71 || $uitype eq 72}
@@ -275,7 +276,7 @@
{$fldlabel}
</td>
<td width="30%" align=left class="dvtCellInfo">
- <input name="{$fldname}" type="text" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'" value="{$fldvalue}">
+ <input name="{$fldname}" tabindex="{$vt_tab}" type="text" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'" value="{$fldvalue}">
</td>
{elseif $uitype eq 56}
@@ -285,21 +286,21 @@
{if $fldname eq 'notime' && $ACTIVITY_MODE eq 'Events'}
{if $fldvalue eq 1}
<td width="30%" align=left class="dvtCellInfo">
- <input name="{$fldname}" type="checkbox" onclick="toggleTime()" checked>
+ <input name="{$fldname}" type="checkbox" tabindex="{$vt_tab}" onclick="toggleTime()" checked>
</td>
{else}
<td width="30%" align=left class="dvtCellInfo">
- <input name="{$fldname}" type="checkbox" onclick="toggleTime()" >
+ <input name="{$fldname}" tabindex="{$vt_tab}" type="checkbox" onclick="toggleTime()" >
</td>
{/if}
{else}
{if $fldvalue eq 1}
<td width="30%" align=left class="dvtCellInfo">
- <input name="{$fldname}" type="checkbox" checked>
+ <input name="{$fldname}" type="checkbox" tabindex="{$vt_tab}" checked>
</td>
{else}
<td width="30%" align=left class="dvtCellInfo">
- <input name="{$fldname}" type="checkbox">
+ <input name="{$fldname}" tabindex="{$vt_tab}" type="checkbox">
</td>
{/if}
{/if}
@@ -313,11 +314,11 @@
{assign var=time_val value="$time_value"}
{/foreach}
- <input name="{$fldname}" id="jscal_field_{$fldname}" type="text" style="border:1px solid #bababa;" size="11" maxlength="10" value="{$date_val}">
+ <input name="{$fldname}" tabindex="{$vt_tab}" id="jscal_field_{$fldname}" type="text" style="border:1px solid #bababa;" size="11" maxlength="10" value="{$date_val}">
<img src="{$IMAGE_PATH}calendar.gif" id="jscal_trigger_{$fldname}">
{if $uitype eq 6}
- <input name="time_start" style="border:1px solid #bababa;" size="5" maxlength="5" type="text" value="{$time_val}">
+ <input name="time_start" tabindex="{$vt_tab}" style="border:1px solid #bababa;" size="5" maxlength="5" type="text" value="{$time_val}">
{/if}
{foreach key=date_format item=date_str from=$secondvalue}
@@ -345,8 +346,8 @@
{$fldlabel}
</td>
<td width="30%" align=left class="dvtCellInfo">
- <input name="{$fldname}" type="text" size="2" value="{$fldvalue}">
- <select name="duration_minutes">
+ <input name="{$fldname}" type="text" size="2" value="{$fldvalue}" tabindex="{$vt_tab}" >
+ <select name="duration_minutes" tabindex="{$vt_tab}" >
{foreach key=labelval item=selectval from=$secondvalue}
<option value="{$labelval}" {$selectval}>{$labelval}</option>
{/foreach}
@@ -363,7 +364,7 @@
<td width="30%" align=left class="dvtCellInfo">
<input name="{$fldname}" type="hidden" value="{$secondvalue}">
<input name="parent_name" readonly type="text" style="border:1px solid #bababa;" value="{$fldvalue}">
- <img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module="+ document.EditView.parent_type.value +"&action=Popup&html=Popup_picker&form=HelpDeskEditView","test","width=640,height=565,resizable=0,scrollbars=0,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.parent_id.value=''; this.form.parent_name.value=''; return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
+ <img src="{$IMAGE_PATH}select.gif" tabindex="{$vt_tab}" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module="+ document.EditView.parent_type.value +"&action=Popup&html=Popup_picker&form=HelpDeskEditView","test","width=640,height=565,resizable=0,scrollbars=0,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.parent_id.value=''; this.form.parent_name.value=''; return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
</td>
{elseif $uitype eq 357}
@@ -376,7 +377,7 @@
<option value="{$labelval}" {$selectval}>{$labelval}</option>
{/foreach}
</select>
- <img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module="+ document.EditView.parent_type.value +"&action=Popup&html=Popup_picker&form=HelpDeskEditView","test","width=640,height=565,resizable=0,scrollbars=0,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.parent_id.value=''; this.form.parent_name.value=''; return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
+ <img tabindex="{$vt_tab}" src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module="+ document.EditView.parent_type.value +"&action=Popup&html=Popup_picker&form=HelpDeskEditView","test","width=640,height=565,resizable=0,scrollbars=0,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.parent_id.value=''; this.form.parent_name.value=''; return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
</td>
<tr style="height:25px">
<td width="20%" class="dvtCellLabel" align=right>CC: </td>
@@ -395,7 +396,7 @@
</td>
<td width="30%" align=left class="dvtCellInfo">
<input name="{$fldname}" type="hidden" value="{$secondvalue}">
- <input name="product_name" readonly type="text" value="{$fldvalue}"> <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=640,height=565,resizable=0,scrollbars=0,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'>
+ <input name="product_name" readonly type="text" value="{$fldvalue}"> <img tabindex="{$vt_tab}" 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=640,height=565,resizable=0,scrollbars=0,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'>
</td>
{elseif $uitype eq 55}
@@ -408,7 +409,7 @@
{/foreach}
{/foreach}
</select>
- <input type="text" name="{$fldname}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'" value= "{$secondvalue}">
+ <input type="text" name="{$fldname}" tabindex="{$vt_tab}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'" value= "{$secondvalue}">
</td>
{elseif $uitype eq 22}
@@ -416,7 +417,7 @@
<font color="red">*</font>{$fldlabel}
</td>
<td width="30%" align=left class="dvtCellInfo">
- <textarea name="{$fldname}" cols="30" rows="2">{$fldvalue}</textarea>
+ <textarea name="{$fldname}" cols="30" tabindex="{$vt_tab}" rows="2">{$fldvalue}</textarea>
</td>
{elseif $uitype eq 69}
@@ -427,7 +428,7 @@
{if $MODULE eq 'Products'}
<input name="del_file_list" type="hidden" value="">
<div id="files_list" style="border: 1px solid grey; width: 500px; padding: 5px; background: rgb(255, 255, 255) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; font-size: x-small">Files Maximum 6
- <input id="my_file_element" type="file" name="file_1" >
+ <input id="my_file_element" type="file" name="file_1" tabindex="{$vt_tab}" >
{assign var=image_count value=0}
{if $maindata[3].0.name neq ''}
{foreach name=image_loop key=num item=image_details from=$maindata[3]}
@@ -447,7 +448,7 @@
multi_selector.addElement( document.getElementById( 'my_file_element' ) );
</script>
{else}
- <input name="{$fldname}" type="file" value="{$maindata[3].0.name}"/>
+ <input name="{$fldname}" type="file" value="{$maindata[3].0.name}" tabindex="{$vt_tab}" />
<input type="hidden" name="id" value=""/>
{$maindata[3].0.name}
{/if}
@@ -458,7 +459,7 @@
{$fldlabel}
</td>
<td colspan="3" width="30%" align=left class="dvtCellInfo">
- <input name="{$fldname}" type="file" value="{$secondvalue}"/>
+ <input name="{$fldname}" type="file" value="{$secondvalue}" tabindex="{$vt_tab}" />
<input type="hidden" name="id" value=""/>{$fldvalue}
</td>
{elseif $uitype eq 156}
@@ -472,11 +473,11 @@
{/if}
{if $fldvalue eq 'on'}
<td width="30%" align=left class="dvtCellInfo">
- <input name="{$fldname}" {$disable_status} type="checkbox" checked>
+ <input name="{$fldname}" {$disable_status} tabindex="{$vt_tab}" type="checkbox" checked>
</td>
{else}
<td width="30%" align=left class="dvtCellInfo">
- <input name="{$fldname}" {$disable_status} type="checkbox">
+ <input name="{$fldname}" {$disable_status} tabindex="{$vt_tab}" type="checkbox">
</td>
{/if}
{elseif $uitype eq 98}<!-- Role Selection Popup -->
@@ -486,10 +487,10 @@
</td>
<td width="30%" align=left class="dvtCellInfo">
{if $thirdvalue eq 1}
- <input name="role_name" id="role_name" class="txtBox" value="{$secondvalue}" type="text">
+ <input name="role_name" id="role_name" class="txtBox" tabindex="{$vt_tab}" value="{$secondvalue}" type="text">
<a href="javascript:openPopup();"><img src="{$IMAGE_PATH}select.gif" align="absmiddle" border="0"></a>
{else}
- <input name="role_name" id="role_name" class="txtBox" readonly value="{$secondvalue}" type="text">
+ <input name="role_name" id="role_name" tabindex="{$vt_tab}" class="txtBox" readonly value="{$secondvalue}" type="text">
{/if}
<input name="user_role" id="user_role" value="{$fldvalue}" type="hidden">
</td>
@@ -498,14 +499,14 @@
<font color="red">*</font>
{$fldlabel}
</td>
- <td width=30% align=left class="dvtCellInfo"><input type="text" name="{$fldname}" id ="{$fldname}" value="{$fldvalue}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'"></td>
+ <td width=30% align=left class="dvtCellInfo"><input type="text" name="{$fldname}" id ="{$fldname}" value="{$fldvalue}" tabindex="{$vt_tab}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'"></td>
{elseif $uitype eq 115}<!-- for Status field Disabled for nonadmin -->
<td width="20%" class="dvtCellLabel" align=right>
{$fldlabel}
</td>
<td width="30%" align=left class="dvtCellInfo">
{if $secondvalue eq 1}
- <select name="{$fldname}">
+ <select name="{$fldname}" tabindex="{$vt_tab}" >
{else}
<select disabled name="{$fldname}">
{/if}
@@ -521,7 +522,7 @@
{$fldlabel}
</td>
<td width="30%" align=left class="dvtCellInfo">
- <input name="{$fldname}" type="file" value="{$maindata[3].0.name}"/>
+ <input name="{$fldname}" type="file" value="{$maindata[3].0.name}" tabindex="{$vt_tab}" />
<input type="hidden" name="id" value=""/>
{$maindata[3].0.name}
</td>
@@ -530,14 +531,14 @@
{$fldlabel}
</td>
<td width="30%" colspan="3" align=left class="dvtCellInfo">
- <input type="text" name="{$fldname}" value="{$fldvalue}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'">
+ <input type="text" name="{$fldname}" value="{$fldvalue}" tabindex="{$vt_tab}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'">
</td>
{elseif $uitype eq 101}<!-- for reportsto field USERS POPUP -->
<td width="20%" class="dvtCellLabel" align=right>
{$fldlabel}
</td>
<td width="30%" align=left class="dvtCellInfo">
- <input readonly name='reports_to_name' class="small" type="text" value='{$fldvalue}'><input name='reports_to_id' type="hidden" value='{$secondvalue}'> <input title="Change [Alt+C]" accessKey="C" type="button" class="small" value='{$UMOD.LBL_CHANGE}' name=btn1 LANGUAGE=javascript onclick='return window.open("index.php?module=Users&action=Popup&form=UsersEditView&form_submit=false","test","width=640,height=522,resizable=0,scrollbars=0");'>
+ <input readonly name='reports_to_name' class="small" type="text" value='{$fldvalue}' tabindex="{$vt_tab}" ><input name='reports_to_id' type="hidden" value='{$secondvalue}'> <input title="Change [Alt+C]" accessKey="C" type="button" class="small" value='{$UMOD.LBL_CHANGE}' name=btn1 LANGUAGE=javascript onclick='return window.open("index.php?module=Users&action=Popup&form=UsersEditView&form_submit=false","test","width=640,height=522,resizable=0,scrollbars=0");'>
</td>
{elseif $uitype eq 116}<!-- for currency in users details-->
<td width="20%" class="dvtCellLabel" align=right>
@@ -545,9 +546,9 @@
</td>
<td width="30%" align=left class="dvtCellInfo">
{if $secondvalue eq 1}
- <select name="{$fldname}">
+ <select name="{$fldname}" tabindex="{$vt_tab}" >
{else}
- <select disabled name="{$fldname}">
+ <select disabled name="{$fldname}" tabindex="{$vt_tab}" >
{/if}
{foreach item=arr key=uivalueid from=$fldvalue}
@@ -563,9 +564,9 @@
</td>
<td width=30% align=left class="dvtCellInfo">
{if $MODE eq 'edit'}
- <input type="text" readonly name="{$fldname}" value="{$fldvalue}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'">
- {else}
- <input type="text" name="{$fldname}" value="{$fldvalue}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'">
+ <input type="text" readonly name="{$fldname}" value="{$fldvalue}" tabindex="{$vt_tab}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'">
+ {else}
+ <input type="text" name="{$fldname}" value="{$fldvalue}" tabindex="{$vt_tab}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'">
{/if}
</td>
{elseif $uitype eq 99}
@@ -574,7 +575,7 @@
<font color="red">*</font>{$fldlabel}
</td>
<td width=30% align=left class="dvtCellInfo">
- <input type="password" name="{$fldname}" value="{$fldvalue}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'">
+ <input type="password" name="{$fldname}" tabindex="{$vt_tab}" value="{$fldvalue}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'">
</td>
{/if}
{elseif $uitype eq 30}
@@ -586,7 +587,7 @@
{assign var=yes_val value=$secondvalue[1]}
{assign var=no_val value=$secondvalue[2]}
- <input type="radio" name="set_reminder" value="Yes" {$check}> {$yes_val}
+ <input type="radio" name="set_reminder" tabindex="{$vt_tab}" value="Yes" {$check}> {$yes_val}
<input type="radio" name="set_reminder" value="No"> {$no_val}
{foreach item=val_arr from=$fldvalue}
Modified: vtigercrm/trunk/include/utils/CommonUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/CommonUtils.php (original)
+++ vtigercrm/trunk/include/utils/CommonUtils.php Mon Jun 19 09:01:04 2006
@@ -992,6 +992,30 @@
$getBlockInfo=getBlockInformation($module,$result,$col_fields,$tabid,$block_label);
}
$log->debug("Exiting getBlocks method ...");
+ $index_count =1;
+ $max_index =0;
+ foreach($getBlockInfo as $label=>$contents)
+ {
+ $no_rows = count($contents);
+ $index_count = $max_index+1;
+ foreach($contents as $block_row => $elements)
+ {
+ $max_index= $no_rows+$index_count;
+
+ for($i=0;$i<count($elements);$i++)
+ {
+ if(sizeof($getBlockInfo[$label][$block_row][$i])!=0)
+ {
+ if($i==0)
+ $getBlockInfo[$label][$block_row][$i][]=array($index_count);
+ else
+ $getBlockInfo[$label][$block_row][$i][]=array($max_index);
+ }
+ }
+ $index_count++;
+
+ }
+ }
return $getBlockInfo;
}
/**
More information about the vtigercrm-commits
mailing list