]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1201 d1b88da0-ebda-0310...
authorwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Fri, 26 Oct 2007 15:56:00 +0000 (15:56 +0000)
committerwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Fri, 26 Oct 2007 15:56:00 +0000 (15:56 +0000)
22 files changed:
ChangeLog
SoObjects/Mailer/SOGoMailBodyPart.m
SoObjects/Mailer/SOGoMailFolder.h
SoObjects/Mailer/SOGoMailFolder.m
SoObjects/Mailer/SOGoMailObject.m
SoObjects/SOGo/SOGoUser.h
SoObjects/SOGo/SOGoUser.m
UI/MailerUI/UIxMailListView.m
UI/MainUI/SOGoUserHomePage.m
UI/PreferencesUI/English.lproj/Localizable.strings
UI/PreferencesUI/French.lproj/Localizable.strings
UI/PreferencesUI/German.lproj/Localizable.strings
UI/PreferencesUI/UIxPreferences.m
UI/Templates/PreferencesUI/UIxPreferences.wox
UI/WebServerResources/MailerUI.css
UI/WebServerResources/MailerUI.js
UI/WebServerResources/SOGoRootPage.css
UI/WebServerResources/UIxMailEditor.js
UI/WebServerResources/UIxMailPopupView.js
UI/WebServerResources/generic.css
UI/WebServerResources/generic.js
UI/WebServerResources/iefixes.css

