Index: trunk/prototype/modules/mail/css/label.css
===================================================================
--- trunk/prototype/modules/mail/css/label.css	(revision 5547)
+++ trunk/prototype/modules/mail/css/label.css	(revision 5603)
@@ -4,5 +4,5 @@
 
 .label-configure-win { margin: 5px;}
-.label-configure-win .input-nome { width: 200px; outline:0; background:#FFF; }
+.label-configure-win .input-nome { width: 135px; outline:0; background:#FFF;}
 .label-configure-win .lebals-colorpicker { border: 1px solid #CCC; height: 210px; } 
 .label-configure-win .label-conf { float: left;}
Index: trunk/prototype/modules/mail/js/label.js
===================================================================
--- trunk/prototype/modules/mail/js/label.js	(revision 5586)
+++ trunk/prototype/modules/mail/js/label.js	(revision 5603)
@@ -21,5 +21,5 @@
 	var span = $(this).parent().find(".text-list");
 	$(this).parent().trigger('click').unbind('click', configureLabel).find("span.text-list")
-	.html('<input name="edit-value-list" class="edit-value-list" type="text" value="'+conteudoSpan+'">').find("input[name='edit-value-list']").keydown(function(event){
+	.html('<input name="edit-value-list" class="edit-value-list" type="text" maxlength="18" value="'+conteudoSpan+'">').find("input[name='edit-value-list']").keydown(function(event){
 		event.stopPropagation();
 		$("input.edit-value-list").keyup(function () {
@@ -28,7 +28,9 @@
 		}).keyup();
 		if(event.keyCode == 13){
+			event.preventDefault();
+			var nameLabel = $(".label-list").find(".edit-value-list").val();
 			$(span).html($(".label-list").find(".edit-value-list").val())
 			.parent().find('.edit').removeClass("hidden").parents("li").click(configureLabel).trigger("click");
-			save_editLabel();
+			save_editLabel(nameLabel);
 			
 		}else if( event.keyCode == 27){
@@ -87,71 +89,72 @@
 }		
 	
-function save_editLabel(){		
-	var qtdLi = $(".label-list-container ul").find("li").not(".empty-item").length;	
-	// salvar marcador
-	if(qtdLi > 0){
-		$(".save-label").button("disable");
-		var labelEdited = {
-			id : winElement.find(".edit-label").val(),
-			uid: User.me.id,
-			name : winElement.find('.input-nome').val(),
-			backgroundColor : winElement.find("input[name='backgroundColor']").val(),
-			fontColor : winElement.find("input[name='fontColor']").val(),
-			borderColor : winElement.find("input[name='borderColor']").val()
-		}
-		$(".label-list-container .label-list li").each(function(){
-			var regex_match_2 = $(this).attr("class").match(/label-item-([\d]+[()a-zA-Z]*)/);
+function save_editLabel(nameLabel){			
+	if(nameLabel.length >= 4){	
+		var qtdLi = $(".label-list-container ul").find("li").not(".empty-item").length;	
+		// salvar marcador
+		if(qtdLi > 0){
+			$(".save-label").button("disable");
+			var labelEdited = {
+				id : winElement.find(".edit-label").val(),
+				uid: User.me.id,
+				name : winElement.find('.input-nome').val(),
+				backgroundColor : winElement.find("input[name='backgroundColor']").val(),
+				fontColor : winElement.find("input[name='fontColor']").val(),
+				borderColor : winElement.find("input[name='borderColor']").val()
+			}
+			$(".label-list-container .label-list li").each(function(){
+				var regex_match_2 = $(this).attr("class").match(/label-item-([\d]+[()a-zA-Z]*)/);
+				
+				 if(regex_match_2 && regex_match_2[1] && regex_match_2[1] == labelEdited.id){
+				   $(this).html("<input type='hidden' name='labelItemId' class='id-item-list' value='"+labelEdited.id+"'>"+"<span class='text-list'>"+labelEdited.name+"</span><div class='button close tiny' style='float: right'></div><div class='button edit tiny' style='float: right'></div>").css({
+					"background" : labelEdited.backgroundColor,
+					"color" : labelEdited.fontColor, 
+					"border-color" : labelEdited.borderColor	
+				   });
+				 }	
+			});
 			
-			 if(regex_match_2 && regex_match_2[1] && regex_match_2[1] == labelEdited.id){
-			   $(this).html("<input type='hidden' name='labelItemId' class='id-item-list' value='"+labelEdited.id+"'>"+"<span class='text-list'>"+labelEdited.name+"</span><div class='button close tiny' style='float: right'></div><div class='button edit tiny' style='float: right'></div>").css({
-				"background" : labelEdited.backgroundColor,
-				"color" : labelEdited.fontColor, 
-				"border-color" : labelEdited.borderColor	
-			   });
-			 }	
-		});
-		
-		$("#MyMarckersList .label-list li").each(function(){
-			var regex_match_2 = $(this).attr("class").match(/label-item-([\d]+[()a-zA-Z]*)/);
-			
-			if(regex_match_2 && regex_match_2[1] && regex_match_2[1] == labelEdited.id){
-				$(this).html("<input type='hidden' name='labelItemId' class='id-item-list' value='"+labelEdited.id+"'>"+"<span>"+labelEdited.name+"</span>");
-				$(this).find(".square-color").css('background', labelEdited.backgroundColor);
-			}	
-		});
-		DataLayer.put('label', labelEdited.id, labelEdited);
-		DataLayer.commit(false, false, function(){
-			winElement.find(".insert-label").val("");
-			$.Watermark.ShowAll();
-			
-			$(".label-list-container .label-list li").find('.button').button()
-				.filter('.edit').button({icons:{primary:'ui-icon-pencil'}, text:false}).end()
-				.filter('.close').button({icons:{primary:'ui-icon-close'}, text:false});
-				
-			winElement.find('.edit').unbind("click").click(editLabel);				
-			winElement.find('.close').click(deleteLabel);
-			
-			draw_tree_labels();
-			updateMessageLabels(labelEdited.id);
-			
-			/**
-			* Atualiza menu remove o menu presente em cada mensagem listada em uma pasta 
-			* e carrega novamente para que os dados sejam atualizados
-			*/
-			$.contextMenu( 'destroy', ".table_box tbody tr");
-			loadMenu();
-		});
-	// criar marcador
-	} else {
-		var nameLabel = winElement.find(".input-nome").val();
-		if(nameLabel.length >= 2){
+			$("#MyMarckersList .label-list li").each(function(){
+				var regex_match_2 = $(this).attr("class").match(/label-item-([\d]+[()a-zA-Z]*)/);
+				
+				if(regex_match_2 && regex_match_2[1] && regex_match_2[1] == labelEdited.id){
+					$(this).html("<input type='hidden' name='labelItemId' class='id-item-list' value='"+labelEdited.id+"'>"+"<span>"+labelEdited.name+"</span>");
+					$(this).find(".square-color").css('background', labelEdited.backgroundColor);
+				}	
+			});
+			DataLayer.put('label', labelEdited.id, labelEdited);
+			DataLayer.commit(false, false, function(){
+				
+				winElement.find(".insert-label").val("");
+				$.Watermark.ShowAll();
+				
+				$(".label-list-container .label-list li").find('.button').button()
+					.filter('.edit').button({icons:{primary:'ui-icon-pencil'}, text:false}).end()
+					.filter('.close').button({icons:{primary:'ui-icon-close'}, text:false});
+					
+				winElement.find('.edit').unbind("click").click(editLabel);				
+				winElement.find('.close').click(deleteLabel);
+				
+				draw_tree_labels();
+				updateMessageLabels(labelEdited.id);
+				
+				/**
+				* Atualiza menu remove o menu presente em cada mensagem listada em uma pasta 
+				* e carrega novamente para que os dados sejam atualizados
+				*/
+				$.contextMenu( 'destroy', ".table_box tbody tr");
+				loadMenu();
+			});
+		// criar marcador
+		} else {
+			var nameLabel = winElement.find(".input-nome").val();
 			new_label(nameLabel, false);				
 			winElement.find(".insert-label").val("");
 			$.Watermark.ShowAll();				
-		} else {
-			alert("Mínimo 2 caracteres");
 		}
-	}				
-	$(".label-list-container .label-list").find(".label-item-"+labelEdited.id).trigger("click");
+		$(".label-list-container .label-list").find(".label-item-"+labelEdited.id).trigger("click");
+	} else {
+		alert("Mínimo 4 caracteres");
+	}	
 }
 
@@ -372,10 +375,10 @@
 		$.Watermark.HideAll();
 		var nameLabel = winElement.find(".insert-label").val();
-		if(nameLabel.length >= 2){
+		if(nameLabel.length >= 4){
 			new_label(nameLabel, true);
 			$.Watermark.ShowAll();
 			winElement.find(".insert-label").val("");
 			} else {
-				alert("Mínimo 2 caracteres");
+				alert("Mínimo 4 caracteres");
 			}
 		event.stopImmediatePropagation();
@@ -403,5 +406,6 @@
 	//salvar/criar marcador
 	winElement.find(".buttons .save-label").click(function(){
-		save_editLabel();
+		var nameLabel = winElement.find(".input-nome").val();
+		save_editLabel(nameLabel);
 	});	
 	//desfazer marcador
Index: trunk/prototype/modules/mail/templates/label_configure.ejs
===================================================================
--- trunk/prototype/modules/mail/templates/label_configure.ejs	(revision 5556)
+++ trunk/prototype/modules/mail/templates/label_configure.ejs	(revision 5603)
@@ -7,5 +7,5 @@
 			<fieldset class="add-attendee-search search-field ui-corner-all">
 					<span class="ui-icon ui-icon-plus add-label-button"></span>
-					<input class="insert-label" type="text" value="<%=get_lang("Add Label")%>" maxlength="15" >
+					<input class="insert-label" type="text" value="<%=get_lang("Add Label")%>" maxlength="18" >
 			</fieldset>
 		</div>
@@ -15,5 +15,5 @@
 	<fieldset>
 	<legend><%= get_lang("Basic")%></legend>
-		<%= get_lang("Label name")%>: <input type="text" class="input-nome" value="" name="marcador">
+		<%= get_lang("Label name")%>: <input type="text" class="input-nome" value="" name="marcador" maxlength="18">
 		<input type="hidden" class="edit-label" value="" name="marcador">
 	</fieldset>
Index: trunk/expressoMail1_2/setup/tables_current.inc.php
===================================================================
--- trunk/expressoMail1_2/setup/tables_current.inc.php	(revision 5547)
+++ trunk/expressoMail1_2/setup/tables_current.inc.php	(revision 5603)
@@ -77,7 +77,5 @@
 			'ix' => array(),
 			'uc' => array()
-			)
 		)
-		
 	);
 ?>
Index: trunk/expressoMail1_2/js/doiMenuData.js
===================================================================
--- trunk/expressoMail1_2/js/doiMenuData.js	(revision 5597)
+++ trunk/expressoMail1_2/js/doiMenuData.js	(revision 5603)
@@ -210,5 +210,6 @@
 			$('#td_message_labels_' + msg_number +', #td_message_labels_search_' + msg_number+':first')
 			.html('');
-			$.contextMenu( 'destroy', '#td_message_labels_' + msg_number +', #td_message_labels_search_' + msg_number+':first');
+			//$.contextMenu( 'destroy', '#td_message_labels_' + msg_number +', #td_message_labels_search_' + msg_number+':first');
+			$.contextMenu( 'destroy', '#td_message_labels_' + msg_number +', tr[role="'+msg_number+'_'+msg_folder+'"] #td_message_labels_search_' + msg_number);
 			return false;
 		}
