]> err.no Git - scalable-opengroupware.org/blobdiff - UI/WebServerResources/SchedulerUI.js
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1052 d1b88da0-ebda-0310...
[scalable-opengroupware.org] / UI / WebServerResources / SchedulerUI.js
index 856077e52d5080cb7993505b6e3c27871c86c603..718df0f35153918e006a7a6465bc48a891768dbe 100644 (file)
@@ -7,7 +7,7 @@ var listFilter = 'view_today';
 var listOfSelection = null;
 var selectedCalendarCell;
 
-var hideCompletedTasks = 0;
+var showCompletedTasks = 0;
 
 var currentDay = '';
 var currentView = "dayview";
@@ -19,6 +19,9 @@ var contactSelectorAction = 'calendars-contacts';
 var eventsToDelete = new Array();
 var ownersOfEventsToDelete = new Array();
 
+var usersRightsWindowHeight = 250;
+var usersRightsWindowWidth = 502;
+
 function newEvent(sender, type) {
   var day = sender.getAttribute("day");
   if (!day)
@@ -39,7 +42,7 @@ function newEvent(sender, type) {
   if (params.length > 0)
     urlstr += "?" + params.join("&");
 
-  window.open(urlstr, "", "width=490,height=600,resizable=0");
+  window.open(urlstr, "", "width=490,height=470,resizable=0");
 
   return false; /* stop following the link */
 }
@@ -53,7 +56,7 @@ function _editEventId(id, owner) {
   var urlstr = urlBase + id + "/edit";
 
   var win = window.open(urlstr, "SOGo_edit_" + id,
-                        "width=490,height=600,resizable=0");
+                        "width=490,height=470,resizable=0");
   win.focus();
 }
 
@@ -368,7 +371,6 @@ function changeDateSelectorDisplay(day, keepCurrentDay) {
     if (!keepCurrentDay)
       currentDay = day;
 
-    log (backtrace());
     var month = day.substr(0, 6);
     if (cachedDateSelectors[month]) {
 //       log ("restoring cached selector for month: " + month);
@@ -632,7 +634,7 @@ function refreshAppointments() {
 }
 
 function refreshTasks() {
-  return _loadTasksHref("taskslist?hide-completed=" + hideCompletedTasks);
+  return _loadTasksHref("taskslist?show-completed=" + showCompletedTasks);
 }
 
 function refreshAppointmentsAndDisplay() {
@@ -817,8 +819,8 @@ function changeMonthCalendarDisplayOfSelectedDay(node) {
    node.addClassName("selectedDay");
 }
 
-function onHideCompletedTasks(node) {
-  hideCompletedTasks = (node.checked ? 1 : 0);
+function onShowCompletedTasks(node) {
+  showCompletedTasks = (node.checked ? 1 : 0);
 
   return refreshTasks();
 }
@@ -956,16 +958,6 @@ function addContact(tag, fullContactName, contactId, contactName, contactEmail)
   return false;
 }
 
-function onChangeCalendar(list) {
-   var form = document.forms.editform;
-   log ("before: " + form.getAttribute("action"));
-   var urlElems = form.getAttribute("action").split("/");
-   urlElems[urlElems.length-4]
-      = list.childNodesWithTag("option")[list.value].innerHTML;
-   form.setAttribute("action", urlElems.join("/"));
-   log ("after: " + form.getAttribute("action"));
-}
-
 function validateBrowseURL(input) {
   var button = $("browseURLBtn");
 
@@ -1064,6 +1056,7 @@ function appendCalendar(folderName, folder) {
    checkBox.type = "checkbox";
    checkBox.addEventListener("change", updateCalendarStatus, false);
    li.appendChild(checkBox);
+   li.appendChild(document.createTextNode(" "));
    var colorBox = document.createElement("div");
    colorBox.appendChild(document.createTextNode("OO"));
    colorBox.addClassName("colorBox");
@@ -1072,15 +1065,17 @@ function appendCalendar(folderName, folder) {
       colorBox.style.backgroundColor = color + ";";
    }
    li.appendChild(colorBox);
-   li.appendChild(document.createTextNode(folderName));
+   li.appendChild(document.createTextNode(" " + folderName));
 
    calendarList.appendChild(li);
 
    var contactId = folder.split(":")[0];
    var styles = document.getElementsByTagName("style");
+
+   var url = URLForFolderID(folder) + "/canAccessContent";
+   triggerAjaxRequest(url, calendarEntryCallback, folder);
+
    styles[0].innerHTML += ('.ownerIs' + contactId + ' {'
-                          + ' color: '
-                          + color + ';'
                           + ' background-color: '
                           + color
                           + ' !important; }');