index 2239ac960b1bc8c3e36f447fb6e33f51a87348c0..e91bb16d2f029eaf15d08a8e751c2bbf8e241b6d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,34 @@
+2007-10-26  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
+
+       * SoObjects/Mailer/SOGoMailBodyPart.m ([SOGoMailBodyPart
+       -GETAction:]): use the "application/octet-stream" mime type for
+       elements of type "application/x-xpinstall" to avoid confusing
+       Firefox.
+
+       * UI/PreferencesUI/UIxPreferences.m ([UIxPreferences -messageCheckList])
+       ([UIxPreferences -itemMessageCheckText])
+       ([UIxPreferences -userMessageCheck])
+       ([UIxPreferences -setUserMessageCheck:newMessageCheck]): new
+       methods for handling the retrieval of new messages automatically.
+
+       * SoObjects/SOGo/SOGoUser.m ([SOGoUser -messageCheck]): new method
+       that returns the interval of time between automatic message
+       retrievals.
+
+       * UI/MailerUI/UIxMailListView.m ([UIxMailListView
+       -defaultAction]): now expunges the last folder marked for expunge.
+
+       * SoObjects/Mailer/SOGoMailObject.m ([SOGoMailObject
+       -trashInContext:_ctx]): now marks the container folder for
+       expunge.
+
+       * SoObjects/Mailer/SOGoMailFolder.m ([SOGoMailFolder
+       -markForExpunge]): new method that marks the folder for the next
+       automatic expunge operation in the user settings.
+       ([SOGoMailFolder -expungeLastMarkedFolder]): new methods that
+       takes the last folder marked for expunge, expunges it and removes
+       it from the user settings, if it exists.
+
 2007-10-25  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
 
        * UI/MailerUI/UIxMailListView.m ([UIxMailListView
index fb11b0191a3408e73033eb13aa159845466dbaed..d1a1f42fe5ab63544b8948a19bceef0c6972af1c 100644 (file)
@@ -258,7 +258,7 @@ static BOOL debugOn = NO;
   NSException *error;
   WOResponse *r;
   NSData     *data;
-  NSString   *etag;
+  NSString   *etag, *mimeType;
   
   if ((error = [self matchesRequestConditionInContext:_ctx]) != nil) {
     // TODO: currently we fetch the body structure to get here - check this!
@@ -283,14 +283,19 @@ static BOOL debugOn = NO;
   
   // TODO: wrong, could be encoded
   r = [(WOContext *)_ctx response];
-  [r setHeader:[self davContentType] forKey:@"content-type"];
-  [r setHeader:[NSString stringWithFormat:@"%d", [data length]]
-     forKey:@"content-length"];
-  
+  mimeType = [self davContentType];
+  if ([mimeType isEqualToString: @"application/x-xpinstall"])
+    mimeType = @"application/octet-stream";
+
+  [r setHeader: mimeType forKey:@"content-type"];
+  [r setHeader: [NSString stringWithFormat:@"%d", [data length]]
+     forKey: @"content-length"];
+
   if ((etag = [self davEntityTag]) != nil)
     [r setHeader:etag forKey:@"etag"];
 
   [r setContent:data];
+
   return r;
 }
 
index 3cd98c20a6ecf746731a98dfb13b2366a32625f0..3de6f3ee8c90ddd6070b5ddd28be3c390062f2e6 100644 (file)
@@ -52,6 +52,9 @@
 
 - (NSException *) postData: (NSData *) _data flags: (id) _flags;
 
+- (void) markForExpunge;
+- (void) expungeLastMarkedFolder;
+
 - (NSException *) expunge;
 
 /* flags */
index 50f2484b04a5d9b19e54f5b9d8a57aeed221088c..ec66e36694da2402e7f754ab5ed045007eaa25b3 100644 (file)
   02111-1307, USA.
 */
 
+#import <Foundation/NSDictionary.h>
+#import <Foundation/NSURL.h>
 #import <Foundation/NSUserDefaults.h>
 
 #import <NGObjWeb/NSException+HTTP.h>
+#import <NGObjWeb/WOContext+SoObjects.h>
 #import <NGExtensions/NSNull+misc.h>
 #import <NGExtensions/NSURL+misc.h>
 #import <NGExtensions/NSObject+Logs.h>
@@ -236,6 +239,47 @@ static NSString *defaultUserID =  @"anyone";
   return [[self imap4Connection] expungeAtURL: [self imap4URL]];
 }
 
+- (void) markForExpunge
+{
+  NSUserDefaults *ud;
+  NSMutableDictionary *mailSettings;
+
+  ud = [[context activeUser] userSettings];
+  mailSettings = [ud objectForKey: @"Mail"];
+  if (!mailSettings)
+    {
+      mailSettings = [NSMutableDictionary dictionaryWithCapacity: 1];
+      [ud setObject: mailSettings forKey: @"Mail"];
+    }
+
+  [mailSettings setObject: [self imap4URLString] forKey: @"folderForExpunge"];
+  [ud synchronize];
+}
+
+- (void) expungeLastMarkedFolder
+{
+  NSUserDefaults *ud;
+  NSMutableDictionary *mailSettings;
+  NSString *expungeURL;
+  NSURL *folderURL;
+
+  ud = [[context activeUser] userSettings];
+  mailSettings = [ud objectForKey: @"Mail"];
+  if (mailSettings)
+    {
+      expungeURL = [mailSettings objectForKey: @"folderForExpunge"];
+      if (expungeURL)
+       {
+         folderURL = [NSURL URLWithString: expungeURL];
+         if (![[self imap4Connection] expungeAtURL: folderURL])
+           {
+             [mailSettings removeObjectForKey: @"folderForExpunge"];
+             [ud synchronize];
+           }
+       }
+    }
+}
+
 /* flags */
 
 - (NSException *) addFlagsToAllMessages: (id) _f
index 86eb94e8ef5d6d5ba1af26121080fc0c1e3e0bbc..e126222f3eb8fc687a34a2bfe305f09e37dc8d1c 100644 (file)
@@ -874,7 +874,9 @@ static BOOL debugSoParts       = NO;
   
   error = [[self imap4Connection] markURLDeleted: [self imap4URL]];
   if (error != nil) return error;
-  
+
+  [container markForExpunge];
+
   [self flushMailCaches];
   
   return nil;
index 203f1c220ab7743b4bde0ee9635890c1ca91194d..bea3b7242c98f3e12a0b0592d3eb3f6bc42bd555 100644 (file)
@@ -112,6 +112,7 @@ extern NSString *SOGoWeekStartFirstFullWeek;
 - (NSArray *) allIdentities;
 - (NSDictionary *) primaryIdentity;
 - (NSString *) messageForwarding;
+- (NSString *) messageCheck;
 
 /* folders */
 
index 5ea1146c648f77056530bf68f357fbb386d190cc..f3a0633ac7622ff4814c126d554c8fcaae65b6c3 100644 (file)
@@ -499,6 +499,18 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
   return messageForwarding;
 }
 
