]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1175 d1b88da0-ebda-0310...
authorwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Sat, 15 Sep 2007 02:32:18 +0000 (02:32 +0000)
committerwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Sat, 15 Sep 2007 02:32:18 +0000 (02:32 +0000)
ChangeLog
UI/Scheduler/UIxCalendarSelector.m
UI/Templates/SchedulerUI/UIxCalMainView.wox
UI/Templates/SchedulerUI/UIxCalendarSelector.wox
UI/WebServerResources/ContactsUI.css
UI/WebServerResources/SchedulerUI.js
UI/WebServerResources/generic.css

index a4c799c2f9a123cc68889f961fa9e7f8bec37e1e..d879621d3d744018c797a4ff91eb6b9f30b13868 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2007-09-14  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
 
+       * UI/Scheduler/UIxCalendarSelector.m ([UIxCalendarSelector
+       -calendars]): also returns the owner of the listed folders.
+
        * SoObjects/Appointments/SOGoAppointmentFolder.m
        ([-deleteEntriesWithIds:ids]): moved method into SOGoFolder.
 
index e077176ab72882d7b7d713c031ce2f0b9b770741..6bee8aad627f0030961b3c4687b55fc68a809f57 100644 (file)
@@ -129,6 +129,8 @@ colorForNumber (unsigned int number)
                    forKey: @"color"];
          isActive = [NSNumber numberWithBool: [folder isActive]];
          [calendar setObject: isActive forKey: @"active"];
+         [calendar setObject: [folder ownerInContext: context]
+                   forKey: @"owner"];
          [calendars addObject: calendar];
        }
     }
index 9ab3d56d5da26776d4e12bef7ad0c3ff71527813..4c5039a3dffae6dbb7439f4c876724b7273124a7 100644 (file)
@@ -49,6 +49,8 @@
 
   <div class="menu" id="calendarsMenu">
     <ul>
+      <li><var:string label:value="Modify"/></li>
+      <li><!-- separator --></li>
       <li><var:string label:value="New Calendar..."/></li>
       <li><var:string label:value="Delete Calendar"/></li>
       <li><!-- separator --></li>
index a54fcfb6bae02b9a81ed12e4272b58a743800ff1..ae36b74f952cb095d6cda495dcadde33776a29c2 100644 (file)
@@ -29,7 +29,8 @@
     </span>
     <ul id="calendarList" multiselect="yes">
       <var:foreach list="calendars" item="currentCalendar"
-       ><li class="denied" var:id="currentCalendar.id">
+       ><li class="denied" var:id="currentCalendar.id"
+         var:owner="currentCalendar.owner">
          <input type="checkbox" class="checkBox"
            const:disabled="disabled"
            var:checked="currentCalendar.active" />
index 5cdfff85fd8dba0020606ebabcd2cd7beb8e257b..c74c0cf9583ab060e827b417e9a30768a3de28da 100644 (file)
@@ -173,7 +173,7 @@ TABLE#contactsList
   width: 100%; }
 
 TABLE#contactsList TD
-{ white-space: wrap;
+{ white-space: normal; /* pre, normal, nowrap */
   /*width: 20%;*/ }
 
 TD#nameHeader,
index 199a1a87cc9e4983ed80f9f806812dfac5f002d0..8a4d6aa42c8045cb1693013bef875cfe69386af1 100644 (file)
@@ -1299,7 +1299,9 @@ function getMenus() {
                                       editEvent, deleteEvent, "-",
                                       onSelectAll, "-",
                                       null, null);
-   menus["calendarsMenu"] = new Array(onCalendarNew, onCalendarRemove,
+   menus["calendarsMenu"] = new Array(onMenuModify,
+                                     "-",
+                                     onCalendarNew, onCalendarRemove,
                                      "-", null, null, "-",
                                      null, "-", onMenuSharing);
    menus["searchMenu"] = new Array(setSearchCriteria);
@@ -1355,6 +1357,35 @@ function initCalendarSelector() {
   Event.observe(links[2], "click",  onCalendarRemove);
 }
 
+function onMenuModify(event) {
+  var folders = $("calendarList");
+  var selected = folders.getSelectedNodes()[0];
+
+  if (UserLogin == selected.getAttribute("owner")) {
+    var node = selected.childNodes[4];
+    var currentName = node.nodeValue.trim();
+    var newName = window.prompt(labels["Address Book Name"],
+                               currentName);
+    if (newName && newName.length > 0
+       && newName != currentName) {
+      var url = (URLForFolderID(selected.getAttribute("id"))
+                + "/renameFolder?name=" + escape(newName.utf8encode()));
+      triggerAjaxRequest(url, folderRenameCallback,
+                        {node: node, name: " " + newName});
+    }
+  } else
+    window.alert(clabels["Unable to rename that folder!"]);
+}
+
+function folderRenameCallback(http) {
+  if (http.readyState == 4) {
+    if (isHttpStatus204(http.status)) {
+      var dict = http.callbackData;
+      dict["node"].nodeValue = dict["name"];
+    }
+  }
+}
+
 function onCalendarNew(event) {
   createFolder(window.prompt(labels["Name of the Calendar"]),
               appendCalendar);
index 59077cd8e1aa726c7d8478c44cb4e8976711bbaa..861e7d2fc8f744a51f72a136400f9bf4e7fe490a 100644 (file)
@@ -357,7 +357,7 @@ UL#searchOptions LI
 { list-style-position: inside;
   list-style-image: url("menu-nocheck.gif");
   padding: 1px 3px;
-  margin: px; }
+  margin: 0px; }
 
 UL#searchOptions LI._chosen
 { list-style-image: url("menu-check.gif"); }