Index: branches/2.4/prototype/modules/mail/interceptors/Attachments.php
===================================================================
--- branches/2.4/prototype/modules/mail/interceptors/Attachments.php	(revision 6130)
+++ branches/2.4/prototype/modules/mail/interceptors/Attachments.php	(revision 6754)
@@ -47,4 +47,7 @@
 * @since      Classe disponibilizada na versÃ£o 2.4
 */
+
+use prototype\api\Config as Config;
+
 class Attachments {	
 	
Index: branches/2.4/prototype/modules/mail/interceptors/Helpers.php
===================================================================
--- branches/2.4/prototype/modules/mail/interceptors/Helpers.php	(revision 6653)
+++ branches/2.4/prototype/modules/mail/interceptors/Helpers.php	(revision 6754)
@@ -1,4 +1,6 @@
 <?php
 include_once ROOTPATH."/../expressoMail1_2/inc/class.imap_functions.inc.php";
+
+use prototype\api\Config as Config;
 
 class Helpers {    
@@ -41,5 +43,4 @@
 				$labeledsIds[] = $e['id'];
 		}
-		
 		Controller::delete( array( 'concept' => 'labeled', 'service' => 'Imap' ), false, array( 'filter' => array( 'IN', 'id', $labeledsIds )) );
 
@@ -205,7 +206,7 @@
 		
 		if(empty($params['messageId'])) 
-		    throw new Exception('#FollowupflagMessageIdError'); 
- 	        else  
- 	            $params = Controller::create($imap_uri, $params);
+		    throw new Exception('#FollowupflagMessageIdError');
+		else 
+		    $params = Controller::create($imap_uri, $params);
 
 		if (!$params)
@@ -219,8 +220,8 @@
 		 * deste interceptor.
 		 */
-
-
-
-
+		
+	   
+	    
+	    
 		if ($original['URI']['service'] == 'PostgreSQL') return $result;
 		
@@ -268,6 +269,6 @@
 	//followupflagged:PostgreSQL.after.find
 	public function doImapFind( &$uri , &$result , &$criteria , $original ){
-
-		$imap_uri = $uri;
+	    
+	  	$imap_uri = $uri;
 		$imap_uri['service'] = 'Imap';
 		$imap_criteria = $original['criteria'];
Index: branches/2.4/prototype/modules/mail/interceptors/LabelSecure.php
===================================================================
--- branches/2.4/prototype/modules/mail/interceptors/LabelSecure.php	(revision 5540)
+++ branches/2.4/prototype/modules/mail/interceptors/LabelSecure.php	(revision 6754)
@@ -1,3 +1,6 @@
 <?php
+
+use prototype\api\Config as Config;
+
 class LabelSecure {	
 
Index: branches/2.4/prototype/modules/mail/interceptors/FollowupflagSecure.php
===================================================================
--- branches/2.4/prototype/modules/mail/interceptors/FollowupflagSecure.php	(revision 5611)
+++ branches/2.4/prototype/modules/mail/interceptors/FollowupflagSecure.php	(revision 6754)
@@ -1,3 +1,6 @@
 <?php
+
+use prototype\api\Config as Config;
+
 class FollowupflagSecure {	
 	
Index: branches/2.4/prototype/modules/mail/css/followupflag.css
===================================================================
--- branches/2.4/prototype/modules/mail/css/followupflag.css	(revision 6167)
+++ branches/2.4/prototype/modules/mail/css/followupflag.css	(revision 6754)
@@ -53,5 +53,5 @@
 .followupflag-container .background-color  {margin:0; outline: 0; width: 100px; -moz-border-radius: 5px; -webkit-border-radius:5px; float: left; }
 .flag-edit { background: #00820F; width: 8px; height: 6px; float:left; margin: 4px 0 -3px 5px; }
-.flag-edited{ width: 8px; height: 6px;}
+.flag-edited{ width: 8px; height: 6px; }
 .colorpicker { float: right; margin: -15px 0 0 0; }
 
@@ -209,2 +209,89 @@
 span.removeLabeledMsg {margin:0 5px 0 5px;font-weight: bold;}
 span.removeLabeledMsg:hover {cursor: pointer;}
+
+.freeow .gray:hover .background {
+    border-color: #BBB;
+}
+.minimize-alarm {
+	background: url("../img/minimizar.png") no-repeat scroll 0 0 transparent;
+	height: 16px;
+    position: relative;
+    width: 16px;
+	float:right; 
+	margin-right:5px;
+}
+.maximize-alarm {
+	background: url("../img/maximizar.png") no-repeat scroll 0 0 transparent;
+	height: 16px;
+    position: relative;
+    width: 16px;
+	float:right; 
+	margin-right:5px;
+}
+.content-alarm ul {
+	max-height: 100px;
+	overflow: auto;
+}
+.content-alarm {
+	margin-top: 5px;
+}
+.title-alarm {
+    margin-left: 90px;
+	font-size: 16px;
+}
+.alert-options {
+	border: none;
+}
+.confirm-alarm {
+	float:right;
+}
+.freeow .gray h2 {
+	font-size: 12px;
+}
+.freeow {
+	width: 325px;
+}
+.freeow .gray .content {
+	margin: 5px;
+}
+.freeow .gray .background {
+	background-color: #fafafa;
+	border: 2px solid #BBB;
+}
+.freeow .content {
+	margin: 5px;
+}
+
+.filtersDeadline .img_title {
+	background: url("../img/email.png") no-repeat scroll 0 0 transparent;
+	height: 20px;
+    position: absolute;
+    width: 20px;
+	float:left; 
+	margin-left:40px;
+	top: 7px;
+}
+.alarmDeadline .img_title {
+	background: url("../img/flagDefault4.png") no-repeat scroll 0 0 transparent;
+	height: 10px;
+    position: absolute;
+    width: 10px;
+	float:left; 
+	margin-left:42px;
+	top: 11px;
+}
+.doneDeadline .img_title {
+	background: url("../img/flagDone.png") no-repeat scroll 0 0 transparent;
+	height: 10px;
+    position: absolute;
+    width: 10px;
+	float:left; 
+	margin-left:43px;
+	top: 11px;
+}
+.search-result-item { 
+	border: none;
+}
+.td-label-search {
+	border: none;
+}
Index: branches/2.4/prototype/modules/mail/js/foldertree.js
===================================================================
--- branches/2.4/prototype/modules/mail/js/foldertree.js	(revision 6635)
+++ branches/2.4/prototype/modules/mail/js/foldertree.js	(revision 6754)
@@ -233,6 +233,7 @@
 			// eventnsagens : SE O DROP VIER DE UMA ABA ABERTA
 			else if(folder_to_move == "border_tr"){
-				var id_msg = border_id.split("_")[0]; 
+				var id_msg = border_id.split("_")[0];
 				folder = $("#input_folder_"+border_id+"_r")[0] ? $("#input_folder_"+border_id+"_r").val() : (openTab.imapBox[border_id] ? openTab.imapBox[border_id]:get_current_folder());
+				alternate_border(border_id);
 				move_msgs2(folder, id_msg, border_id, folder_to, to_folder_title,true);
 				return refresh();
Index: branches/2.4/prototype/modules/mail/js/label.js
===================================================================
--- branches/2.4/prototype/modules/mail/js/label.js	(revision 6653)
+++ branches/2.4/prototype/modules/mail/js/label.js	(revision 6754)
@@ -127,7 +127,7 @@
 				var hasLabel = true;
 				$.each(data, function(index, value) {
-				
-				hasLabel = typeof value == 'object' ? false : value;
-
+					
+					hasLabel = typeof value == 'object' ? false : value;
+					
 				});
 					
@@ -166,6 +166,6 @@
 						
 						draw_tree_labels();
-						var msgsReference = DataLayer.get('labeled', {filter: ['=', 'labelId', ''+labelEdited.id]}, true); 
- 	                                        updateMessageLabels(msgsReference);
+						var msgsReference = DataLayer.get('labeled', {filter: ['=', 'labelId', ''+labelEdited.id]}, true);
+						updateMessageLabels(msgsReference);
 				
 						/**
@@ -207,9 +207,9 @@
 		
 	DataLayer.remove('label', id);
-	
+
 	DataLayer.commit(false, false, function(data){
 		$.contextMenu( 'destroy', ".table_box tbody tr");
 		loadMenu();
-		updateMessageLabels(msgsReference);		
+		updateMessageLabels(msgsReference);	
 	});
 	winElement.find(".label-list li:first").trigger("click");
Index: branches/2.4/prototype/modules/mail/js/followupflag.js
===================================================================
--- branches/2.4/prototype/modules/mail/js/followupflag.js	(revision 6653)
+++ branches/2.4/prototype/modules/mail/js/followupflag.js	(revision 6754)
@@ -1,15 +1,15 @@
-MsgsCallbackFollowupflag = { 
- 		 
-    '#FollowupflagMessageIdError': function(){ 
-        alert('Não foi possível sinalizar esta mensagem. \nDetalhes do erro: mensagem não contém o atributo message-id.'); 
-    }, 
-    '#FollowupflagLimitError': function(){ 
-        alert('Não foi possível sinalizar esta mensagem. \nDetalhes do erro: limite de flags atingido para esta pasta.'); 
-    }, 
-    '#FollowupflagParamsError': function(){ 
-        alert('Não foi possível sinalizar esta mensagem. \nDetalhes do erro: mensagem não contém todos os atributos necessários.'); 
-    } 
-     
-} 
+MsgsCallbackFollowupflag = {
+
+    '#FollowupflagMessageIdError': function(){
+	alert('Não foi possível sinalizar esta mensagem. \nDetalhes do erro: mensagem não contém o atributo message-id.');
+    },
+    '#FollowupflagLimitError': function(){
+	alert('Não foi possível sinalizar esta mensagem. \nDetalhes do erro: limite de flags atingido para esta pasta.');
+    },
+    '#FollowupflagParamsError': function(){
+	alert('Não foi possível sinalizar esta mensagem. \nDetalhes do erro: mensagem não contém todos os atributos necessários.');
+    }
+    
+}
 
 function updateCacheFollowupflag(msgNumber, msgFolder, op){
@@ -265,5 +265,5 @@
 					updateCacheFollowupflag(selectedMessageIds, folders, true);
 					winElement.dialog("close");
-					alarmFollowupflagged();
+					alarmFollowupflagged('followupflagAlarms');
 				});
 				winElement.find('.menu-configure-followupflag .save').button("option", "disabled", true);
@@ -342,5 +342,5 @@
 		DataLayer.commit(false, false, function(){
 			winElement.dialog("close");
-			alarmFollowupflagged();
+			alarmFollowupflagged('followupflagAlarms');
 		});
 		
@@ -485,95 +485,250 @@
 
 /**
- * constrói as duas possíveis janela de alerta, utilizando o mesmo template
+ * constrói as três possíveis janelas de alerta, utilizando o mesmo template
+ * para o parametro alert_type, espera-se vazio, followupflagAlarms ou filtersAlarms
+ * vazio: quando serão carregadas todas as modais de alarmes
+ * followupflagAlarms: quando serão carregadas as modais referentes à sinalizações
+ * filtersAlarms: quando será carregada a modal de filtros (nesse caso o parametro filter_list deve conter a lista de mensagens a ser exibida na modal)
  */
-function alarmFollowupflagged(){
-    $('.followupflag-alarm').remove();
-	var toIterate = [
-		{
-			attrDeadline: 'doneDeadline', 
-			caption: {singular:'You have one undone message today:', 
-			plural:"You have %1 undone messages today:"
-			},
-			onOk: function(event){
-				if($(event.target).parents('.doneDeadline').find('[name="stopAlert"]').is(':checked')){
-					$.cookie("fadeCompleted", (new Date).toString("dd/MM/yyyy"), { 
-						expires: 1 
-					});
-				}
-			},
-			enable: ($.cookie("fadeCompleted") != (new Date).toString("dd/MM/yyyy"))
-		},
-		{
-			attrDeadline: 'alarmDeadline',
-			caption: {
-				singular:'You have a follow up due for today:', 
-				plural:'You have %1 follow ups due for today:'
-			},
-			onOk: function(event){
-				if($(event.target).parents('.alarmDeadline').find('[name="stopAlert"]').is(':checked')){
-					$.cookie("fadeAlarm", (new Date).toString("dd/MM/yyyy"), { 
-						expires: 1 
-					});
-				}
-			},
-			enable: ($.cookie("fadeAlarm") != (new Date).toString("dd/MM/yyyy"))
-		}
-	];
+function alarmFollowupflagged(alert_type, filter_list){
+	switch(alert_type){
+		// carregar modais de sinalizadores
+		case 'followupflagAlarms':
+			$('.doneDeadline').remove();
+			$('.alarmDeadline').remove();
+			var toIterate = [
+				{
+					attrDeadline: 'doneDeadline', 
+					caption: {singular:'You have one undone message today:', 
+					plural:"You have %1 undone messages today:"
+					},
+					title: get_lang('Done'),
+					enable: ($.cookie("fadeCompleted") != (new Date).toString("dd/MM/yyyy"))
+				},
+				{
+					attrDeadline: 'alarmDeadline',
+					caption: {
+						singular:'You have a follow up due for today:', 
+						plural:'You have %1 follow ups due for today:'
+					},
+					title: get_lang('Follow ups'),
+					enable: ($.cookie("fadeAlarm") != (new Date).toString("dd/MM/yyyy"))
+				}
+			];
+			break;
+		// carregar modal de filtros
+		case 'filtersAlarms':
+			$('.filtersDeadline').remove();
+			var toIterate = [
+				{
+					attrDeadline: 'filtersDeadline',
+					caption: {
+						singular:'You have an archived message:', 
+						plural:'You have %1 messages archived:'
+					},
+					title: get_lang('Filter by sender'),
+					enable: ($.cookie("fadeFilterAlarm") != (new Date).toString("dd/MM/yyyy"))
+				}
+			];
+			break;
+		// carregar todas as modais
+		default:
+			$('.gray').remove();
+			var toIterate = [
+				{
+					attrDeadline: 'filtersDeadline',
+					caption: {
+						singular:'You have an archived message:', 
+						plural:'You have %1 messages archived:'
+					},
+					title: get_lang('Filter by sender'),
+					enable: ($.cookie("fadeFilterAlarm") != (new Date).toString("dd/MM/yyyy"))
+				},
+				{
+					attrDeadline: 'doneDeadline', 
+					caption: {singular:'You have one undone message today:', 
+					plural:"You have %1 undone messages today:"
+					},
+					title: get_lang('Done'),
+					enable: ($.cookie("fadeCompleted") != (new Date).toString("dd/MM/yyyy"))
+				},				
+				{
+					attrDeadline: 'alarmDeadline',
+					caption: {
+						singular:'You have a follow up due for today:', 
+						plural:'You have %1 follow ups due for today:'
+					},
+					title: get_lang('Follow ups'),
+					enable: ($.cookie("fadeAlarm") != (new Date).toString("dd/MM/yyyy"))
+				}
+			];
+			break;
+	}
 	var i = 0;
+	// recupera e monta os dados para serem exibidos nas modais de alarmes
 	while (it = toIterate.pop()){
 		if (!it.enable) continue;
-
-		var alarmInRange = DataLayer.get('followupflagged', {filter: ['AND', ['>', it.attrDeadline, (new Date()).set({hour:0, minute:0, second:0}).toString('yyyy-MM-dd 00:00:00')], ['<', it.attrDeadline, (new Date()).set({hour:0, minute:0, second:0}).addHours(24).toString('yyyy-MM-dd 00:00:00')]], criteria: {deepness: 1}});
+		
+		var alarmInRange = {};
+		// caso for alarme de sinalizadores
+		if(it.attrDeadline == 'doneDeadline' || it.attrDeadline == 'alarmDeadline'){
+			alarmInRange = DataLayer.get('followupflagged', {filter: ['AND', ['>', it.attrDeadline, (new Date()).set({hour:0, minute:0, second:0}).toString('yyyy-MM-dd 00:00:00')], ['<', it.attrDeadline, (new Date()).set({hour:0, minute:0, second:0}).addHours(24).toString('yyyy-MM-dd 00:00:00')]], criteria: {deepness: 1}});
+			if(alarmInRange.length > 0){
+				for(var i=0; i<alarmInRange.length; i++){
+					if(alarmInRange[i].isDone == 1){
+						 alarmInRange.splice(i,1);
+						 i--;
+					}
+				}
+			}
+			
+			if(alarmInRange.length > 0){
+				var messages_alarm = [];
+				for(var i=0; i<alarmInRange.length; i++){
+					var date = Date.parseExact(alarmInRange[i][it.attrDeadline], 'yyyy-MM-dd HH:mm:ss');
+					if(date)
+						alarmInRange[i][it.attrDeadline] = date.toString('HH:mm');
+					
+					if(alarmInRange[i]['followupflag']['id'] < 7){
+						var nameFollowupflag = get_lang(alarmInRange[i]['followupflag']['name']);
+					}else{
+						var nameFollowupflag = alarmInRange[i]['followupflag']['name'];
+					}
+					var li_alarm = alarmInRange[i][it.attrDeadline] + ' - ' + nameFollowupflag + ' - ' + truncate(alarmInRange[i]['message']['headers']['subject'], 15);
+					messages_alarm.push({
+						"msg_number" : alarmInRange[i]['messageNumber'],
+						"msg_folder" : alarmInRange[i]['folderName'],
+						"a"			 : li_alarm
+					}); 				
+				}
+			}
+		} 
+		// caso for alarme de filtros
+		else if(filter_list){
+			alarmInRange = filter_list;
+			if(alarmInRange.length > 0){
+				var messages_alarm = [];
+				for(var i=0; i<alarmInRange.length; i++){
+					var d = new Date(alarmInRange[i]['udate']*1000);
+					var dia = d.getDate();
+					if(dia < 10){
+						dia = "0" + dia;
+					}
+					var mes = (d.getMonth()) + 1;
+					if(mes < 10){
+						mes = "0" + mes;
+					}
+					var ano = d.getFullYear();
+					var dtFormatada = dia + '/' + mes + '/' + ano;
+					alarmInRange[i]['udate'] = dtFormatada;
+						
+					var li_alarm = alarmInRange[i]['udate'] + ' ' + alarmInRange[i]['smalldate'] + ' - ' + alarmInRange[i]['from'] + ' - ' + truncate(alarmInRange[i]['subject'], 15);
+					messages_alarm.push({
+						"msg_number" : alarmInRange[i]['msg_number'],
+						"msg_folder" : alarmInRange[i]['msg_folder'],
+						"a"			 : li_alarm
+					}); 				
+				}
+			}
+		}
+				
 		if(alarmInRange.length > 0){
-			for(var i=0; i<alarmInRange.length; i++){
-				if(alarmInRange[i].isDone == 1){
-				 alarmInRange.splice(i,1);
-				 i--;
-				}
-			}
-		}
-		if(alarmInRange.length > 0){
-			for(var i=0; i<alarmInRange.length; i++){
-				var date = Date.parseExact(alarmInRange[i][it.attrDeadline], 'yyyy-MM-dd HH:mm:ss');
-				if(date)
-					alarmInRange[i][it.attrDeadline] = date.toString('HH:mm');
-			}
+			// monta o subtitulo da modal
 			var caption = (alarmInRange.length == 1) ?
 				get_lang(it.caption.singular):
 				get_lang(it.caption.plural, alarmInRange.length);
-				
+			// monta o array de dados a ser passado para o template	
 			var data = {
-				alarmInRange : alarmInRange, 
+				alarmInRange : messages_alarm, 
 				caption: caption, 
-				it : it
+				type: it.attrDeadline,
+				captions: it.caption
 			};
+			// tipo de modal a ser exibida
+			var type_alarm = it.attrDeadline;
+			//função chamada ao clicar no botão Ok da modal
+			var ok_function = function(event, type, type_cookie){
+				if($(event.target).parents('.'+type).find('[name="stopAlert"]').is(':checked')){
+					$.cookie(type_cookie, (new Date).toString("dd/MM/yyyy"), { 
+						expires: 1 
+					});
+				}
+			}
+			// carrega o template dos alarmes e cria a modal utilizando o plugin freeow
 			var dialogText = DataLayer.render("../prototype/modules/mail/templates/followupflag_alarm_list.ejs", data);
+			var titulo = '<div class="header-alarm"><span class="img_title"></span><span class="title-alarm"><strong>'+it.title+'</strong></span><span name="header-icon" class="maximize-alarm"></span></div>';
+			$("#freeow").freeow(titulo, dialogText, {
+				classes: ["gray", type_alarm],
+				autoHide: false, 
+				startStyle: null,
+				onClick: function(event){
+					var type = '';
+					var type_cookie = '';
+					if($(this).hasClass('alarmDeadline')){
+						type = 'alarmDeadline';
+						type_cookie = 'fadeAlarm';
+					}else if($(this).hasClass('doneDeadline')){
+						type = 'doneDeadline';
+						type_cookie = 'fadeCompleted';
+					}else if($(this).hasClass('filtersDeadline')){
+						type = 'filtersDeadline';
+						type_cookie = 'fadeFilterAlarm';
+					}
+					if($(event.target).hasClass('stop-alert-alarm')){
+						return;
+					}
+					if($(event.target).hasClass('minimize-alarm')){
+						$('.'+type).find('.content-alarm').hide();
+						$(event.target).removeClass('minimize-alarm').addClass('maximize-alarm');
+						return;
+					}
+					if($(event.target).hasClass('maximize-alarm')){
+						$('.'+type).find('.content-alarm').show();
+						$(event.target).removeClass('maximize-alarm').addClass('minimize-alarm');
+						return;
+					}
+					if($(event.target).hasClass('confirm-alarm')){
+						ok_function(event, type, type_cookie);
+						$('.'+type).remove();
+						return;
+					}
+					return false;
+				}
+			});
+			// elementos do freeow desnecessários
+			$('.gray .background .content p').remove();
+			$('.gray .icon').remove();
+			$('.gray .close').remove();
 			
-			/**
-			 * A última dialog criada é a dialog mais ao alto
-			 */
-			var offsetHeight = $('.ZebraDialog.right-bottom:last').length ? 
-				$(window).height() - $('.ZebraDialog.right-bottom:last').position().top : 0;
-
-			/**
-			 * Se for a primeira, desloca para cima do rodapé do grid
-			 * caso contrário desloca para um pouco acima da última dialog criada
-			 */
-			offsetHeight = !offsetHeight ? 35 : offsetHeight + 20 ;			
-			var dialog = new $.Zebra_Dialog(dialogText, {
-				'buttons':  ['Ok'],
-				'modal': false,
-				'vcenter_short_message': false,
-				'position': ['right - 20', 'bottom - ' + offsetHeight.toString() ],
-				'custom_class': 'right-bottom followupflag-alarm '+it.attrDeadline
-			}).dialog;
-			$(".ZebraDialog.followupflag-alarm .ZebraDialog_Button0").click(it.onOk);
-			$(".ZebraDialog.followupflag-alarm .display-options .more").click(function(event) {
-				$(event.target).parents('.followupflag-alarm').find('.message-list').css('height', 'auto');
-			});
+			// botão ok da modal com jquery button
+			$('.content-alarm button').button();
 		}		
 	}
+	
+	// controle de qual janela de alarme estará maximizada
+	$('.gray').find('.content-alarm').hide();
+	$('.gray').find('.header-alarm [name="header-icon"]').removeClass('minimize-alarm').addClass('maximize-alarm');
+	
+	if($('.gray').length > 0){
+		if($('.gray').hasClass('filtersDeadline')){
+			$('.filtersDeadline').find('.content-alarm').show();
+			$('.filtersDeadline .header-alarm [name="header-icon"]').removeClass('maximize-alarm').addClass('minimize-alarm');
+		}else if($('.gray').hasClass('alarmDeadline')){
+			$('.alarmDeadline').find('.content-alarm').show();
+			$('.alarmDeadline .header-alarm [name="header-icon"]').removeClass('maximize-alarm').addClass('minimize-alarm');	
+		}else if($('.gray').hasClass('doneDeadline')){
+			$('.doneDeadline').find('.content-alarm').show();
+			$('.doneDeadline .header-alarm [name="header-icon"]').removeClass('maximize-alarm').addClass('minimize-alarm');	
+		}
+	}
+	
 }
+		
 $('#main_table').ready(function(){
-    alarmFollowupflagged();
+	handlerMessageFilter = function (data) {
+		alarmFollowupflagged(null, data);
+	}
+	/* Busca  nas pastas indexadas para ver se há novas mensagens com a flag $FilteredMessage */
+	cExecute ("$this.imap_functions.getFlaggedAlertMessages&folders="+fromRules, handlerMessageFilter);
 });
+
Index: branches/2.4/prototype/modules/mail/templates/emailBox.ejs
===================================================================
--- branches/2.4/prototype/modules/mail/templates/emailBox.ejs	(revision 6754)
+++ branches/2.4/prototype/modules/mail/templates/emailBox.ejs	(revision 6754)
@@ -0,0 +1,13 @@
+<div class="box <%= (!data.valid ? "invalid-email-box" : "") %> ui-corner-all" tabindex="0">
+	<span class="email-box-value" style="padding: 5px;">
+		<% 
+			var presentation = (data.name != "" ? data.name : data.email);
+			var input_value = "&quot;"+data.name+"&quot; <"+data.email+">";
+		%> 
+		<%= 
+			(presentation.length > 18 ? presentation.substring(0, 15)+"..." : presentation)
+		%> 
+	</span>
+	<input class="box-input" value="<%= input_value %>"></input>
+	<span class="box-loading">&nbsp;&nbsp;&nbsp;</span>
+</div>
Index: branches/2.4/prototype/modules/mail/templates/quickAddContact.ejs
===================================================================
--- branches/2.4/prototype/modules/mail/templates/quickAddContact.ejs	(revision 6690)
+++ branches/2.4/prototype/modules/mail/templates/quickAddContact.ejs	(revision 6754)
@@ -1,39 +1,39 @@
-<div style="width:auto;">        
-        <table> 
-                <tr> 
-                        <td> 
-                                <span><%=get_lang('Nickname')%>:</span> 
-                        </td> 
-                        <td> 
-                                <input type="text" value="<%=data.nick%>" maxlength="50" id="quickAddOne_nickName" style="width:205px;"/> 
-                        </td> 
-                </tr> 
-                 
-                <tr> 
-                        <td> 
-                                <span><%=get_lang('First Name')%>:</span> 
-                        </td> 
-                        <td> 
-                                <input type="text" value="<%=data.fname%>" maxlength="50" id="quickAddOne_firstName" style="width:205px;" class="required-field"/> 
-                        </td> 
-                </tr> 
-                 
-                <tr> 
-                        <td> 
-                                <span><%=get_lang('Last Name')%>:</span> 
-                        </td> 
-                        <td> 
-                                <input type="text" value="<%=data.lname%>" maxlength="50" id="quickAddOne_lastName" style="width:205px;"/> 
-                        </td> 
-                </tr> 
-                 
-                <tr> 
-                        <td> 
-                                <span><%=get_lang('Email')%>:</span> 
-                        </td> 
-                        <td> 
-                                <input type="text" value="<%=data.email%>" maxlength="50" id="quickAddOne_email" style="width:205px;" class="required-field"/> 
-                        </td> 
-                </tr> 
-        </table> 
+<div style="width:auto;">	
+	<table>
+		<tr>
+			<td>
+				<span><%=get_lang('Nickname')%>:</span>
+			</td>
+			<td>
+				<input type="text" value="<%=data.nick%>" maxlength="50" id="quickAddOne_nickName" style="width:205px;"/>
+			</td>
+		</tr>
+		
+		<tr>
+			<td>
+				<span><%=get_lang('First Name')%>:</span>
+			</td>
+			<td>
+				<input type="text" value="<%=data.fname%>" maxlength="50" id="quickAddOne_firstName" style="width:205px;" class="required-field"/>
+			</td>
+		</tr>
+		
+		<tr>
+			<td>
+				<span><%=get_lang('Last Name')%>:</span>
+			</td>
+			<td>
+				<input type="text" value="<%=data.lname%>" maxlength="50" id="quickAddOne_lastName" style="width:205px;"/>
+			</td>
+		</tr>
+		
+		<tr>
+			<td>
+				<span><%=get_lang('Email')%>:</span>
+			</td>
+			<td>
+				<input type="text" value="<%=data.email%>" maxlength="50" id="quickAddOne_email" style="width:205px;" class="required-field"/>
+			</td>
+		</tr>
+	</table>
 </div>
Index: branches/2.4/prototype/modules/mail/templates/followupflag_alarm_list.ejs
===================================================================
--- branches/2.4/prototype/modules/mail/templates/followupflag_alarm_list.ejs	(revision 5738)
+++ branches/2.4/prototype/modules/mail/templates/followupflag_alarm_list.ejs	(revision 6754)
@@ -1,25 +1,26 @@
-<p class="title"><strong><%= data.caption %> </strong></p>
-
-<ul class="message-list">
-<%
-for(var i=0; i<data.alarmInRange.length; i++){
-	var openMessageScript = "cExecute('$this.imap_functions.get_info_msg&msg_number="+data.alarmInRange[i].messageNumber+"&msg_folder="+data.alarmInRange[i].folderName+"&alarm=true', show_msg);";
-	if(data.alarmInRange[i].followupflag.id < 7){
-		var nameFollowupflag = get_lang(data.alarmInRange[i].followupflag.name);
-	}else{
-		var nameFollowupflag = data.alarmInRange[i].followupflag.name;
+<div class="content-alarm">
+	<span class="subtitle-alarm">
+		<strong><%=data.caption %></strong>
+	</span>
+	<ul class="message-list">
+	<%
+	for(var i=0; i<data.alarmInRange.length; i++){
+		if(data.type == 'filtersDeadline')
+			var openMessageScript = "$(this).parent().remove(); var msgs_count = $('.filtersDeadline').find('.message-item').length; if(msgs_count == 0){ $('.filtersDeadline').remove(); } $('.subtitle-alarm').find('strong').html((msgs_count == 1)?get_lang('"+data.captions.singular+"'):get_lang('"+data.captions.plural+"', msgs_count)); cExecute('$this.imap_functions.open_flagged_msg&msg_number="+data.alarmInRange[i].msg_number+"&msg_folder="+data.alarmInRange[i].msg_folder+"&alarm=true', show_msg);";
+		else	
+			var openMessageScript = "cExecute('$this.imap_functions.get_info_msg&msg_number="+data.alarmInRange[i].msg_number+"&msg_folder="+data.alarmInRange[i].msg_folder+"&alarm=true', show_msg);";
+	%>
+		<li class="message-item">
+			<a onclick="<%=openMessageScript%>">
+				<%= data.alarmInRange[i].a %>
+			</a>
+		</li>
+	<%
 	}
-%>
-	<li class="message-item">
-		<a onclick="<%=openMessageScript%>">
-			<%= (it.attrDeadline == 'alarmDeadline') ? data.alarmInRange[i].alarmDeadline : data.alarmInRange[i].doneDeadline %> - <%= nameFollowupflag %> - <%= data.alarmInRange[i].message.headers.subject %>
-		</a>
-	</li>
-<%
-}
-%>
-</ul> 
-
-<fieldset class="alert-options">
-	<input type="checkbox" name="stopAlert"> <label><%= get_lang("Don't show this window anymore today.")%></label>
-</fieldset>
+	%>
+	</ul> 
+	<fieldset class="alert-options">
+		<input type="checkbox" class="stop-alert-alarm" name="stopAlert"> <label><%= get_lang("Don't show this window anymore today.")%></label>
+		<button class="confirm-alarm">Ok</button>
+	</fieldset>
+</div>
Index: branches/2.4/prototype/modules/mail/templates/label_list.ejs
===================================================================
--- branches/2.4/prototype/modules/mail/templates/label_list.ejs	(revision 6723)
+++ branches/2.4/prototype/modules/mail/templates/label_list.ejs	(revision 6754)
@@ -14,6 +14,6 @@
 						background: <%= (data.labels[i].backgroundColor) ? data.labels[i].backgroundColor : '#ffffff' %>; float:right;"></div>
 
-				<div class="button close tiny" style="float: right" title="<%= get_lang("Delete")%>"></div> 
- 	            <div class="button edit tiny" style="float: right" title="<%= get_lang("Edit")%>"></div> 
+				<div class="button close tiny" style="float: right" title="<%= get_lang("Delete")%>"></div>
+				<div class="button edit tiny" style="float: right" title="<%= get_lang("Edit")%>"></div>
 			</li>
 		<%}%>
Index: branches/2.4/prototype/modules/mail/templates/listContacts.ejs
===================================================================
--- branches/2.4/prototype/modules/mail/templates/listContacts.ejs	(revision 6754)
+++ branches/2.4/prototype/modules/mail/templates/listContacts.ejs	(revision 6754)
@@ -0,0 +1,46 @@
+<% 
+	var decodeType = {
+		'/dynamiccontacts': {
+			css: 'recent', 
+			img: 'recent', 
+			text: 'Contato dinâmico'
+		},
+		'/contacts':{
+			css: 'personal',
+			img: 'personal',
+			text: 'Contato pessoal',
+		},
+		'/sharedcontact':{
+			css: 'personal',
+			img: 'sharedcontact',
+			text: 'Contato compartilhado',
+		},
+		'/groups':{
+			css: 'group',
+			img: 'group',
+			text: 'Grupo pessoal',
+		},
+		'/sharedgroup':{
+			css: 'group',
+			img: 'sharedgroup',
+			text: 'Grupo compartilhado',
+		}
+	} 
+%>
+<%if (data.type == 'linha'){%>
+<li class="dynamic-separator">
+	<div class="line-separator">
+		&nbsp;
+	</div>
+<%}else{%>
+<li class="dynamic-<%=decodeType[data.type].css%>">
+	<a style="width:<%= (data.type == '/dynamiccontacts' ? '91%' : '97.5%')%>; display: inline-block;">
+		<img style="position:relative; top:2px; "src="../prototype/modules/mail/img/<%=decodeType[data.type].img%>.png" title="<%=decodeType[data.type].text%>"/>
+		<%= ($.trim(data.name) != "" ? (data.name.length > 20? data.name.substring(0,17)+"..." : data.name)+ " - " : "") %><%= data.mail %>
+		<% if(data.type == '/dynamiccontacts'){ %>
+			<div class="dynamic-stars" style="display: inline-block;float: right;"/>
+		<% } %>
+	</a>
+	<span style="width:16px; height:16px; top:5px; <%=data.type == '/dynamiccontacts' ?  '': 'display:none'%>">Excluir contato recente</span>	
+<%}%>
+</li>
Index: branches/2.4/prototype/modules/mail/templates/label_listitem.ejs
===================================================================
--- branches/2.4/prototype/modules/mail/templates/label_listitem.ejs	(revision 6723)
+++ branches/2.4/prototype/modules/mail/templates/label_listitem.ejs	(revision 6754)
@@ -5,6 +5,6 @@
 		<input type="hidden" value="<%= data.id%>" name="labelItemId" class="id-item-list" />
 		<span class="text-list"><%= data.name %></span>
-		<div class="button close tiny" style="float: right" title="<%= get_lang("Delete")%>"></div> 
- 	    <div class="button edit tiny" style="float: right" title="<%= get_lang("Edit")%>"></div>
+		<div class="button close tiny" style="float: right" title="<%= get_lang("Delete")%>"></div>
+		<div class="button edit tiny" style="float: right" title="<%= get_lang("Edit")%>"></div>
 					
 	</li>
Index: branches/2.4/prototype/modules/mail/templates/new_message.ejs
===================================================================
--- branches/2.4/prototype/modules/mail/templates/new_message.ejs	(revision 6220)
+++ branches/2.4/prototype/modules/mail/templates/new_message.ejs	(revision 6754)
@@ -61,5 +61,8 @@
 				</td>
 				<td class="value" style="width: 100%;">
-					<textarea class="new-message-input to" name="input_to" style="width:99%; resize: none;"></textarea>
+					<div class="email-area ui-corner-all">
+						<input class="new-message-input to email-text" name="input_aux_to" type="text" value="" autocomplete="off"/>	
+					</div>
+					<textarea class="new-message-input to" name="input_to" style="width:99%; resize: none;display : none;"></textarea>
 				</td>
 			</tr>
@@ -71,5 +74,8 @@
 				</td>
 				<td class="value">
-					<textarea class="new-message-input cc" name="input_cc" style="width:99%; resize: none;"></textarea>
+					<div class="email-area ui-corner-all">
+						<input class="new-message-input cc email-text" name="input_aux_cc" type="text" value="" autocomplete="off"/>	
+					</div>
+					<textarea class="new-message-input cc" name="input_cc" style="width:99%; resize: none;display : none;"></textarea>
 				</td>
 			</tr>
@@ -81,5 +87,8 @@
 				</td>
 				<td class="value">
-					<textarea class="new-message-input cco" name="input_cco" style="width:99%; resize: none;"></textarea>
+					<div class="email-area ui-corner-all">
+						<input class="new-message-input cco email-text" name="input_aux_cco" type="text" value="" autocomplete="off"/>	
+					</div>
+					<textarea class="new-message-input cco" name="input_cco" style="width:99%; resize: none;display : none;"></textarea>
 				</td>
 			</tr>
@@ -89,5 +98,5 @@
 				</td>
 				<td class="value">
-					<input name="input_subject" class="new-message-input subject" style="width:99.2%;"></input>
+					<input name="input_subject" class="new-message-input subject" style="width:99.2%; border-radius: 5px;"></input>
 				</td>
 			</tr>
