[Vtigercrm-commits] [vtiger-commits] r9889 - in /vtigercrm/branches/5.0.3/modules/Calendar: addEventUI.php script.js
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Nov 22 02:05:08 EST 2006
Author: richie
Date: Wed Nov 22 00:05:03 2006
New Revision: 9889
Log:
groups added in change owner popup present in calendar listview
Modified:
vtigercrm/branches/5.0.3/modules/Calendar/addEventUI.php
vtigercrm/branches/5.0.3/modules/Calendar/script.js
Modified: vtigercrm/branches/5.0.3/modules/Calendar/addEventUI.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Calendar/addEventUI.php (original)
+++ vtigercrm/branches/5.0.3/modules/Calendar/addEventUI.php Wed Nov 22 00:05:03 2006
@@ -20,7 +20,8 @@
$image_path=$theme_path."images/";
require_once ($theme_path."layout_utils.php");
$category = getParentTab();
- $userDetails=getOtherUserName($current_user->id);
+ $userDetails=getOtherUserName($current_user->id,true);
+ //echo '<pre>';print_r($userDetails);echo '</pre>';
$to_email = getUserEmailId('id',$current_user->id);
$date_format = parse_calendardate($app_strings['NTC_DATE_FORMAT']);
$taskassignedto = getAssignedTo(9);
@@ -869,9 +870,14 @@
<td width="50%"><b><?php echo $app_strings['LBL_TRANSFER_OWNERSHIP']; ?></b></td>
<td width="2%"><b>:</b></td>
<td width="48%">
- <select name="activity_owner" id="activity_owner" class="detailedViewTextBox">
- <?php echo getUserslist(); ?>
- </select>
+ <input type = "radio" name = "user_lead_owner" onclick=checkgroup(); checked><?php echo $app_strings['LBL_USER'];?>
+ <input type = "radio" name = "user_lead_owner" onclick=checkgroup(); ><?php echo $app_strings['LBL_GROUP'];?><br>
+ <select name="lead_owner" id="lead_owner" class="detailedViewTextBox" style="display:block">
+ <?php echo getUserslist(); ?>
+ </select>
+ <select name="lead_group_owner" id="lead_group_owner" class="detailedViewTextBox" style="display:none;">
+ <?php echo getGroupslist(); ?>
+ </select>
</td>
</tr>
<tr><td colspan="3" style="border-bottom:1px dashed #CCCCCC;"> </td></tr>
Modified: vtigercrm/branches/5.0.3/modules/Calendar/script.js
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Calendar/script.js (original)
+++ vtigercrm/branches/5.0.3/modules/Calendar/script.js Wed Nov 22 00:05:03 2006
@@ -834,25 +834,53 @@
tagName.style.visibility = 'visible';
tagName.style.display = 'block';
}
+//check whether user form selected or group form selected
+function checkgroup()
+{
+ if(document.change_owner.user_lead_owner[1].checked)
+ {
+ document.change_owner.lead_group_owner.style.display = "block";
+ document.change_owner.lead_owner.style.display = "none";
+ }
+ else
+ {
+ document.change_owner.lead_group_owner.style.display = "none";
+ document.change_owner.lead_owner.style.display = "block";
+ }
+}
function calendarChangeOwner()
{
- var user_id = document.getElementById('activity_owner').options[document.getElementById('activity_owner').options.selectedIndex].value;
var idlist = document.change_owner.idlist.value;
var view = document.change_owner.view.value;
var day = document.change_owner.day.value;
var month = document.change_owner.month.value;
var year = document.change_owner.year.value;
var hour = document.change_owner.hour.value;
- var subtab = document.change_owner.subtab.value;
+ var subtab = document.change_owner.subtab.value;
+
+ var checked = document.change_owner.user_lead_owner[0].checked;
+ if(checked==true)
+ {
+ var user_id = document.getElementById('lead_owner').options[document.getElementById('lead_owner').options.selectedIndex].value;
+ var url = 'module=Users&action=updateLeadDBStatus&return_module=Calendar&return_action=ActivityAjax&user_id='+user_id+'&idlist='+idlist+'&view='+view+'&hour='+hour+'&day='+day+'&month='+month+'&year='+year+'&type=change_owner';
+ }
+ else
+ {
+ var group_id = document.getElementById('lead_group_owner').options[document.getElementById('lead_group_owner').options.selectedIndex].value;
+ var url = 'module=Users&action=updateLeadDBStatus&return_module=Calendar&return_action=ActivityAjax&group_id='+group_id+'&idlist='+idlist+'&view='+view+'&hour='+hour+'&day='+day+'&month='+month+'&year='+year+'&type=change_owner';
+ }
+
if(subtab == 'event')
{
var OptionData = $('view_Option').options[$('view_Option').selectedIndex].value;
+ var eventurl = url+'&viewOption='+OptionData+'&subtab=event&ajax=true';
+
new Ajax.Request(
'index.php',
{queue: {position: 'end', scope: 'command'},
method: 'post',
- postBody: 'module=Users&action=updateLeadDBStatus&return_module=Calendar&return_action=ActivityAjax&user_id='+user_id+'&idlist='+idlist+'&view='+view+'&hour='+hour+'&day='+day+'&month='+month+'&year='+year+'&type=change_owner&viewOption='+OptionData+'&subtab=event&ajax=true',
+ postBody: eventurl,
onComplete: function(response) {
if(OptionData == 'listview')
$("listView").innerHTML=response.responseText;
@@ -864,11 +892,13 @@
}
if(subtab == 'todo')
{
+
+ var todourl = url+'&subtab=todo&ajax=true';
new Ajax.Request(
'index.php',
{queue: {position: 'end', scope: 'command'},
method: 'post',
- postBody: 'module=Users&action=updateLeadDBStatus&return_module=Calendar&return_action=ActivityAjax&user_id='+user_id+'&idlist='+idlist+'&view='+view+'&hour='+hour+'&day='+day+'&month='+month+'&year='+year+'&type=change_owner&subtab=todo&ajax=true',
+ postBody: todourl,
onComplete: function(response) {
$("mnuTab2").innerHTML=response.responseText;
}
More information about the vtigercrm-commits
mailing list