]> err.no Git - scalable-opengroupware.org/commitdiff
implemented bulk reply/forward
authorhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Sun, 13 Feb 2005 00:39:39 +0000 (00:39 +0000)
committerhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Sun, 13 Feb 2005 00:39:39 +0000 (00:39 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@550 d1b88da0-ebda-0310-925b-ed51d893ca5b

SOGo/UI/Mailer/ChangeLog
SOGo/UI/Mailer/UIxMailEditor.m
SOGo/UI/Mailer/UIxMailEditorAction.m
SOGo/UI/Mailer/UIxMailListView.wox
SOGo/UI/Mailer/UIxSieveEditor.m
SOGo/UI/Mailer/Version
SOGo/UI/Mailer/mailer.js
SOGo/UI/Mailer/product.plist

index 1219022f69acf4f50a5e8b6b30448fcf869a4964..092e698c0034f19e6657afe23c56c1f71df17648 100644 (file)
@@ -1,3 +1,8 @@
+2005-02-13  Helge Hess  <helge.hess@opengroupware.org>
+
+       * product.plist, UIxMailListView.wox, mailer.js: added bulk
+         reply/replyall/forward (v0.9.102)
+
 2005-02-12  Helge Hess  <helge.hess@opengroupware.org>
 
        * UIxMailMainFrame.m: fixed page form processing if the active URL
index 89dbeacd5bde2000a6aa8eb395eed7069ba17bec..571bb62cc5bac879cd50de461e0c0847114942bc 100644 (file)
@@ -275,8 +275,10 @@ static NSArray      *infoKeys = nil;
 }
 
 - (id)editAction {
+#if 0
   [self logWithFormat:@"edit action, load content from: %@",
          [self clientObject]];
+#endif
   
   [self loadInfo:[[self clientObject] fetchInfo]];
   return self;
index 9cc8f2a0c4739e72a27ef9a01c5e84743abb0223..5d1c747056baac9cbc586b37925fcab9e717df3d 100644 (file)
   }
   
   ASSIGN(self->newDraft, tmp);
-  [self logWithFormat:@"NEW DRAFT: %@", self->newDraft];
+  //[self debugWithFormat:@"NEW DRAFT: %@", self->newDraft];
   
   return nil;
 }
index a4e8702542d9df2aaf64cfe5975c4baea5592101..16abefd0c8b00ae1e5fd29dfa4bf6582321c1d0a 100644 (file)
         <var:foreach list="messages" item="message">
           <tr class="tableview" var:id="msgRowID">
             <td>
-<!-- enable once we have buttons and functionality to actually move sth #1211
-              <input type="checkbox"
-                     var:value="msgRowID"
-                     const:checked="NO"
-                     const:name="selectedRows"
-                     onclick="javascript:toggleRowSelectionStatus(this);"
-              />
--->
+              <!-- this seems to break on Safari, it treats name==id? -->
+              <input type="checkbox" var:name="msgRowID" value="0" 
+                     onchange="toggleMailSelect(this)" />
             </td>
             <td var:class="messageCellStyleClass">
               <div var:class="messageSubjectStyleClass" var:id="msgDivID">
-                <!-- Note: var:href="messageViewURL" (done by JS),
-                           var:target="messageViewTarget" -->
                 <a href="#" var:onclick="clickedMsgJS">
+                  <!-- Note: var:href="messageViewURL" (done by JS),
+                             var:target="messageViewTarget" -->
                   <var:string value="message.envelope.subject"
                               formatter="context.mailSubjectFormatter"/>
                 </a>