+- (NSString *) messageCheck
+{
+  NSString *messageCheck;
+
+  messageCheck
+    = [[self userDefaults] stringForKey: @"MessageCheck"];
+  if (![messageCheck length])
+    messageCheck = @"manually";
+
+  return messageCheck;
+}
+
 /* folders */
 
 // TODO: those methods should check whether the traversal stack in the context
index 7c6a855bbb48cdc6921c159c14fb01204b266915..1625142119d485148c6e1cf3bde029e8f708480f 100644 (file)
@@ -516,10 +516,13 @@ static int attachmentFlagSize = 8096;
 {
   WORequest *request;
   NSString *specificMessage, *searchCriteria, *searchValue;
+  SOGoUserFolder *co;
 
   request = [context request];
 
-  [[self clientObject] flushMailCaches];
+  co = [self clientObject];
+  [co flushMailCaches];
+  [co expungeLastMarkedFolder];
 
   specificMessage = [request formValueForKey: @"pageforuid"];
   searchCriteria = [request formValueForKey: @"search"];
@@ -532,6 +535,7 @@ static int attachmentFlagSize = 8096;
     = ((specificMessage)
        ? [self firstMessageOfPageFor: [specificMessage intValue]]
        : [[request formValueForKey:@"idx"] intValue]);
+
   return self;
 }
 
index 22c6a295cfea5431509e0d81268f870ce858a91f..8134af2c0bfd1ecaa58b68676093b07fbc21170c 100644 (file)
@@ -24,6 +24,7 @@
 #import <Foundation/NSCalendarDate.h>
 #import <Foundation/NSDictionary.h>
 #import <Foundation/NSURL.h>
+#import <Foundation/NSTimeZone.h>
 #import <Foundation/NSUserDefaults.h>
 #import <Foundation/NSValue.h>
 #import <NGObjWeb/WOCookie.h>
@@ -213,15 +214,19 @@ static NSString *defaultModule = nil;
   [response setHeader: [container baseURLInContext: context]
            forKey: @"location"];
   auth = [[self clientObject] authenticatorInContext: context];
+
+  date = [NSCalendarDate calendarDate];
+  [date setTimeZone: [NSTimeZone timeZoneWithAbbreviation: @"GMT"]];
+
   cookie = [WOCookie cookieWithName: [auth cookieNameInContext: context]
                     value: @"discard"];
   [cookie setPath: @"/"];
-  date = [NSCalendarDate calendarDate];
   [cookie setExpires: [date yesterday]];
   [response addCookie: cookie];
-  
-  [response setHeader: date forKey: @"Last-Modified"];
-  [response setHeader: @"no-store, no-cache, must-revalidate, max-age=0" forKey: @"Cache-Control"];
+
+  [response setHeader: [date rfc822DateString] forKey: @"Last-Modified"];
+  [response setHeader: @"no-store, no-cache, must-revalidate, max-age=0"
+           forKey: @"Cache-Control"];
   [response setHeader: @"post-check=0, pre-check=0" forKey: @"Cache-Control"];
   [response setHeader: @"no-cache" forKey: @"Pragma"];
 
index 64aa487e7c0ff0cf858c63e7c9e584745f07fb78..d216c0fe6bdff64e98a47086cef66ef39cddc111 100644 (file)
 "reminderTime_4800" = "2 days";
 
 /* Mailer */
