[Vtigercrm-commits] [vtiger-commits] r5779 - in /vtigercrm/trunk: Smarty/templates/DetailView.tpl include/utils/ListViewUtils.php modules/SalesOrder/SalesOrder.js
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue May 9 06:24:23 EDT 2006
Author: saraj
Date: Tue May 9 04:24:08 2006
New Revision: 5779
Log:
* Modified to fix the issue when select sales order from invoice - track issue-287
Modified:
vtigercrm/trunk/Smarty/templates/DetailView.tpl
vtigercrm/trunk/include/utils/ListViewUtils.php
vtigercrm/trunk/modules/SalesOrder/SalesOrder.js
Modified: vtigercrm/trunk/Smarty/templates/DetailView.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/DetailView.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/DetailView.tpl Tue May 9 04:24:08 2006
@@ -338,7 +338,7 @@
{elseif $keyid eq 80} <!--SalesOrderPopup-->
<td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="hide('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'>
+ <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}');hide('crmspanid');"/> or
<a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">Cancel</a>
</div>
Modified: vtigercrm/trunk/include/utils/ListViewUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/ListViewUtils.php (original)
+++ vtigercrm/trunk/include/utils/ListViewUtils.php Tue May 9 04:24:08 2006
@@ -1178,8 +1178,12 @@
}
$temp_val = str_replace("'",'\"',$temp_val);
-
- $value = '<a href="a" LANGUAGE=javascript onclick=\'set_return_specific("'.$entity_id.'", "'.br2nl($temp_val).'"); window.close()\'>'.$temp_val.'</a>';
+
+ //Added to avoid the error when select SO from Invoice through AjaxEdit
+ if($module == 'SalesOrder')
+ $value = '<a href="a" LANGUAGE=javascript onclick=\'set_return_specific("'.$entity_id.'", "'.br2nl($temp_val).'","'.$_REQUEST['form'].'"); window.close()\'>'.$temp_val.'</a>';
+ else
+ $value = '<a href="a" LANGUAGE=javascript onclick=\'set_return_specific("'.$entity_id.'", "'.br2nl($temp_val).'"); window.close()\'>'.$temp_val.'</a>';
}
elseif($popuptype == "detailview")
{
Modified: vtigercrm/trunk/modules/SalesOrder/SalesOrder.js
==============================================================================
--- vtigercrm/trunk/modules/SalesOrder/SalesOrder.js (original)
+++ vtigercrm/trunk/modules/SalesOrder/SalesOrder.js Tue May 9 04:24:08 2006
@@ -14,16 +14,19 @@
window.opener.document.EditView.parent_name.value = product_name;
window.opener.document.EditView.parent_id.value = product_id;
}
-function set_return_specific(product_id, product_name) {
-
+function set_return_specific(product_id, product_name, mode) {
+
//getOpenerObj used for DetailView
var fldName = getOpenerObj("salesorder_name");
var fldId = getOpenerObj("salesorder_id");
fldName.value = product_name;
fldId.value = product_id;
- window.opener.document.EditView.action.value = 'EditView';
- window.opener.document.EditView.convertmode.value = 'update_so_val';
- window.opener.document.EditView.submit();
+ if(mode != 'DetailView')
+ {
+ window.opener.document.EditView.action.value = 'EditView';
+ window.opener.document.EditView.convertmode.value = 'update_so_val';
+ window.opener.document.EditView.submit();
+ }
}
function set_return_formname_specific(formname, product_id, product_name) {
window.opener.document.EditView1.purchaseorder_name.value = product_name;
More information about the vtigercrm-commits
mailing list