index ddd8ca9e96ede9ebc75daadffd91099ea4ac77bf..d50fa412bd7b2351410a114da385432cb9c8fb90 100644 (file)
 }
 
 - (id)editAction {
+#if 0
   [self logWithFormat:@"edit action, load content from: %@",
          [self clientObject]];
+#endif
   
   [self setScriptName:[[self clientObject] nameInContainer]];
   [self setScriptText:[[self clientObject] contentAsString]];
index 529aca4c88391ebfe32234e0cdc00172fc942fe9..ceaa66e5b5199d806c92b0491adc7a0ef4b431be 100644 (file)
@@ -1,6 +1,6 @@
 # version file
 
-SUBMINOR_VERSION:=101
+SUBMINOR_VERSION:=102
 
 # v0.9.100 requires libNGMime        v4.5.213
 # v0.9.99  requires libNGMime        v4.5.212
index 2163872fbc145230d37e460379064e78e69acdb1..a01927a9f05710bfc30ce437fb15ca43898e32ee 100644 (file)
 
 /* mail list */
 
+function openMessageWindow(sender, msguid, url) {
+  return window.open(url, "SOGo_msg_" + msguid,
+          "width=640,height=480,resizable=1,scrollbars=1,toolbar=0," +
+          "location=0,directories=0,status=0,menubar=0,copyhistory=0")
+}
+
 function clickedUid(sender, msguid) {
-  var urlstr;
-  
-  urlstr = msguid + "/view";
-  window.open(urlstr, "SOGo_msg_" + msguid,
-             "width=640,height=480,resizable=1,scrollbars=1,toolbar=0," +
-             "location=0,directories=0,status=0,menubar=0,copyhistory=0")
+  resetSelection(window);
+  openMessageWindow(sender, msguid, msguid + "/view");
   return true;
 }
 function doubleClickedUid(sender, msguid) {
@@ -41,6 +43,46 @@ function lowlightUid(sender, msguid) {
   return true;
 }
 
+function singleClickedTableRow(clickEvent, sender) {
+  var rowid = sender.id;
+  var field;
+  
+  field = document.forms['pageform'].elements[rowid];
+  if (field.value == "1") {
+    field.value = "0";
+    sender.className = "tableview";
+  }
+  else {
+    field.value = "1";
+    sender.className = "tableview_selected";
+  }
+}
+function doubleClickedTableRow(clickEvent, sender) {
+  var rowid = sender.id;
+  resetSelection(window);
+}
+
+function toggleMailSelect(sender) {
+  var row;
+  row = document.getElementById(sender.name);
+  row.className = sender.checked ? "tableview_selected" : "tableview";
+}
+function collectSelectedRows() {
+  var pageform = document.forms['pageform'];
+  var rows = new Array();
+
+  for (key in pageform) {
+    if (key.indexOf("row_") != 0)
+      continue;
+
+    if (!pageform[key].checked)
+      continue;
+    
+    rows[rows.length] = key.substring(4, key.length);
+  }
+  return rows;
+}
+
 function clearSearch(sender) {
   var searchField = window.document.getElementById("searchtext");
   if (searchField) searchField.value="";
@@ -161,6 +203,27 @@ function clickedNewFilter(sender) {
 
 /* generic stuff */
 
+function getHTTPClient() {
+  // http://developer.apple.com/internet/webcontent/xmlhttpreq.html
+  if (typeof XMLHttpRequest != "undefined")
+    return new XMLHttpRequest();
+  
+  try { return new ActiveXObject("Msxml2.XMLHTTP"); } 
+  catch (e) { }
+  try { return new ActiveXObject("Microsoft.XMLHTTP"); } 
+  catch (e) { }
+  return null;
+}
+
+function resetSelection(win) {
+  var t = "";
+  if (win && win.getSelection) {
+    t = win.getSelection().toString();
+    win.getSelection().removeAllRanges();
+  }
+  return t;
+}
+
 function refreshOpener() {
   if (window.opener && !window.opener.closed) {
     window.opener.location.reload();
@@ -225,6 +288,7 @@ function markMailReadInWindow(win, msguid) {
 /* main window */
 
 function reopenToRemoveLocationBar() {
+  // we cannot really use this, see below at the close comment
   if (window.locationbar && window.locationbar.visible) {
     newwin = window.open(window.location.href, "SOGo",
                         "width=800,height=600,resizable=1,scrollbars=1," +
@@ -239,3 +303,13 @@ function reopenToRemoveLocationBar() {
   }
   return true;
 }
+
+/* mail list reply */
+
+function openMessageWindowsForSelection(sender, action) {
+  var rows  = collectSelectedRows();
+  var idset = "";
+  
+  for (var i = 0; i < rows.length; i++)
+    win = openMessageWindow(sender, rows[i], rows[i] + "/" + action);
+}
index e2c6c826a595f6889adb6811de850456946140dc..f95ac7a4a3f234027e029ce65fcbcac228829260 100644 (file)
                 cssClass = "tbicon_compose"; label = "Write";
               },
             ),
-/* TODO: enable when implemented
             ( // second group
               { link = "#"; 
+                onclick="openMessageWindowsForSelection(this, 'reply'); return false;";
                 cssClass = "tbicon_reply";    label = "Reply";     },
               { link = "#"; 
+                onclick="openMessageWindowsForSelection(this, 'replyall'); return false;";
                 cssClass = "tbicon_replyall"; label = "Reply All"; },
-              { link = "#"; cssClass = "tbicon_forward";  label = "Forward";   },
+              { link = "#"; 
+                onclick="openMessageWindowsForSelection(this, 'forward'); return false;";
+                cssClass = "tbicon_forward";  label = "Forward";   },
             ),
-*/
             ( // third group
               { link = "expunge"; 
                 cssClass = "tbicon_delete"; label = "Expunge"; },