+"Check for new mail:" = "Check for new mail:";
+"messagecheck_manually" = "Manually";
+"messagecheck_every_minute" = "Every minute";
+"messagecheck_every_2_minutes" = "Every 2 minutes";
+"messagecheck_every_5_minutes" = "Every 5 minutes";
+"messagecheck_every_10_minutes" = "Every 10 minutes";
+"messagecheck_every_20_minutes" = "Every 20 minutes";
+"messagecheck_every_30_minutes" = "Every 30 minutes";
+"messagecheck_once_per_hour" = "Once per hour";
+
 "Forward messages:" = "Forward messages:";
 "messageforward_inline" = "Inline";
 "messageforward_attached" = "As Attachment";
index a3e625db7f1a9b34e2e213d013662fecebf4c4f4..99d333873e5618b8f460d380275a8131c4f50b6f 100644 (file)
 "reminderTime_4800" = "2 journées";
 
 /* Mailer */
+"Check for new mail:" = "Vérifier l'arrivée de messages:";
+"messagecheck_manually" = "Manuellement";
+"messagecheck_every_minute" = "Chaque minute";
+"messagecheck_every_2_minutes" = "Toutes les 2 minutes";
+"messagecheck_every_5_minutes" = "Toutes les 5 minutes";
+"messagecheck_every_10_minutes" = "Toutes les 10 minutes";
+"messagecheck_every_20_minutes" = "Toutes les 20 minutes";
+"messagecheck_every_30_minutes" = "Toutes les 30 minutes";
+"messagecheck_once_per_hour" = "Une fois par heure";
+
 "Forward messages:" = "Transérer les messages :";
 "messageforward_inline" = "intégrés";
 "messageforward_attached" = "en pièces jointes";
index 34ac1698115b3fea16643c8f4b2a96257a2c4066..e25c85fb068837f9fe07a40ee302a64e4da7a79e 100644 (file)
 "reminderTime_4800" = "2 Tage";
 
 /* Mailer */
+"Check for new mail:" = "Check for new mail:";
+"messagecheck_manually" = "Manually";
+"messagecheck_every_minute" = "Every minute";
+"messagecheck_every_2_minutes" = "Every 2 minutes";
+"messagecheck_every_5_minutes" = "Every 5 minutes";
+"messagecheck_every_10_minutes" = "Every 10 minutes";
+"messagecheck_every_20_minutes" = "Every 20 minutes";
+"messagecheck_every_30_minutes" = "Every 30 minutes";
+"messagecheck_once_per_hour" = "Once per hour";
+
 "Forward messages:" = "Nachrichten weiterleiten:";
 "messageforward_inline" = "Eingebunden";
 "messageforward_attached" = "Als Anhang";
index 7259f60d21c00e70137e2fb4ff59732eb814b15e..0a6c33ef17938cc175468afed210ea384df4a54a 100644 (file)
@@ -421,6 +421,30 @@ static BOOL shouldDisplayPasswordChange = NO;
 }
 
 /* Mailer */
