From c5ae1f59e329f3e133ea3e8ba023a342caea6e45 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 30 Aug 2006 23:13:18 +0000 Subject: [PATCH] Monotone-Parent: 62601a8adc8003aac03c26668d99b5132be9b65a Monotone-Revision: 2504047f4ddc5484b85d5ed99c44a4a2b83e967f Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-08-30T23:13:18 Monotone-Branch: ca.inverse.sogo --- UI/WebServerResources/SchedulerUI.js | 42 ++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index 11a7caeca..8e5cb41d1 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -1,16 +1,20 @@ var sortOrder = ''; var sortKey = ''; -var listFilter = 'view_all'; +var listFilter = 'view_today'; var currentDay = ''; var currentCalendarDay = ''; var currentView = 'dayview'; function newEvent(sender) { - var urlstr = ApplicationBaseURL + "new"; + var day = sender.getAttribute("day"); + var hour = sender.getAttribute("hour"); + var urlstr = (ApplicationBaseURL + "new" + + "?day=" + day + + "&hm=" + hour); window.open(urlstr, "", - "width=680,height=520,resizable=1,scrollbars=1,toolbar=0," + + "width=560,height=170,resizable=1,scrollbars=1,toolbar=0," + "location=0,directories=0,status=0,menubar=0,copyhistory=0"); return false; /* stop following the link */ @@ -20,7 +24,7 @@ function _editEventId(id) { var urlstr = ApplicationBaseURL + id + "/edit"; var win = window.open(urlstr, "SOGo_edit_" + id, - "width=680,height=520,resizable=1,scrollbars=1,toolbar=0," + + "width=560,height=170,resizable=1,scrollbars=1,toolbar=0," + "location=0,directories=0,status=0,menubar=0,copyhistory=0"); win.focus(); } @@ -84,7 +88,7 @@ function displayAppointment(sender) { var urlstr = ApplicationBaseURL + aptId + "/view"; var win = window.open(urlstr, "SOGo_view_" + aptId, - "width=680,height=520,resizable=1,scrollbars=1,toolbar=0," + + "width=560,height=170,resizable=1,scrollbars=1,toolbar=0," + "location=0,directories=0,status=0,menubar=0,copyhistory=0"); win.focus(); @@ -316,15 +320,22 @@ function calendarDisplayCallback(http) log ("ajax fuckage"); } +function assignCalendar(name) +{ + var node = $(name); + + node.calendar = new skycalendar(node); + node.calendar.setCalendarPage(ResourcesURL + "/skycalendar.html"); + var dateFormat = node.getAttribute("dateFormat"); + if (dateFormat) + node.calendar.setDateFormat(dateFormat); +} + function popupCalendar(node) { - var inputId = node.getAttribute("inputId"); - var dateFormat = node.getAttribute("dateFormat"); - - var calendar = new skycalendar($(inputId)); - calendar.setCalendarPage(ResourcesURL + "/skycalendar.html"); - calendar.setDateFormat(dateFormat); - calendar.popup(); + var nodeId = node.getAttribute("inputId"); + var input = $(nodeId); + input.calendar.popup(); return false; } @@ -492,3 +503,10 @@ function onYearMenuItemClick(node) return false; } + +function onSearchFormSubmit() +{ + log ("search not implemented"); + + return false; +}