Changeset 5547 for trunk/prototype
- Timestamp:
- 02/24/12 15:09:26 (12 years ago)
- Location:
- trunk/prototype/modules/mail
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/modules/mail/css/label.css
r5537 r5547 95 95 } 96 96 #MyMarckersList.list-label .status-list-labels{display:inline-block; position: absolute;} 97 #MyMarckersList.list-label ul {height: 60%; margin: 5px 0 0 6px; padding:0; list-style:none; }97 #MyMarckersList.list-label ul {height: auto; margin: 5px 0 0 6px; padding:0; list-style:none; } 98 98 #MyMarckersList.list-label.acc-list ul li{ border-radius:3px; padding:2px 2px 3px 2px;} 99 99 #MyMarckersList.list-label li{ background: #FFF; margin:2px 2px 0 12px; border:1px solid #CCC; width: 150px; height:13px; } -
trunk/prototype/modules/mail/js/followupflag.js
r5533 r5547 279 279 var messageNumber = selectedMessageIds[i]; 280 280 //var followupflag = DataLayer.get('followupflag', followupflagId.toString()), 281 var followupflagged = { 281 var idFollowupflagged = winElement.find('.id-followup').val(); 282 var followupflagged = DataLayer.merge({ 282 283 uid : User.me.id, 283 284 followupflagId : followupflagId, … … 288 289 isDone: isDone, 289 290 backgroundColor : backgroundColor 290 } 291 }, !!idFollowupflagged ? {id: idFollowupflagged} : {}); 291 292 292 293 if (alarmDate = winElement.find('[name="alarmDate"]').datepicker("getDate")) { … … 304 305 } 305 306 307 var flagged = $('#td_message_followup_' + messageNumber + ', ' + '#td_message_followup_search_' + messageNumber).find(".flag-edited"); 306 308 if(isDone){ 307 $('#td_message_followup_' + messageNumber + ', ' + 308 '#td_message_followup_search_' + messageNumber).find(".flag-edited") 309 .find("img").attr("src", "../prototype/modules/mail/img/flagChecked.png") 310 .css("margin-left","-3px"); 309 flagged.find("img").attr("src", "../prototype/modules/mail/img/flagChecked.png").css("margin-left","-3px"); 310 }else{ 311 flagged.find("img").attr("src", "../prototype/modules/mail/img/flagEditor.png").css("margin-left","0"); 311 312 } 312 313 … … 316 317 DataLayer.put('followupflagged', followupflagged); 317 318 } 318 DataLayer.commit(); 319 DataLayer.commit(false, false, function(data){ 320 followupflags = DataLayer.get('followupflagged',{criteria:{order: 'id'}}, true); 321 var id = followupflags[followupflags.length - 1].id; 322 winElement.find('.id-followup').val(id); 323 }); 319 324 320 325 //onceOpenedHeadersMessages[current_folder][followupflagged.messageNumber]['followupflagged']['followupflag'] = {}; … … 335 340 var messageNumber = selectedMessageIds[i]; 336 341 var flag_id = onceOpenedHeadersMessages[current_folder][messageNumber]['followupflagged'].id; 342 var flagged = $('#td_message_followup_' + messageNumber + ', ' + '#td_message_followup_search_' + messageNumber).find(".flag-edited"); 337 343 DataLayer.remove('followupflagged', flag_id); 338 $('#td_message_followup_' + messageNumber + ', ' + 339 '#td_message_followup_search_' + messageNumber).find(".flag-edited").css("background", '#CCC'); 340 $('#td_message_followup_' + messageNumber + ', ' + 341 '#td_message_followup_search_' + messageNumber).find(".flag-edited") 342 .find("img").attr("src", "../prototype/modules/mail/img/flagEditor.png").css("margin-left","0");; 344 flagged.css("background", '#cccccc'); 345 flagged.find("img").attr("src", "../prototype/modules/mail/img/flagEditor.png").css("margin-left","0"); 343 346 } 344 347 DataLayer.commit(); -
trunk/prototype/modules/mail/js/label.js
r5537 r5547 1 function configureLabel(event, ui){ 2 var idmarkernow = $(this).find('[name="labelItemId"]').val(); 3 winElement.find('.edit-label').val(idmarkernow); 4 winElement.find('.input-nome').val($(this).find("span").text()); 5 6 var colorpicker = winElement.find('.lebals-colorpicker'); 7 colorpicker.find('input[name="backgroundColor"]').val(rgb2hex($(this).css("backgroundColor"))) 8 .css("background-color", $(this).css("backgroundColor")).focus().end() 9 .find('input[name="fontColor"]').val(rgb2hex($(this).css("color"))).css("background-color", $(this).css("color")).focus().end() 10 .find('input[name="borderColor"]').val(rgb2hex($(this).css("border-left-color"))).css("background-color", $(this).css("border-left-color")).focus().end() 11 .find('.preview-label-outer').css({ 12 'background-color':$(this).css("backgroundColor"), 13 'color':$(this).css("color"), 14 'border-color':$(this).css("border-left-color") 15 }) 16 winElement.find(".preview-label-inner").text($(this).text()); 17 } 1 18 function editLabel(){ 2 19 var conteudoSpan = $(this).parent().find(".text-list").text(); … … 43 60 ("0" + parseInt(rgb[3],10).toString(16)).slice(-2); 44 61 } 45 function configureLabel(event, ui){ 46 var idmarkernow = $(this).find('[name="labelItemId"]').val(); 47 winElement.find('.edit-label').val(idmarkernow); 48 winElement.find('.input-nome').val($(this).find("span").text()); 49 50 var colorpicker = winElement.find('.lebals-colorpicker'); 51 colorpicker.find('input[name="backgroundColor"]').val(rgb2hex($(this).css("backgroundColor"))) 52 .css("background-color", $(this).css("backgroundColor")).focus().end() 53 .find('input[name="fontColor"]').val(rgb2hex($(this).css("color"))).css("background-color", $(this).css("color")).focus().end() 54 .find('input[name="borderColor"]').val(rgb2hex($(this).css("border-left-color"))).css("background-color", $(this).css("border-left-color")).focus().end() 55 .find('.preview-label-outer').css({ 56 'background-color':$(this).css("backgroundColor"), 57 'color':$(this).css("color"), 58 'border-color':$(this).css("border-left-color") 59 }) 60 winElement.find(".preview-label-inner").text($(this).text()); 61 } 62 62 63 function confirmDelete(id){ 63 64 $.Zebra_Dialog('<strong>Deseja excluir esse marcador?</strong>', { … … 112 113 } 113 114 } 114 function new_label(nameLabel ){115 function new_label(nameLabel, isNew){ 115 116 var labelCreated = { 116 117 uid: User.me.id, 117 118 name : nameLabel, 118 backgroundColor : winElement.find("input[name='backgroundColor']").val(),119 fontColor : winElement.find("input[name='fontColor']").val(),120 borderColor : winElement.find("input[name='borderColor']").val()119 backgroundColor : !!isNew ? '#ebebeb' : winElement.find("input[name='backgroundColor']").val(), 120 fontColor : !!isNew ? '#000000' : winElement.find("input[name='fontColor']").val(), 121 borderColor :!!isNew ? '#000000' : winElement.find("input[name='borderColor']").val() 121 122 } 122 123 DataLayer.put('label', labelCreated); … … 132 133 name : labels[labels.length- 1].name, 133 134 uid: User.me.id, 134 bgColor : winElement.find("input[name='backgroundColor']").val(),135 fontColor : winElement.find("input[name='fontColor']").val(),136 borderColor : winElement.find("input[name='borderColor']").val()135 bgColor : !!isNew ? '#ebebeb' : winElement.find("input[name='backgroundColor']").val(), 136 fontColor : !!isNew ? '#000000' : winElement.find("input[name='fontColor']").val(), 137 borderColor : !!isNew ? '#000000' : winElement.find("input[name='borderColor']").val() 137 138 }; 138 139 … … 197 198 198 199 winElement = data.window; 199 200 /* var configureLabel = function(event, ui){ 201 var idmarkernow = $(this).find('[name="labelItemId"]').val(); 202 winElement.find('.edit-label').val(idmarkernow); 203 winElement.find('.input-nome').val($(this).find("span").text()); 204 205 var colorpicker = winElement.find('.lebals-colorpicker'); 206 colorpicker.find('input[name="backgroundColor"]').val(rgb2hex($(this).css("backgroundColor"))) 207 .css("background-color", $(this).css("backgroundColor")).focus().end() 208 .find('input[name="fontColor"]').val(rgb2hex($(this).css("color"))).css("background-color", $(this).css("color")).focus().end() 209 .find('input[name="borderColor"]').val(rgb2hex($(this).css("border-left-color"))).css("background-color", $(this).css("border-left-color")).focus().end() 210 .find('.preview-label-outer').css({ 211 'background-color':$(this).css("backgroundColor"), 212 'color':$(this).css("color"), 213 'border-color':$(this).css("border-left-color") 214 }) 215 winElement.find(".preview-label-inner").text($(this).text()); 216 } */ 200 217 201 //TODO Mudar quando API abstrair atualizações no cache 218 202 DataLayer.remove('label',false); … … 320 304 var nameLabel = winElement.find(".insert-label").val(); 321 305 if(nameLabel.length >= 2){ 322 new_label(nameLabel );306 new_label(nameLabel, true); 323 307 $.Watermark.ShowAll(); 324 308 winElement.find(".insert-label").val(""); … … 421 405 var nameLabel = winElement.find(".input-nome").val(); 422 406 if(nameLabel.length >= 2){ 423 new_label(nameLabel );407 new_label(nameLabel, false); 424 408 winElement.find(".insert-label").val(""); 425 409 $.Watermark.ShowAll(); -
trunk/prototype/modules/mail/templates/followupflag_configure.ejs
r5545 r5547 47 47 <legend><%= get_lang("Basic")%></legend> 48 48 <div class="followupflag-configure"> 49 <input type="hidden" class="id-followup" value="" name="followupFlag"> 49 50 <label class="label-name"><%= get_lang("Flag as")%>:</label> 50 51 <select name="name">
Note: See TracChangeset
for help on using the changeset viewer.