+- (NSArray *) messageCheckList
+{
+  return [NSArray arrayWithObjects: @"manually", @"every_minute",
+                 @"every_2_minutes", @"every_5_minutes", @"every_10_minutes",
+                 @"every_20_minutes", @"every_30_minutes", @"once_per_hour",
+                 nil];
+}
+
+- (NSString *) itemMessageCheckText
+{
+  return [self labelForKey:
+                [NSString stringWithFormat: @"messagecheck_%@", item]];
+}
+
+- (NSString *) userMessageCheck
+{
+  return [user messageCheck];
+}
+
+- (void) setUserMessageCheck: (NSString *) newMessageCheck
+{
+  [userDefaults setObject: newMessageCheck forKey: @"MessageCheck"];
+}
+
 - (NSArray *) messageForwardingList
 {
   return [NSArray arrayWithObjects: @"inline", @"attached", nil];
index 8a890c582cb7b256719f21d746570dade37d18de..dd0ca1af288797e61485180443903964bbbdfd4a 100644 (file)
@@ -25,8 +25,8 @@
       </ul>
       <div id="generalView" class="tab">
        <label><var:string label:value="Current Time Zone :"/>
-           <var:popup list="timeZonesList" item="item"
-             string="item" selection="userTimeZone" /></label><br/>
+         <var:popup list="timeZonesList" item="item"
+           string="item" selection="userTimeZone" /></label><br/>
        <br/>
        <div id="dateTimeFormat">
          <label><var:string label:value="Short Date Format :"/>
@@ -58,7 +58,7 @@
            /></label><br/>
        <label><var:string label:value="First week of year :"/>
          <var:popup list="firstWeekList" item="item"
-         string="itemFirstWeekText" selection="userFirstWeek"
+           string="itemFirstWeekText" selection="userFirstWeek"
            /></label><br/>
        <br/>
        <label><input class="checkBox"
            string="itemReminderTimeText" selection="userReminderTime"/></label>
       </div>
       <div id="mailOptionsView" class="tab">
+       <label><var:string label:value="Check for new mail:"/>
+         <var:popup list="messageCheckList" item="item"
+           string="itemMessageCheckText" selection="userMessageCheck"/></label><br/>
        <label><var:string label:value="Forward messages:"/>
          <var:popup list="messageForwardingList" item="item"
            string="itemMessageForwardingText" selection="userMessageForwarding"/></label><br/>
+       <!--    <label><input
+       const:name="inTheOffice" type="radio" const:value="YES"
+       var:selection="inTheOffice"/>
+       <var:string label:value="I'm currently in the office"/></label><br/>
        <label><input
-           const:name="inTheOffice" type="radio" const:value="YES"
-           var:selection="inTheOffice"/>
-         <var:string label:value="I'm currently in the office"/></label><br/>
-       <label><input
-           const:name="inTheOffice" type="radio" const:value="NO"
-           var:selection="inTheOffice"/>
-         <var:string label:value="I'm currently out of the office"/></label><br/>
+       const:name="inTheOffice" type="radio" const:value="NO"
+       var:selection="inTheOffice"/>
+       <var:string label:value="I'm currently out of the office"/></label><br/>
        <br/>
        <div id="outOfOfficeMessage">
-         <label><var:string label:value="AutoReply only once to each sender with the following text :"/><br/>
-           <textarea const:name="autoReplyText" var:value="autoReplyText"/>
-         </label>
-       </div>
+       <label><var:string label:value="AutoReply only once to each sender with the following text :"/><br/>
+       <textarea const:name="autoReplyText" var:value="autoReplyText"/>
+      </label> -->
       </div>
       <var:if condition="shouldDisplayPasswordChange">
        <div id="passwordView" class="tab">
index 22c3feb52fe6882105311da4dd31ec728384118c..fcf07c2e155e686d589d32b22dbc5a31df4c1174 100644 (file)
@@ -365,16 +365,14 @@ TABLE.mailer_fieldtable
   width: 100%; }
 
 DIV.mailer_mailcontent
-{
-  background-color: #fff;
-  position: absolute;
+{ background-color: #fff;
   padding: .5em;
+  position: absolute;
   top: 7.5em;
-  overflow: auto;
   left: 0px;
   right: 0px;
   bottom: 0px;
-}
+  overflow: auto; }
 
 TD.mailer_fieldname
 {
@@ -408,7 +406,7 @@ img.mailer_imagecontent
 }
 
 DIV.mailer_plaincontent
