Index: /trunk/expressoCalendar/inc/load_lang.php
===================================================================
--- /trunk/expressoCalendar/inc/load_lang.php (revision 919)
+++ /trunk/expressoCalendar/inc/load_lang.php (revision 1204)
@@ -1,3 +1,12 @@
+ if(!isset($GLOBALS['phpgw_info'])){
+ $GLOBALS['phpgw_info']['flags'] = array(
+ 'currentapp' => 'expressoCalendar',
+ 'nonavbar' => true,
+ 'noheader' => true
+ );
+ }
+ require_once '../../header.session.inc.php';
+
// Load the lang of the module.
if(!$_SESSION['phpgw_info']['expressoCalendar']['lang'])
Index: /trunk/expressoCalendar/inc/controller.php
===================================================================
--- /trunk/expressoCalendar/inc/controller.php (revision 632)
+++ /trunk/expressoCalendar/inc/controller.php (revision 1204)
@@ -1,3 +1,12 @@
'expressoCalendar',
+ 'nonavbar' => true,
+ 'noheader' => true
+ );
+ }
+ require_once '../../header.session.inc.php';
+
// Explode action from cExecuteForm function
$cExecuteFormReturn = false;
Index: /trunk/expressoCalendar/inc/class.bocalendar.inc.php
===================================================================
--- /trunk/expressoCalendar/inc/class.bocalendar.inc.php (revision 920)
+++ /trunk/expressoCalendar/inc/class.bocalendar.inc.php (revision 1204)
@@ -103,16 +103,9 @@
function insertEvent ($datetime, $edatetime, $title, $description, $location)
{
- //Discover the event id
- $query = "SELECT max(cal_id) FROM phpgw_cal";
- if (!$this->db->query($query))
- return false;
-
- while($this->db->next_record())
- $id = $this->db->row();
-
// Performing SQL insert query
- $query = "INSERT INTO phpgw_cal VALUES (".($id['max']+1).", '".$_SESSION['calendar']['user']['email']."', ".$this->user_id.", null, null, ".$datetime.", ".time().",".$edatetime.", 2, 'E', 0, '".$title."', '".$description."', '".$location."', 0, null)";
+ //FIXME LOCK the table sequence is desirable
+ $query = "INSERT INTO phpgw_cal VALUES (default, '".$_SESSION['calendar']['user']['email']."', ".$this->user_id.", null, null, ".$datetime.", ".time().",".$edatetime.", default, 'E', default, '".$title."', '".$description."', '".$location."', default, default)";
if ($this->db->query($query)){
- $query = "INSERT INTO phpgw_cal_user VALUES (".($id['max']+1).", ".$this->user_id.", 'A', 'u')";
+ $query = "INSERT INTO phpgw_cal_user VALUES (currval('seq_phpgw_cal'::regclass), ".$this->user_id.", 'A', 'u')";
if ($this->db->query($query)){
$return = "true ";
Index: /trunk/expressoCalendar/js/calendar_functions.js
===================================================================
--- /trunk/expressoCalendar/js/calendar_functions.js (revision 961)
+++ /trunk/expressoCalendar/js/calendar_functions.js (revision 1204)
@@ -305,5 +305,5 @@
for (var hour = parseInt(start_,10); hour < parseInt(end_,10);(hour%100 == 30)?hour+=70:hour+=30)
screenTable[weekDay][hour] = currentPos;
- eventDiv.style.left = 90+(205*(currentPos-1)) + "px" ;
+ eventDiv.style.left = 260+(205*(currentPos-1)) + "px" ;
eventDiv.onmouseover = function(){ createButtons(eventDiv); };
eventDiv.onmouseout = function(){ removeButtons(eventDiv); };
Index: /trunk/expressoCalendar/js/globals.js
===================================================================
--- /trunk/expressoCalendar/js/globals.js (revision 656)
+++ /trunk/expressoCalendar/js/globals.js (revision 1204)
@@ -3,10 +3,14 @@
document.getElementById('dayLinkView').title = get_lang('Daily View');
document.getElementById('dayLinkView').alt = get_lang('Daily View');
+ document.getElementById('daySpanView').innerHTML = get_lang('Daily View');
document.getElementById('weekLinkView').title = get_lang('Weekly View');
document.getElementById('weekLinkView').alt = get_lang('Weekly View');
+ document.getElementById('weekSpanView').innerHTML = get_lang('Weekly View');
document.getElementById('monthLinkView').title = get_lang('Monthly View');
document.getElementById('monthLinkView').alt = get_lang('Monthly View');
+ document.getElementById('monthSpanView').innerHTML = get_lang('Monthly View');
document.getElementById('yearLinkView').title = get_lang('Year View');
document.getElementById('yearLinkView').alt = get_lang('Year View');
+ document.getElementById('yearSpanView').innerHTML = get_lang('Year View');
}
var calUid = document.getElementById('cal_id').value;
Index: /trunk/expressoCalendar/templates/default/index.tpl
===================================================================
--- /trunk/expressoCalendar/templates/default/index.tpl (revision 961)
+++ /trunk/expressoCalendar/templates/default/index.tpl (revision 1204)
@@ -2,35 +2,65 @@
-