[Vtigercrm-commits] [vtiger-commits] r6122 - in /vtigercrm/trunk/modules/Calendar: CalendarAjax.php addEventUI.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed May 17 10:44:08 EDT 2006
Author: saraj
Date: Wed May 17 08:44:03 2006
New Revision: 6122
Log:
changes made to integrate mini calendar
Modified:
vtigercrm/trunk/modules/Calendar/CalendarAjax.php
vtigercrm/trunk/modules/Calendar/addEventUI.php
Modified: vtigercrm/trunk/modules/Calendar/CalendarAjax.php
==============================================================================
--- vtigercrm/trunk/modules/Calendar/CalendarAjax.php (original)
+++ vtigercrm/trunk/modules/Calendar/CalendarAjax.php Wed May 17 08:44:03 2006
@@ -8,7 +8,7 @@
* All Rights Reserved.
*
********************************************************************************/
-global $theme;
+global $theme,$mod_strings,$current_language,$currentModule;
$theme_path = "themes/".$theme."/";
$image_path = $theme_path."images/";
require_once($theme_path."layout_utils.php");
@@ -17,56 +17,73 @@
if(isset($_REQUEST['type']) && ($_REQUEST['type'] !=''))
{
$type = $_REQUEST['type'];
- $mysel= $_REQUEST['view'];
- $calendar_arr = Array();
- $calendar_arr['IMAGE_PATH'] = $image_path;
- if(empty($mysel))
+ if($type == 'minical')
{
- $mysel = 'day';
- }
- $date_data = array();
- if ( isset($_REQUEST['day']))
- {
- $date_data['day'] = $_REQUEST['day'];
- }
-
- if ( isset($_REQUEST['month']))
- {
- $date_data['month'] = $_REQUEST['month'];
- }
-
- if ( isset($_REQUEST['week']))
- {
- $date_data['week'] = $_REQUEST['week'];
- }
-
- if ( isset($_REQUEST['year']))
- {
- if ($_REQUEST['year'] > 2037 || $_REQUEST['year'] < 1970)
- {
- print("<font color='red'>Sorry, Year must be between 1970 and 2037</font>");
- exit;
- }
- $date_data['year'] = $_REQUEST['year'];
- }
- $calendar_arr['calendar'] = new Calendar($mysel,$date_data);
- if ($mysel == 'day' || $mysel == 'week' || $mysel == 'month')
- {
- global $current_user;
- $calendar_arr['calendar']->add_Activities($current_user);
- }
- $calendar_arr['view'] = $mysel;
- if($type == 'hourview')
- {
- getHourView($calendar_arr,'ajax');
- }
- elseif($type == 'listview')
- {
- getListView($calendar_arr);
+ $temp_module = $currentModule;
+ $mod_strings = return_module_language($current_language,'Calendar');
+ $currentModule = 'Calendar';
+ $calendar_arr = Array();
+ $calendar_arr['IMAGE_PATH'] = $image_path;
+ $calendar_arr['calendar'] = new Calendar('month');
+ $calendar_arr['view'] = 'month';
+ $calendar_arr['size'] = 'small';
+ calendar_layout($calendar_arr);
+ $mod_strings = return_module_language($current_language,$temp_module);
+ $currentModule = $_REQUEST['module'];
}
else
{
- die("View option is not defined");
+ $mysel= $_REQUEST['view'];
+ $calendar_arr = Array();
+ $calendar_arr['IMAGE_PATH'] = $image_path;
+ if(empty($mysel))
+ {
+ $mysel = 'day';
+ }
+ $date_data = array();
+ if ( isset($_REQUEST['day']))
+ {
+ $date_data['day'] = $_REQUEST['day'];
+ }
+
+ if ( isset($_REQUEST['month']))
+ {
+ $date_data['month'] = $_REQUEST['month'];
+ }
+
+ if ( isset($_REQUEST['week']))
+ {
+ $date_data['week'] = $_REQUEST['week'];
+ }
+
+ if ( isset($_REQUEST['year']))
+ {
+ if ($_REQUEST['year'] > 2037 || $_REQUEST['year'] < 1970)
+ {
+ print("<font color='red'>Sorry, Year must be between 1970 and 2037</font>");
+ exit;
+ }
+ $date_data['year'] = $_REQUEST['year'];
+ }
+ $calendar_arr['calendar'] = new Calendar($mysel,$date_data);
+ if ($mysel == 'day' || $mysel == 'week' || $mysel == 'month')
+ {
+ global $current_user;
+ $calendar_arr['calendar']->add_Activities($current_user);
+ }
+ $calendar_arr['view'] = $mysel;
+ if($type == 'hourview')
+ {
+ getHourView($calendar_arr,'ajax');
+ }
+ elseif($type == 'listview')
+ {
+ getListView($calendar_arr);
+ }
+ else
+ {
+ die("View option is not defined");
+ }
}
}
else
Modified: vtigercrm/trunk/modules/Calendar/addEventUI.php
==============================================================================
--- vtigercrm/trunk/modules/Calendar/addEventUI.php (original)
+++ vtigercrm/trunk/modules/Calendar/addEventUI.php Wed May 17 08:44:03 2006
@@ -245,8 +245,8 @@
</td>
<td width=20% align=center valign=top>
- <input type=button value="Add >>" class=small style="width:100%" onClick="addColumn()"><br>
- <input type=button value="<< Remove " class=small style="width:100%" onClick="delColumn()">
+ <input type=button value="<?php echo $mod_strings['LBL_ADD_BUTTON'] ?> >>" class=small style="width:100%" onClick="addColumn()"><br>
+ <input type=button value="<< <?php echo $mod_strings['LBL_RMV_BUTTON'] ?> " class=small style="width:100%" onClick="delColumn()">
</td>
<td width=40% align=center valign=top>
<select name="selectedusers" id="selectedusers" class=small size=5 multiple style="height:70px;width:100%">
@@ -306,7 +306,7 @@
<table border=0 cellspacing=0 cellpadding=0>
<tr>
<td width=20><input type="checkbox" onClick="showhide('repeatOptions')"></td>
- <td colspan=2><?echo $mod_strings['LBL_RMD_ON']?></td>
+ <td colspan=2><?echo $mod_strings['LBL_ENABLE_REPEAT']?></td>
</tr>
<tr>
<td colspan=2>
@@ -315,7 +315,7 @@
<tr>
<td><?echo $mod_strings['LBL_REPEAT_ONCE']?></td>
<td><input type="text" class="textbox" style="width:20px" value="2" ></td>
- <td><select class=small><option onClick="ghide('repeatWeekUI');ghide('repeatMonthUI');">Day(s)</option><option onClick="gshow('repeatWeekUI');ghide('repeatMonthUI');">Week(s)</option><option onClick="gshow('repeatMonthUI');ghide('repeatWeekUI');">Month(s)</option><option onClick="ghide('repeatWeekUI');ghide('repeatMonthUI');";>Year</option></select></td>
+ <td><select class=small><option onClick="ghide('repeatWeekUI');ghide('repeatMonthUI');">Day(s)</option><option onClick="gshow('repeatWeekUI',document.appSave.date_start.value,document.appSave.due_date.value,document.appSave.time_start.value,document.appSave.time_end.value);ghide('repeatMonthUI');">Week(s)</option><option onClick="gshow('repeatMonthUI',document.appSave.date_start.value,document.appSave.due_date.value,document.appSave.time_start.value,document.appSave.time_end.value);ghide('repeatWeekUI');">Month(s)</option><option onClick="ghide('repeatWeekUI');ghide('repeatMonthUI');";>Year</option></select></td>
</tr>
</table>
@@ -420,3 +420,18 @@
</script>
<!-- Add Activity DIV stops-->
+
+<div id="reportLay" style="width:125px;" onMouseout="fninvsh('reportLay')" onMouseover="fnvshNrm('reportLay')">
+ <table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#FFFFFF">
+ <tr>
+ <td>
+ <a href="#" class="calMnu">- Mark Completed</a>
+ <a href="#" class="calMnu">- Mark Pending</a>
+ <span style="border-top:1px dashed #CCCCCC;width:99%;display:block;"></span>
+ <a href="#" class="calMnu">- Postpone</a>
+ <a href="#" class="calMnu">- Change Owner</a>
+ <a href="#" class="calMnu">- Delete</a>
+ </td>
+ </tr>
+ </table>
+</div>
More information about the vtigercrm-commits
mailing list