-{
+{ 
   position: relative;
   font-family: monospace, fixed;
   white-space: pre;
index a2c35ed5514da47ac8428bae028bfaaa4838cb0f..ddc8f027b7e424e93e82cfef694dfb2108ba1f44 100644 (file)
@@ -18,6 +18,8 @@ var pageContent;
 
 var deleteMessageRequestCount = 0;
 
+var messageCheckTimer;
+
 /* mail list */
 
 function openMessageWindow(msguid, url) {
@@ -68,6 +70,7 @@ function openAddressbook(sender) {
 function onMenuSharing(event) {
   var folderID = document.menuTarget.getAttribute("dataname");
   var type = document.menuTarget.getAttribute("datatype");
+
   if (type == "additional")
     window.alert(clabels["The user rights cannot be"
                         + " edited for this object!"]);
@@ -475,6 +478,7 @@ function messageListCallback(http) {
       var row = $("row_" + selected);
       if (row) {
        row.select();
+       lastClickedRow = row.rowIndex - $(row).up('table').down('thead').getElementsByTagName('tr').length;  
        div.scrollTop = row.rowIndex * row.getHeight(); // scroll to selected message
       }
       else
@@ -692,6 +696,7 @@ function loadMessage(idx) {
     cachedMessage['time'] = (new Date()).getTime();
     document.messageAjaxRequest = null;
     configureLinksInMessage();
+    resizeMailContent();
   }
 }
 
@@ -711,11 +716,19 @@ function configureLinksInMessage() {
     }
     else
       Event.observe(anchors[i], "click",
-                   onMessageAnchorClick);
+                   onMessageAnchorClick.bindAsEventListener(anchors[i]));
 
   var editDraftButton = $("editDraftButton");
   if (editDraftButton)
-    Event.observe(editDraftButton, "click", onMessageEditDraft);
+    Event.observe(editDraftButton, "click",
+                 onMessageEditDraft.bindAsEventListener(editDraftButton));
+}
+
+function resizeMailContent() {
+  var headerTable = document.getElementsByClassName('mailer_fieldtable')[0];
+  var contentDiv = document.getElementsByClassName('mailer_mailcontent')[0];
+  
+  contentDiv.setStyle({ 'top': (Element.getHeight(headerTable) + headerTable.offsetTop) + 'px' });
 }
 
 function onMessageContentMenu(event) {
@@ -730,7 +743,7 @@ function onEmailAddressClick(event) {
   popupMenu(event, 'addressMenu', this);
 }
 
-function onMessageAnchorClick (event) {
+function onMessageAnchorClick(event) {
   window.open(this.href);
   preventDefault(event);
 }
@@ -743,7 +756,8 @@ function messageCallback(http) {
     document.messageAjaxRequest = null;
     div.update(http.responseText);
     configureLinksInMessage();
-      
+    resizeMailContent();
+    
     if (http.callbackData) {
       var cachedMessage = new Array();
       cachedMessage['idx'] = currentMailbox + '/' + http.callbackData;
@@ -1095,9 +1109,30 @@ function initMailer(event) {
   if (!document.body.hasClassName("popup")) {
 //     initDnd();
     initMailboxTree();
+    initMessageCheckTimer();
   }
 }
 
+function initMessageCheckTimer() {
+  var messageCheck = userDefaults["MessageCheck"];
+  if (messageCheck && messageCheck != "manually") {
+    var interval;
+    if (messageCheck == "once_per_hour")
+      interval = 3600;
+    else if (messageCheck == "every_minute")
+      interval = 60;
+    else {
+      interval = parseInt(messageCheck.substr(6)) * 60;
+    }
+    messageCheckTimer = window.setInterval(onMessageCheckCallback,
+                                          interval * 1000);
+  }
+}
+
+function onMessageCheckCallback(event) {
+  refreshMailbox();
+}
+
 function initMailboxTree() {
   mailboxTree = new dTree("mailboxTree");
   mailboxTree.config.folderLinks = true;
@@ -1297,11 +1332,11 @@ function buildMailboxes(accountName, encoded) {
   return account;
 }
 
-function onMenuCreateFolder(event) {
+function onMenuCreateFolder(event) { log ("onMenuCreateFolder " + document.menuTarget);
   var name = window.prompt(labels["Name :"], "");
   if (name && name.length > 0) {
     var folderID = document.menuTarget.getAttribute("dataname");
-    var urlstr = URLForFolderID(folderID) + "/createFolder?name=" + name;
+    var urlstr = URLForFolderID(folderID) + "/createFolder?name=" + name; log ("create " + urlstr);
     triggerAjaxRequest(urlstr, folderOperationCallback);
   }
 }
@@ -1329,7 +1364,6 @@ function onMenuDeleteFolder(event) {
 function onMenuExpungeFolder(event) {
   var folderID = document.menuTarget.getAttribute("dataname");
   var urlstr = URLForFolderID(folderID) + "/expunge";
-
   triggerAjaxRequest(urlstr, folderRefreshCallback, folderID);
 }
 
index 0018554ea9e8deab3dc484e2ba52ecd69b758cc2..f82a77b847ab2a9564335448bf6056c6b00a866f 100644 (file)
@@ -1,5 +1,6 @@
 BODY
-{ background-color: #999; }
+{ background-color: #999;
+  text-align: center; }
 
 IMG#preparedAnimation
 { 
@@ -14,6 +15,7 @@ DIV#loginScreen
   margin-top: 5em;
   padding: 5px;
   border: 2px solid transparent;
+  text-align: left;
   width: 200px;
   -moz-border-top-colors: #efebe7 #fff;
   -moz-border-left-colors: #efebe7 #fff;
index 8720dd56c768cac031f28237af29a54be6fb0cdd..fd8d1e7da3779379fc3a20a5ef9b12d42675faa6 100644 (file)
@@ -297,7 +297,7 @@ function onRemoveAttachments() {
 
 function attachmentDeleteCallback(http) {
   if (http.readyState == 4) {
-    if (http.status == 204) {
+    if (isHttpStatus204(http.status)) {
       var node = http.callbackData;
       node.parentNode.removeChild(node);
     }
index 98e8eb71b922ebf0ce672c661cab464d69af4733..bfbed7db04ac34cf4d6d62f7f6a7ab37525327b6 100644 (file)
@@ -4,11 +4,4 @@ function onPrintCurrentMessage(event) {
   preventDefault(event);
 }
 
-function initMailerPopup(event) {
-  var headerTable = document.getElementsByClassName('mailer_fieldtable')[0];
-  var contentDiv = document.getElementsByClassName('mailer_mailcontent')[0];
-
-  contentDiv.setStyle({ 'top': (Element.getHeight(headerTable) + headerTable.offsetTop) + 'px' });
-}
-
-addEvent(window, 'load', initMailerPopup);
+addEvent(window, 'load', resizeMailContent);
index b33b6dee8eaee9e0348e67e561c1af4b24d0ef45..e3712550e3aebf448a7eb0fd6ef874c2519c40af 100644 (file)
@@ -34,16 +34,7 @@ IMG#progressIndicator
   margin-right: 1em; }
 
 DIV#pageContent
-{ /* position: absolute;
-  background-color: #ffa;
-  top: 3em;
-  left: 0px;
-  right: 0px;
-  bottom: 0px;
-  margin: 0px;
-  padding: 0px;
-  border: 0px;
-   */clear: both; }
+{ clear: both; }
 
 A
 { text-decoration: none;
index b3c9d070b86bac71f3ef239ffbac6b5a84405dcf..8eb94035c7931eb2ed6760cf74cc159b0518ac6d 100644 (file)
@@ -619,11 +619,11 @@ function getParentMenu(node) {
 }
 
 function onBodyClickMenuHandler(event) {
-  document.menuTarget = null;
   hideMenu(document.currentPopupMenu);
   Event.stopObserving(document.body, "click", onBodyClickMenuHandler);
 
-  preventDefault(event);
+  if (event)
+    preventDefault(event);
 }
 
 function hideMenu(menuNode) {
@@ -1167,9 +1167,12 @@ function initMenu(menuDIV, callbacks) {
                        popupSubmenu.bindAsEventListener(node));
        }
       }
-      else
+      else {
        Event.observe(node, "mouseup",
+                     onBodyClickMenuHandler);
+       Event.observe(node, "click",
                      $(callback).bindAsEventListener(node));
+      }
     }
     else
       node.addClassName("disabled");
index fe29000e8e1d854b16384d8599676a081c80272f..38dc140c07fc77f40b9da55def426e9c5e4b3b66 100644 (file)
@@ -1,3 +1,10 @@
+/* SOGoRootPage */
+DIV#loginScreen
+{ border: 2px solid #fff;
+  border-right: 2px solid #666;
+  border-bottom: 2px solid #666;
+}
+
 /* generic */
 SPAN.disabledToolbarButton
 { filter: alpha(opacity=40); }