[Vtigercrm-commits] [vtiger-commits] r6006 - in /vtigercrm/trunk/modules/Calendar: addEventUI.php calendarLayout.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon May 15 22:44:08 EDT 2006
Author: saraj
Date: Mon May 15 20:44:03 2006
New Revision: 6006
Log:
changes made for i18n and to get calendar popup
Modified:
vtigercrm/trunk/modules/Calendar/addEventUI.php
vtigercrm/trunk/modules/Calendar/calendarLayout.php
Modified: vtigercrm/trunk/modules/Calendar/addEventUI.php
==============================================================================
--- vtigercrm/trunk/modules/Calendar/addEventUI.php (original)
+++ vtigercrm/trunk/modules/Calendar/addEventUI.php Mon May 15 20:44:03 2006
@@ -16,6 +16,12 @@
<!-- Add Event DIV starts-->
<script language="JavaScript" type="text/javascript" src="general.js"></script>
+
+ <link rel="stylesheet" type="text/css" media="all" href="jscalendar/calendar-win2k-cold-1.css">
+ <script type="text/javascript" src="jscalendar/calendar.js"></script>
+ <script type="text/javascript" src="jscalendar/lang/calendar-<? echo $app_strings['LBL_JSCALENDAR_LANG'] ?>.js"></script>
+ <script type="text/javascript" src="jscalendar/calendar-setup.js"></script>
+
<div class="calAddEvent" style="display:none" id="addEvent" align=center>
<form name="appSave" onSubmit="return check_form()" method="POST" action="index.php">
<input type="hidden" name="module" value="Activities">
@@ -28,25 +34,25 @@
<input type="hidden" name="duration_minutes" value="0">
<table border=0 cellspacing=0 cellpadding=5 width=100% class="addEventHeader">
<tr>
- <td class="lvtHeaderText">Add Event</b></td>
+ <td class="lvtHeaderText"><? echo $mod_strings['LBL_ADD_EVENT']?></b></td>
<td align=right>[ <a href="#" onClick="ghide('addEvent')">Close</a> ]</td>
</tr>
</table>
<table border=0 cellspacing=0 cellpadding=5 width=90% >
<tr>
- <td nowrap width=20%><b>Event Type :</b></td>
+ <td nowrap width=20%><b><?echo $mod_strings['LBL_EVENTTYPE']?> :</b></td>
<td width=80%>
<table>
<tr>
- <td><input type="radio" name='activitytype' value='Call' onclick='document.appSave.module.value="Activities";' style='vertical-align: middle;' checked></td><td> Call</td><td style="width:10px">
- <td><input type="radio" name='activitytype' value='Meeting' style='vertical-align: middle;' onclick='document.appSave.module.value="Activities";'></td><td> Meeting</td><td style="width:20px">
+ <td><input type="radio" name='activitytype' value='Call' onclick='document.appSave.module.value="Activities";' style='vertical-align: middle;' checked></td><td><?echo $mod_strings['LBL_CALL']?></td><td style="width:10px">
+ <td><input type="radio" name='activitytype' value='Meeting' style='vertical-align: middle;' onclick='document.appSave.module.value="Activities";'></td><td><?echo $mod_strings['LBL_MEET']?></td><td style="width:20px">
</tr>
</table>
</td>
</tr>
<tr>
- <td nowrap ><b>Event Name :</b></td>
+ <td nowrap ><b><?echo $mod_strings['LBL_EVENTNAME']?> :</b></td>
<td><input name="subject" type="text" class="textbox" style="width:90%"></td>
</tr>
</table>
@@ -58,16 +64,32 @@
<tr>
<td width=50% valign=top style="border-right:1px solid #dddddd">
<table border=0 cellspacing=0 cellpadding=2 width=90%>
- <tr><td colspan=3 ><b>Event starts at</b></td></tr>
- <tr><td><input type="text" name="time_start" id="time_start" value="" class="textbox" style="width:90px"></td><td width=50%><img border=0 src="<?echo $image_path?>btnL3Clock.gif" alt="Set time.." title="Set time.."></td></tr>
- <tr><td><input type="text" name="date_start" id="date_start" value="" class="textbox" style="width:90px"></td><td width=50%><img border=0 src="<?echo $image_path?>btnL3Calendar.gif" alt="Set date.." title="Set date.."></td></tr>
+ <tr><td colspan=3 ><b><?echo $mod_strings['LBL_EVENTSTAT']?></b></td></tr>
+ <tr><td>
+ <input type="text" name="time_start" id="time_start" value="" class="textbox" style="width:90px"></td><td width=50%><img border=0 src="<?echo $image_path?>btnL3Clock.gif" alt="Set time.." title="Set time..">
+ </td></tr>
+ <tr><td>
+ <input type="text" name="date_start" id="jscal_field_date_start" value="" class="textbox" style="width:90px"></td><td width=50%><img border=0 src="<?echo $image_path?>btnL3Calendar.gif" alt="Set date.." title="Set date.." id="jscal_trigger_date_start">
+ <script type="text/javascript">
+ Calendar.setup ({
+ inputField : "jscal_field_date_start", ifFormat : "%Y-%m-%d", showsTime : false, button : "jscal_trigger_date_start", singleClick : true, step : 1
+ })
+ </script>
+ </td></tr>
</table>
</td>
<td width=50% valign=top >
<table border=0 cellspacing=0 cellpadding=2 width=90%>
- <tr><td><b>Event ends on</b></td></tr>
+ <tr><td><b><?echo $mod_strings['LBL_EVENTEDAT']?></b></td></tr>
<tr><td><input type="text" name="time_end" id="time_end" value="" class="textbox" style="width:90px"></td><td width=100%><img border=0 src="<?echo $image_path?>btnL3Clock.gif" alt="Set time.." title="Set time.."></td></tr>
- <tr><td><input type="text" name="due_date" id="due_date" value="" class="textbox" style="width:90px"></td><td width=100%><img border=0 src="<?echo $image_path?>btnL3Calendar.gif" alt="Set date.." title="Set date.."></td></tr>
+ <tr><td>
+ <input type="text" name="due_date" id="jscal_field_due_date" value="" class="textbox" style="width:90px"></td><td width=100%><img border=0 src="<?echo $image_path?>btnL3Calendar.gif" alt="Set date.." title="Set date.." id="jscal_trigger_due_date">
+ <script type="text/javascript">
+ Calendar.setup ({
+ inputField : "jscal_field_due_date", ifFormat : "%Y-%m-%d", showsTime : false, button : "jscal_trigger_due_date", singleClick : true, step : 1
+ })
+ </script>
+ </td></tr>
</table>
</td>
</tr>
@@ -85,11 +107,11 @@
<table border=0 cellspacing=0 cellpadding=3 width=100%>
<tr>
<td class="dvtTabCache" style="width:10px" nowrap> </td>
- <td id="cellTabInvite" class="dvtSelectedCell" align=center nowrap><a href="#" onClick="switchClass('cellTabInvite','on');switchClass('cellTabAlarm','off');switchClass('cellTabRepeat','off');ghide('addEventAlarmUI');gshow('addEventInviteUI',document.appSave.date_start.value,document.appSave.due_date.value,document.appSave.time_start.value,document.appSave.time_end.value);ghide('addEventRepeatUI');">Invite</a></td>
+ <td id="cellTabInvite" class="dvtSelectedCell" align=center nowrap><a href="#" onClick="switchClass('cellTabInvite','on');switchClass('cellTabAlarm','off');switchClass('cellTabRepeat','off');ghide('addEventAlarmUI');gshow('addEventInviteUI',document.appSave.date_start.value,document.appSave.due_date.value,document.appSave.time_start.value,document.appSave.time_end.value);ghide('addEventRepeatUI');"><?php echo $mod_strings['LBL_INVITE']?></a></td>
<td class="dvtTabCache" style="width:10px"> </td>
- <td id="cellTabAlarm" class="dvtUnSelectedCell" align=center nowrap><a href="#" onClick="switchClass('cellTabInvite','off');switchClass('cellTabAlarm','on');switchClass('cellTabRepeat','off');gshow('addEventAlarmUI',document.appSave.date_start.value,document.appSave.due_date.value,document.appSave.time_start.value,document.appSave.time_end.value);ghide('addEventInviteUI');ghide('addEventRepeatUI');">Reminder</a></td>
+ <td id="cellTabAlarm" class="dvtUnSelectedCell" align=center nowrap><a href="#" onClick="switchClass('cellTabInvite','off');switchClass('cellTabAlarm','on');switchClass('cellTabRepeat','off');gshow('addEventAlarmUI',document.appSave.date_start.value,document.appSave.due_date.value,document.appSave.time_start.value,document.appSave.time_end.value);ghide('addEventInviteUI');ghide('addEventRepeatUI');"><?php echo $mod_strings['LBL_REMINDER']?></a></td>
<td class="dvtTabCache" style="width:10px"> </td>
- <td id="cellTabRepeat" class="dvtUnSelectedCell" align=center nowrap><a href="#" onClick="switchClass('cellTabInvite','off');switchClass('cellTabAlarm','off');switchClass('cellTabRepeat','on');ghide('addEventAlarmUI');ghide('addEventInviteUI');gshow('addEventRepeatUI',document.appSave.date_start.value,document.appSave.due_date.value,document.appSave.time_start.value,document.appSave.time_end.value);">Repeat</a></td>
+ <td id="cellTabRepeat" class="dvtUnSelectedCell" align=center nowrap><a href="#" onClick="switchClass('cellTabInvite','off');switchClass('cellTabAlarm','off');switchClass('cellTabRepeat','on');ghide('addEventAlarmUI');ghide('addEventInviteUI');gshow('addEventRepeatUI',document.appSave.date_start.value,document.appSave.due_date.value,document.appSave.time_start.value,document.appSave.time_end.value);"><?php echo $mod_strings['LBL_REPEAT']?></a></td>
<td class="dvtTabCache" style="width:100%"> </td>
</tr>
</table>
Modified: vtigercrm/trunk/modules/Calendar/calendarLayout.php
==============================================================================
--- vtigercrm/trunk/modules/Calendar/calendarLayout.php (original)
+++ vtigercrm/trunk/modules/Calendar/calendarLayout.php Mon May 15 20:44:03 2006
@@ -94,6 +94,7 @@
//use getPendingActivities() method of Activities/OpenListView.php to get pending activities
function get_cal_header_data(& $cal_arr)
{
+ global $mod_strings;
//echo '<pre>'; print_r($cal_arr); echo '</pre>';
$format = $cal_arr['calendar']->hour_format;
$hour_startat = convertTime2UserSelectedFmt($format,$cal_arr['calendar']->day_start_hour);
@@ -103,7 +104,7 @@
<tr><td colspan='3'> </td></tr>
<tr>
<td class='tabSelected' style='border: 1px solid rgb(102, 102, 102);' align='center' width='10%'>
- <a onClick='gshow(\"addEvent\",\"".$cal_arr['calendar']->date_time->get_formatted_date()."\",\"".$cal_arr['calendar']->date_time->get_formatted_date()."\",\"".$hour_startat."\",\"".$hour_endat."\")' href='javascript:void(0)'>Add Event</a>
+ <a onClick='gshow(\"addEvent\",\"".$cal_arr['calendar']->date_time->get_formatted_date()."\",\"".$cal_arr['calendar']->date_time->get_formatted_date()."\",\"".$hour_startat."\",\"".$hour_endat."\")' href='javascript:void(0)'>".$mod_strings['LBL_ADD_EVENT']."</a>
<img src='".$cal_arr['IMAGE_PATH']."menuDnArrow.gif' style='padding-left: 5px;' border='0'>
</td>
<td align='center' width='65%'>";
@@ -121,9 +122,10 @@
*/
function getEventViewOption(& $cal)
{
+ global $mod_strings;
$view = "<select name='view' class='importBox' id='viewBox' onchange='fnRedirect(\"".$cal['calendar']->view."\",\"".$cal['calendar']->date_time->hour."\",\"".$cal['calendar']->date_time->day."\",\"".$cal['calendar']->date_time->month."\",\"".$cal['calendar']->date_time->year."\")'>";
- $view .="<option value='hourview' selected='selected'>Hour View</option>
- <option value='listview'>List View</option>
+ $view .="<option value='hourview' selected='selected'>".$mod_strings['LBL_HRVIEW']."</option>
+ <option value='listview'>".$mod_strings['LBL_LISTVIEW']."</option>
</select>";
return $view;
}
@@ -634,31 +636,33 @@
function getEventTodoInfo(& $cal, $mode)
{
+ global $mod_strings;
$event_todo = Array();
$event_todo['event']=getListView($cal, $mode);
$event_todo['todo'] = getTodosList($cal, $mode);
$event_todo_info = "";
- $event_todo_info .= "Total Events : ".$event_todo['event']['totalevent'];
+ $event_todo_info .= $mod_strings['LBL_TOTALEVENTS']." ".$event_todo['event']['totalevent'];
if($event_todo['event']['pendingevent'] != null)
- $event_todo_info .= ", ".$event_todo['event']['pendingevent']." Pending";
+ $event_todo_info .= ", ".$event_todo['event']['pendingevent']." ".$mod_strings['LBL_PENDING'];
$event_todo_info .=" / ";
- $event_todo_info .="Total Todos : ".$event_todo['todo']['totaltodo'];
+ $event_todo_info .=$mod_strings['LBL_TOTALTODOS']." ".$event_todo['todo']['totaltodo'];
if($event_todo['todo']['pendingtodo'] != null)
- $event_todo_info .= ", ".$event_todo['todo']['pendingtodo']." Pending";
+ $event_todo_info .= ", ".$event_todo['todo']['pendingtodo']." ".$mod_strings['LBL_PENDING'];
return $event_todo_info;
}
function constructListView($entry_list)
{
+ global $mod_strings;
$list_view = "";
$header = Array('0'=>'#',
- '1'=>'Start Time',
- '2'=>'End Time',
- '3'=>'Event Type',
- '4'=>'Event Details',
- '5'=>'Actions',
- '6'=>'Current Status',
+ '1'=>$mod_strings['LBL_APP_START_TIME'],
+ '2'=>$mod_strings['LBL_APP_END_TIME'],
+ '3'=>$mod_strings['LBL_EVENTTYPE'],
+ '4'=>$mod_strings['LBL_EVTDTL'],
+ '5'=>$mod_strings['LBL_ACTION'],
+ '6'=>$mod_strings['LBL_CURSTATUS'],
);
$header_width = Array('0'=>'5',
'1'=>'10',
More information about the vtigercrm-commits
mailing list