Changeset 5892
- Timestamp:
- 04/09/12 10:11:11 (12 years ago)
- Location:
- trunk/prototype
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/config/label.ini
r5881 r5892 7 7 [before.delete] 8 8 clearAllLabeledsOfLabel = modules/mail/interceptors/Helpers.php 9 10 [before.update] 11 verifyNameLabel = modules/mail/interceptors/Helpers.php 9 12 10 13 [before.create] -
trunk/prototype/modules/mail/js/label.js
r5890 r5892 30 30 event.preventDefault(); 31 31 var nameLabel = $(".label-list").find(".edit-value-list").val(); 32 $(span).html($(".label-list").find(".edit-value-list").val()) 33 .parent().find('.edit').css("display","").parents("li").click(configureLabel).trigger("click"); 32 $(span).parent().find('.edit').css("display",""); 34 33 save_editLabel(nameLabel, data.applyToSelectedMessages); 35 34 … … 113 112 borderColor : winElement.find("input[name='borderColor']").val() 114 113 } 115 $(".label-list-container .label-list li").each(function(){ 116 var regex_match_2 = $(this).attr("class").match(/label-item-([\d]+[()a-zA-Z]*)/); 117 118 if(regex_match_2 && regex_match_2[1] && regex_match_2[1] == labelEdited.id){ 119 $(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({ 120 "background" : labelEdited.backgroundColor, 121 "color" : labelEdited.fontColor, 122 "border-color" : labelEdited.borderColor 123 }); 124 } 125 }); 126 127 $("#MyMarckersList .label-list li").each(function(){ 128 var regex_match_2 = $(this).attr("class").match(/label-item-([\d]+[()a-zA-Z]*)/); 129 130 if(regex_match_2 && regex_match_2[1] && regex_match_2[1] == labelEdited.id){ 131 $(this).html("<input type='hidden' name='labelItemId' class='id-item-list' value='"+labelEdited.id+"'>"+"<span>"+labelEdited.name+"</span>"); 132 $(this).find(".square-color").css('background', labelEdited.backgroundColor); 133 } 134 }); 114 135 115 DataLayer.put('label', labelEdited.id, labelEdited); 136 116 DataLayer.commit(false, false, function(data){ … … 141 121 } 142 122 if(!hasLabel){ 123 $(".label-list-container .label-list li").each(function(){ 124 var regex_match_2 = $(this).attr("class").match(/label-item-([\d]+[()a-zA-Z]*)/); 125 126 if(regex_match_2 && regex_match_2[1] && regex_match_2[1] == labelEdited.id){ 127 $(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({ 128 "background" : labelEdited.backgroundColor, 129 "color" : labelEdited.fontColor, 130 "border-color" : labelEdited.borderColor 131 }); 132 $(this).trigger('click'); 133 } 134 }); 135 136 $("#MyMarckersList .label-list li").each(function(){ 137 var regex_match_2 = $(this).attr("class").match(/label-item-([\d]+[()a-zA-Z]*)/); 138 139 if(regex_match_2 && regex_match_2[1] && regex_match_2[1] == labelEdited.id){ 140 $(this).html("<input type='hidden' name='labelItemId' class='id-item-list' value='"+labelEdited.id+"'>"+"<span>"+labelEdited.name+"</span>"); 141 $(this).find(".square-color").css('background', labelEdited.backgroundColor); 142 } 143 }); 144 143 145 winElement.find(".insert-label").val(""); 144 146 $.Watermark.ShowAll(); … … 153 155 draw_tree_labels(); 154 156 updateMessageLabels(labelEdited.id); 155 157 156 158 /** 157 159 * Atualiza menu remove o menu presente em cada mensagem listada em uma pasta … … 163 165 $(".add-label-button").empty() 164 166 .addClass("ui-icon ui-icon-plus"); 167 winElement.find('.input-nome').val("").focus; 165 168 alert('Problema ao salvar marcador.'); 166 169 } … … 170 173 var nameLabel = winElement.find(".input-nome").val(); 171 174 new_label(nameLabel, false, apply); 172 winElement.find(".insert-label").val("");173 175 $.Watermark.ShowAll(); 174 176 $(".save-label").button("disable");
Note: See TracChangeset
for help on using the changeset viewer.