[Vtigercrm-commits] [vtiger-commits] r10188 - in /vtigercrm/branches/5.0.3: Smarty/templates/DetailViewUI.tpl include/js/dtlviewajax.js include/utils/DetailViewUtils.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu Feb 15 09:15:36 EST 2007
Author: saraj
Date: Thu Feb 15 07:15:30 2007
New Revision: 10188
Log:
AJAX edit for product handler Fixes : #2885 --Minnie
Modified:
vtigercrm/branches/5.0.3/Smarty/templates/DetailViewUI.tpl
vtigercrm/branches/5.0.3/include/js/dtlviewajax.js
vtigercrm/branches/5.0.3/include/utils/DetailViewUtils.php
Modified: vtigercrm/branches/5.0.3/Smarty/templates/DetailViewUI.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/DetailViewUI.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/DetailViewUI.tpl Thu Feb 15 07:15:30 2007
@@ -189,6 +189,21 @@
{elseif $keyid eq 80} <!--SalesOrderPopup-->
<td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}"> <a href="{$keyseclink}">{$keyval}</a>
</td>
+ {elseif $keyid eq '52' || $keyid eq '77'}
+ <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label|escape:'quotes'}');" 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 key=uid from=$keyoptions}
+ {foreach key=sel_value item=value from=$arr}
+ <option value="{$uid}" {$value}>{if $APP.$sel_value}{$APP.$sel_value}{else}{$sel_value}{/if}</option>
+
+ {/foreach}
+ {/foreach}
+ </select>
+ <br><input name="button_{$label}" type="button" class="crmbutton small save" value="{$APP.LBL_SAVE_LABEL}" onclick="dtlViewAjaxSave('{$label|escape:'quotes'}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');fnhide('crmspanid');"/> {$APP.LBL_OR}
+ <a href="javascript:;" onclick="hndCancel('dtlview_{$label|escape:'quotes'}','editarea_{$label|escape:'quotes'}','{$label|escape:'quotes'}')" class="link">{$APP.LBL_CANCEL_BUTTON_LABEL}</a>
+ </div>
+ </td>
{elseif $keyid eq '53'} <!--Assigned To-->
<td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label|escape:'quotes'}');" onmouseout="fnhide('crmspanid');"> <span id="dtlview_{$label}">
{if $keyoptions.0 eq 'User' && $keyadmin eq 1}
Modified: vtigercrm/branches/5.0.3/include/js/dtlviewajax.js
==============================================================================
--- vtigercrm/branches/5.0.3/include/js/dtlviewajax.js (original)
+++ vtigercrm/branches/5.0.3/include/js/dtlviewajax.js Thu Feb 15 07:15:30 2007
@@ -240,7 +240,15 @@
{
getObj(dtlView).innerHTML = "<a href=\"index.php?module=Settings&action=GroupDetailView&groupId="+tagValue+"\">"+hdObj.value+" </a>";
}
- }else if(uitype == '56')
+ }
+ else if(uitype == '52' || uitype == '77')
+ {
+ if(isAdmin == "1")
+ getObj(dtlView).innerHTML = "<a href=\"index.php?module=Users&action=DetailView&record="+tagValue+"\">"+document.getElementById(txtBox).options[document.getElementById(txtBox).selectedIndex].text+" </a>";
+ else
+ getObj(dtlView).innerHTML = document.getElementById(txtBox).options[document.getElementById(txtBox).selectedIndex].text;
+ }
+ else if(uitype == '56')
{
if(tagValue == '1')
{
Modified: vtigercrm/branches/5.0.3/include/utils/DetailViewUtils.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/utils/DetailViewUtils.php (original)
+++ vtigercrm/branches/5.0.3/include/utils/DetailViewUtils.php Thu Feb 15 07:15:30 2007
@@ -187,6 +187,7 @@
$label_fld[] = $mod_strings[$fieldlabel];
$user_id = $col_fields[$fieldname];
$user_name = getUserName($user_id);
+ $assigned_user_id = $current_user->id;
if(is_admin($current_user))
{
$label_fld[] ='<a href="index.php?module=Users&action=DetailView&record='.$user_id.'">'.$user_name.'</a>';
@@ -195,6 +196,16 @@
{
$label_fld[] =$user_name;
}
+ if($is_admin==false && $profileGlobalPermission[2] == 1 && ($defaultOrgSharingPermission[getTabid($module)] == 3 or $defaultOrgSharingPermission[getTabid($module)] == 0))
+ {
+ $users_combo = get_select_options_array(get_user_array(FALSE, "Active", $assigned_user_id,'private'), $assigned_user_id);
+ }
+ else
+ {
+ $users_combo = get_select_options_array(get_user_array(FALSE, "Active", $user_id), $assigned_user_id);
+ }
+ $label_fld ["options"] = $users_combo;
+
}
elseif($uitype == 53)
{
More information about the vtigercrm-commits
mailing list