diff --git a/mail/inc/class.mail_bo.inc.php b/mail/inc/class.mail_bo.inc.php index c618340617..a41d6ea7ac 100644 --- a/mail/inc/class.mail_bo.inc.php +++ b/mail/inc/class.mail_bo.inc.php @@ -2879,6 +2879,7 @@ class mail_bo } if (PEAR::isError($ret)) { + //error_log(__METHOD__.__LINE__.$ret->message); if (stripos($ret->message,'Too long argument')) { $c = count($_messageUID); @@ -2892,10 +2893,12 @@ class mail_bo $cachemodified = false; foreach ((array)$_messageUID as $k => $_uid) { - if (isset($summary[$this->icServer->ImapServerId][(!empty($currentFolder)?$currentFolder: $this->sessionData['mailbox'])][$_uid])) + //error_log(__METHOD__.__LINE__.' try to unset summarycache for:'.$_uid.' in '.(!empty($_folder)?$_folder: $this->sessionData['mailbox'])); + if (isset($summary[$this->icServer->ImapServerId][(!empty($_folder)?$_folder: $this->sessionData['mailbox'])][$_uid])) { + //error_log(__METHOD__.__LINE__.' unset summarycache for:'.$_uid.' in '.(!empty($_folder)?$_folder: $this->sessionData['mailbox'])); $cachemodified = true; - unset($summary[$this->icServer->ImapServerId][(!empty($currentFolder)?$currentFolder: $this->sessionData['mailbox'])][$_uid]); + unset($summary[$this->icServer->ImapServerId][(!empty($_folder)?$_folder: $this->sessionData['mailbox'])][$_uid]); } } if ($cachemodified) @@ -2903,7 +2906,7 @@ class mail_bo egw_cache::setCache(egw_cache::INSTANCE,'email','summaryCache'.trim($GLOBALS['egw_info']['user']['account_id']),$summary,$expiration=60*60*1); } - $this->sessionData['folderStatus'][$this->profileID][$this->sessionData['mailbox']]['uidValidity'] = 0; + $this->sessionData['folderStatus'][$this->profileID][(!empty($_folder)?$_folder: $this->sessionData['mailbox'])]['uidValidity'] = 0; $this->saveSessionData(); //error_log(__METHOD__.__LINE__.'->' .$_flag." ".array2string($_messageUID).",".($_folder?$_folder:$this->sessionData['mailbox'])); return true; // as we do not catch/examine setFlags returnValue diff --git a/mail/inc/class.mail_compose.inc.php b/mail/inc/class.mail_compose.inc.php index 425be026be..c27c24099c 100644 --- a/mail/inc/class.mail_compose.inc.php +++ b/mail/inc/class.mail_compose.inc.php @@ -377,6 +377,21 @@ $CAtFStart = array2string($_content); } $insertSigOnTop = false; $content = (is_array($_content)?$_content:array()); + // user might have switched desired mimetype, so we should convert + if ($content['is_html'] && $content['mimeType']=='plain') + { + $suppressSigOnTop = true; + $content['body'] = $content['mail_htmltext']; + $content['is_html'] = false; + $content['is_plain'] = true; + } + if ($content['is_plain'] && $content['mimeType']=='html') + { + $suppressSigOnTop = true; + $content['body'] = $content['mail_plaintext']; + $content['is_html'] = true; + $content['is_plain'] = false; + } $content['body'] = ($content['body'] ? $content['body'] : $content['mail_'.($content['mimeType'] == 'html'?'html':'plain').'text']); $alwaysAttachVCardAtCompose = false; // we use this to eliminate double attachments, if users VCard is already present/attached if ( isset($GLOBALS['egw_info']['apps']['stylite']) && (isset($this->preferencesArray['attachVCardAtCompose']) && @@ -923,7 +938,7 @@ $CAtFStart = array2string($_content); } else { - $content['body'] = ($font_span?$font_span:' ').$content['body']; + $content['body'] = ($font_span?$font_span:/*($content['mimeType'] == 'html'?' ':'')*/'').$content['body']; } //error_log(__METHOD__.__LINE__.$content['body']); @@ -1053,6 +1068,7 @@ if (is_array($content['attachments']))error_log(__METHOD__.__LINE__.' Attachment $preserv['is_html'] = $content['is_html']; $preserv['is_plain'] = $content['is_plain']; if (isset($content['mimeType'])) $preserv['mimeType'] = $content['mimeType']; + $sel_options['mimeType'] = array("plain"=>"plain","html"=>"html"); $etpl = new etemplate_new('mail.compose'); $etpl->exec('mail.mail_compose.compose',$content,$sel_options,$readonlys,$preserv,2); diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 9aef7187dc..6d73aec9ab 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -233,8 +233,11 @@ class mail_ui $content[self::$nm_index]['quota'] = $sel_options[self::$nm_index]['quota'] = $quotainfo['text']; $content[self::$nm_index]['quotainpercent'] = $sel_options[self::$nm_index]['quotainpercent'] = (string)$quotainfo['percent']; $content[self::$nm_index]['quotaclass'] = $sel_options[self::$nm_index]['quotaclass'] = $quotainfo['class']; + $content[self::$nm_index]['quotanotsupported'] = $sel_options[self::$nm_index]['quotanotsupported'] = ""; } else { $content[self::$nm_index]['quota'] = $sel_options[self::$nm_index]['quota'] = lang("Quota not provided by server"); + $content[self::$nm_index]['quotaclass'] = $sel_options[self::$nm_index]['quotaclass'] = "mail-index_quotaDisplayNone"; + $content[self::$nm_index]['quotanotsupported'] = $sel_options[self::$nm_index]['quotanotsupported'] = "mail-index_quotaDisplayNone"; } $sel_options[self::$nm_index]['foldertree'] = $this->getFolderTree(false); @@ -3342,7 +3345,7 @@ blockquote[type=cite] { */ function ajax_flagMessages($_flag, $_messageList) { - if(mail_bo::$debug) error_log(__METHOD__."->".$_flag.':'.print_r($_messageList,true)); + if(mail_bo::$debug) error_log(__METHOD__."->".$_flag.':'.array2string($_messageList)); if ($_messageList=='all' || !empty($_messageList['msg'])) { if ($_messageList=='all') diff --git a/mail/js/app.js b/mail/js/app.js index ae4e7e4f6c..98e1b60b7f 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -829,8 +829,16 @@ app.mail = AppJS.extend( mail_flag: function(_action, _elems) { //alert(_action.id+' - '+_elems[0].id); + //console.log(_action, _elems); var msg = this.mail_getFormData(_elems); - // + if (_action.id.substring(0,2)=='un') { + this.mail_removeRowClass(_elems,_action.id.substring(2)); + } + else + { + this.mail_removeRowClass(_elems,'un'+_action.id); + } + this.mail_setRowClass(_elems,_action.id); this.mail_flagMessages(_action.id,msg); }, @@ -842,6 +850,7 @@ app.mail = AppJS.extend( */ mail_flagMessages: function(_flag, _elems) { + //console.log(_flag, _elems); app.mail.app_refresh(egw.lang('flag messages'), 'mail'); egw.json('mail.mail_ui.ajax_flagMessages',[_flag, _elems]) .sendRequest(); diff --git a/mail/templates/default/app.css b/mail/templates/default/app.css index 99987f20bb..c49afb76f9 100644 --- a/mail/templates/default/app.css +++ b/mail/templates/default/app.css @@ -293,6 +293,9 @@ pre { width:200px !important; z-index:99; } +.mail-index_quotaDisplayNone { + display: none !important; +} .mail-index_QuotaGreen, .mail-index_QuotaYellow, .mail-index_QuotaRed { height:12px !important; width:100px !important; diff --git a/mail/templates/default/compose.xet b/mail/templates/default/compose.xet index 00c3f14b16..f0bfe5aeac 100644 --- a/mail/templates/default/compose.xet +++ b/mail/templates/default/compose.xet @@ -56,6 +56,10 @@ + + + + diff --git a/mail/templates/default/index.xet b/mail/templates/default/index.xet index 959aa76829..a5d8f4aa27 100644 --- a/mail/templates/default/index.xet +++ b/mail/templates/default/index.xet @@ -42,7 +42,7 @@ - +