[Vtigercrm-commits] [vtiger-commits] r6012 - in /vtigercrm/branches/5.0_postgresql_integration: jscalendar/ modules/Calendar/ themes/blue/

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Tue May 16 00:39:06 EDT 2006


Author: jeffk
Date: Mon May 15 22:38:59 2006
New Revision: 6012

Log:
refs #752. merge trunk changesets [6003] through [6011]

Modified:
    vtigercrm/branches/5.0_postgresql_integration/jscalendar/calendar-win2k-cold-1.css
    vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/Appointment.php
    vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/Calendar.php
    vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/addEventUI.php
    vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/calendarLayout.php
    vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/script.js
    vtigercrm/branches/5.0_postgresql_integration/themes/blue/style.css

Modified: vtigercrm/branches/5.0_postgresql_integration/jscalendar/calendar-win2k-cold-1.css
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/jscalendar/calendar-win2k-cold-1.css (original)
+++ vtigercrm/branches/5.0_postgresql_integration/jscalendar/calendar-win2k-cold-1.css Mon May 15 22:38:59 2006
@@ -12,6 +12,7 @@
   cursor: default;
   background: #c8d0d4;
   font-family: tahoma,verdana,sans-serif;
+  z-index: 90000;
 }
 
 .calendar table {

Modified: vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/Appointment.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/Appointment.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/Appointment.php Mon May 15 22:38:59 2006
@@ -179,9 +179,17 @@
 		}
                 $this->record            = $act_array["activityid"];
 		if($view == 'day' || $view == 'week')
+		{
+			if($st_hour <= 9 && strlen(trim($st_hour)) < 2)
+                	{
+	                        $st_hour= '0'.$st_hour;
+        	        }
 			$this->formatted_datetime= $act_array["date_start"].":".$st_hour;
+		}
 		else
+		{
 			$this->formatted_datetime= $act_array["date_start"];
+		}
 		return;
 	}
 	

Modified: vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/Calendar.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/Calendar.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/Calendar.php Mon May 15 22:38:59 2006
@@ -55,10 +55,9 @@
 				for($i=0;$i<=23;$i++)
 				{
 					$layout = new Layout('hour',$this->date_time->getTodayDatetimebyIndex($i));
-					$this->day_slice[$layout->start_time->get_formatted_date().':'.$layout->start_time->hour] = $layout;
-					array_push($this->slices,  $layout->start_time->get_formatted_date().":".$layout->start_time->hour);
+					$this->day_slice[$layout->start_time->get_formatted_date().':'.$layout->start_time->z_hour] = $layout;
+					array_push($this->slices,  $layout->start_time->get_formatted_date().":".$layout->start_time->z_hour);
 				}
-				//echo '<pre>';print_r($this);echo'</pre>';
 				break;
 			case 'week':
 				$weekview_days = 7;
@@ -68,9 +67,9 @@
 					$this->week_array[$layout->start_time->get_formatted_date()] = $layout;
 					for($h=0;$h<=23;$h++)
 					{
-                                        	$hour_list = new Layout('hour',$this->date_time->getTodayDatetimebyIndex($h,$layout->start_time->z_day,$layout->start_time->z_month,$layout->start_time->z_year));
-						$this->week_slice[$layout->start_time->get_formatted_date().':'.$hour_list->start_time->hour] = $hour_list;
-						array_push($this->week_hour_slices,  $layout->start_time->get_formatted_date().":".$hour_list->start_time->hour);
+                                        	$hour_list = new Layout('hour',$this->date_time->getTodayDatetimebyIndex($h,$layout->start_time->day,$layout->start_time->month,$layout->start_time->year));
+						$this->week_slice[$layout->start_time->get_formatted_date().':'.$hour_list->start_time->z_hour] = $hour_list;
+						array_push($this->week_hour_slices,  $layout->start_time->get_formatted_date().":".$hour_list->start_time->z_hour);
 					}
 					array_push($this->slices,  $layout->start_time->get_formatted_date());
 					
@@ -159,7 +158,6 @@
 
 			}
 		}
-		//echo '<pre>';print_r($this->week_slice);echo'</pre>';
 		
 	}
 	

Modified: vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/addEventUI.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/addEventUI.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/addEventUI.php Mon May 15 22:38:59 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>&nbsp;</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">&nbsp;</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">&nbsp;</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%">&nbsp;</td>
 				</tr>
 				</table>

Modified: vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/calendarLayout.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/calendarLayout.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/calendarLayout.php Mon May 15 22:38:59 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'>&nbsp;</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;
 }
@@ -649,31 +651,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']."&nbsp;".$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']."&nbsp;".$mod_strings['LBL_PENDING'];
 	$event_todo_info .=" / ";
-	$event_todo_info .="Total Todos : ".$event_todo['todo']['totaltodo'];
+	$event_todo_info .=$mod_strings['LBL_TOTALTODOS']."&nbsp;".$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']."&nbsp;".$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',

Modified: vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/script.js
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/script.js (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/Calendar/script.js Mon May 15 22:38:59 2006
@@ -86,8 +86,8 @@
 	
 	if (y.display=="none") 
 	{
-		document.getElementById("date_start").value = startdate;
-		document.getElementById("due_date").value = enddate;	
+		document.getElementById("jscal_field_date_start").value = startdate;
+		document.getElementById("jscal_field_due_date").value = enddate;	
 		document.getElementById("time_start").value = starttime;
 		document.getElementById("time_end").value = endtime;
 		y.display="block";

Modified: vtigercrm/branches/5.0_postgresql_integration/themes/blue/style.css
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/themes/blue/style.css (original)
+++ vtigercrm/branches/5.0_postgresql_integration/themes/blue/style.css Mon May 15 22:38:59 2006
@@ -469,7 +469,7 @@
 
 .calAddEvent {
 	position:absolute;
-	z-index:1000000;
+	z-index:10000;
 	width:500px;
 
 	left:200px;





More information about the vtigercrm-commits mailing list