Changeset 5571
- Timestamp:
- 02/28/12 08:12:32 (11 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/js/common_functions.js
r5554 r5571 704 704 folder_name = current_folder; 705 705 }else{ 706 var tr = Element(selectedMessageIds[i]+'_s'+id_border); 707 folder_name = tr.getAttribute('name'); 706 //var tr = Element(selectedMessageIds[i]+'_s'+id_border); 707 //folder_name = tr.getAttribute('name'); 708 folder_name = $('#'+selectedMessageIds[i]+'_s'+id_border).attr('name'); 708 709 } 709 710 messages.push(onceOpenedHeadersMessages[folder_name][selectedMessageIds[i]]); … … 711 712 712 713 if(!User.followupflags) 713 User.followupflags = DataLayer.get('followupflag', true);714 User.followupflags = DataLayer.get('followupflag', true); 714 715 var data = { 715 716 followupflags: User.followupflags, … … 721 722 width:542, 722 723 height:420, 723 title:get_lang(' Acompanhamento'),724 title:get_lang('Follow up'), 724 725 resizable:false, 725 726 modal: true, 726 727 closeOnEscape:true, 727 728 close:function(event, ui) { 728 $('.followupflag-configure-win').addClass('hidden');729 //$('.followupflag-configure-win').addClass('hidden'); 729 730 select_all_search_messages(false, 'content_id_'+currentTab); 730 731 event.stopPropagation(); … … 733 734 }); 734 735 init_followup({window:dialogElement, selectedMessages:selectedMessageIds}); 735 $('.followupflag-configure-win').removeClass('hidden');736 //$('.followupflag-configure-win').removeClass('hidden'); 736 737 dialogElement.dialog("open"); 737 738 } 739 function dump(arr,level) { 740 var dumped_text = ""; 741 if(!level) level = 0; 742 743 //The padding given at the beginning of the line. 744 var level_padding = ""; 745 for(var j=0;j<level+1;j++) level_padding += " "; 746 747 if(typeof(arr) == 'object') { //Array/Hashes/Objects 748 for(var item in arr) { 749 var value = arr[item]; 750 751 if(typeof(value) == 'object') { //If it is an array, 752 dumped_text += level_padding + "'" + item + "' ...\n"; 753 dumped_text += dump(value,level+1); 754 } else { 755 dumped_text += level_padding + "'" + item + "' => \"" + value + "\"\n"; 756 } 757 } 758 } else { //Stings/Chars/Numbers etc. 759 dumped_text = "===>"+arr+"<===("+typeof(arr)+")"; 760 } 761 return dumped_text; 762 } 738 763 739 764 function open_rss(param){ -
trunk/expressoMail1_2/js/doiMenuData.js
r5568 r5571 34 34 35 35 /** 36 * Ap ly labels to selected messages36 * Apply labels to selected messages 37 37 */ 38 38 var isLabel = key.match(/label(.*)/); … … 84 84 } 85 85 DataLayer.commit(); 86 87 88 86 for (var i=0; i < messages.length; i++) { 87 updateLabelsColumn({msg_number:messages[i].msg_number, boxname:messages[i].msg_folder, labels:false}); 88 } 89 89 } 90 90 }, … … 153 153 }, 154 154 callback: function(key, options) { 155 155 //TODO - default actions 156 156 }, 157 157 items: menuToolsItems … … 161 161 function updateLabelsColumn(messageInfo) { 162 162 var msg_number = messageInfo.msg_number; 163 if( messageInfo.uid != '' && messageInfo.uid != 'undefined' && messageInfo.uid != null){163 if(!messageInfo.uid){ 164 164 msg_number = messageInfo.uid; 165 165 } … … 188 188 menuItems[labeleds[i].label.id] = labeleds[i].label; 189 189 } else { 190 //não tem labels190 //não existem labels 191 191 return false; 192 192 } … … 201 201 autoHide:true, 202 202 callback: function(key, options) { 203 // alert($(this).attr('id'));203 //TODO - default actions 204 204 }, 205 205 items: menuItems 206 206 }); 207 207 } 208 209 /**210 * TODO211 * * ao clicar com o botao direito em cima da mensagem, selecionar a mensagem212 * * clarear a cor do menu ferramentas213 * * pintar o botao ferramentas, quando clicado, da cor do menu214 *215 */ -
trunk/expressoMail1_2/js/draw_api.js
r5569 r5571 8 8 * formatação, etc.) 9 9 */ 10 11 12 10 onceOpenedHeadersMessages = {}; 13 11 … … 1025 1023 1026 1024 /** 1027 * Get the labels ap lyed to the messages and saves the information1025 * Get the labels applied to the messages and saves the information 1028 1026 * into message array 1029 1027 */ … … 1050 1048 1051 1049 /** 1052 * Get the followupflags ap lyed to the messages and saves the information1050 * Get the followupflags applied to the messages and saves the information 1053 1051 * into message array 1054 1052 */ -
trunk/expressoMail1_2/templates/default/index.tpl
r5546 r5571 208 208 </div> 209 209 <div id="windowLabels" class="label-configure-win"></div> 210 <div id="followupFlag" class="followupflag-configure-win hidden"></div>210 <div id="followupFlag" class="followupflag-configure-win"></div> 211 211 <!-- END list --> -
trunk/prototype/modules/mail/css/followupflag.css
r5533 r5571 1 .ZebraDialog_Body .footerMais,.footerMenos {cursor: pointer; color: #0f1dff;}2 .ZebraDialog_Body .footerMais2,.footerMenos2 {cursor: pointer; color: #0f1dff;}3 .ZebraDialog_Body .alert-flags a{ cursor: pointer;}4 .ZebraDialog_Body .alert-flags li:hover{ text-decoration: underline;}5 6 1 .followupflag-configure-win { width:543px; height:412px !important; } 7 2 .followupflag-container { … … 71 66 padding:0; 72 67 } 68 69 70 71 .ZebraDialog.followupflag-alarm {} 72 .ZebraDialog.followupflag-alarm fieldset{border:none; margin:0; padding:3px 0;} 73 .ZebraDialog.followupflag-alarm fieldset input{margin-left:0; padding-left:3px 0;} 74 .ZebraDialog.followupflag-alarm .message-list{overflow: hidden; height: 50px; list-style:none; padding-left:10px;} 75 .ZebraDialog.followupflag-alarm .message-list li{width: 270px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis; cursor: pointer;} 76 .ZebraDialog.followupflag-alarm .message-list li:hover{ text-decoration: underline;} 77 .ZebraDialog.followupflag-alarm .display-option { color:#2363a4; cursor: pointer;} -
trunk/prototype/modules/mail/js/followupflag.js
r5564 r5571 1 //se caso não existir nenhuma mensagem concluida para o dia atual, ele não mostra a modal. 2 if($.cookie("fadeAlarm") != (new Date).toString("dd/MM/yyyy")){ 3 var alarmInRange = DataLayer.get('followupflagged', {filter: ['AND', ['>', 'alarmDeadline', (new Date()).set({hour:0, minute:0, second:0}).toString('yyyy-MM-dd 00:00:00')], ['<', 'alarmDeadline', (new Date()).set({hour:0, minute:0, second:0}).addHours(24).toString('yyyy-MM-dd 00:00:00')]], criteria: {deepness: 1}}); 1 /** 2 * constrói as duas possíveis janela de alerta, utilizando o mesmo template 3 */ 4 var toIterate = [ 5 { 6 attrDeadline: 'doneDeadline', 7 caption: {singular:'Você tem uma mensagem concluindo hoje:', plural:"Você tem %1 mensagens concluindo hoje:"}, 8 onOk: function(event){ 9 if($(event.target).parents('.followupflag-alarm').find('[name="stopAlert"]').is(':checked')){ 10 $.cookie("fadeCompleted", (new Date).toString("dd/MM/yyyy"), { expires: 1 }); 11 } 12 }, 13 enable: ($.cookie("fadeCompleted") != (new Date).toString("dd/MM/yyyy")) 14 }, 15 { 16 attrDeadline: 'alarmDeadline', 17 caption: {singular:'Você tem uma mensagem sinalizada para hoje:', plural:'Você tem %1 mensagens sinalizadas para hoje:'}, 18 onOk: function(event){ 19 if($(event.target).parents('.followupflag-alarm').find('[name="stopAlert"]').is(':checked')){ 20 $.cookie("fadeAlarm", (new Date).toString("dd/MM/yyyy"), { expires: 1 }); 21 } 22 }, 23 enable: ($.cookie("fadeAlarm") != (new Date).toString("dd/MM/yyyy")) 24 } 25 ]; 26 27 while (it = toIterate.pop()){ 28 if (!it.enable) continue; 29 30 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')], ['<', toIterate.attrDeadline, (new Date()).set({hour:0, minute:0, second:0}).addHours(24).toString('yyyy-MM-dd 00:00:00')]], criteria: {deepness: 1}}); 4 31 if(alarmInRange.length > 0){ 5 32 for(var i=0; i<alarmInRange.length; i++){ … … 7 34 alarmInRange[i].alarmDeadline = date.toString('hh:mm'); 8 35 } 9 var data = {alarmInRange : alarmInRange}; 10 var valueZebra = DataLayer.render("../prototype/modules/mail/templates/followupflag_alarm_list.ejs", data); 11 12 new $.Zebra_Dialog(valueZebra, { 13 'buttons': ['Ok'], 14 'modal': false, 15 'position': ['right - 20', 'bottom - 30'], 16 'custom_class': 'zebraClass2', 17 }); 18 19 $(".ZebraDialog_Body .footerMenos").hide() 20 21 $(".ZebraDialog_Body .footerMais").click(function(){ 22 $('.ZebraDialog').css('visibility','hidden'); 23 $(this).parents('.ZebraDialog').css("visibility","visible"); 24 $(this).parents('.ZebraDialog').animate( { top: '-=300px' } , 280) 25 .find("ul.alert-flags").animate( { height: 375 } , 300); 26 $(".ZebraDialog_Body .footerMais").hide(); 27 $(".ZebraDialog_Body .footerMenos").show(); 36 var caption = (alarmInRange.length == 1) ? 37 get_lang(it.caption.singular): 38 get_lang(it.caption.plural, alarmInRange.length); 39 40 var data = {alarmInRange : alarmInRange, caption: caption}; 41 var dialogText = DataLayer.render("../prototype/modules/mail/templates/followupflag_alarm_list.ejs", data); 42 43 /** 44 * A última dialog criada é a dialog mais ao alto 45 */ 46 var offsetHeight = $('.ZebraDialog.right-bottom:last').length ? 47 $(window).height() - $('.ZebraDialog.right-bottom:last').position().top : 0; 48 49 /** 50 * Se for a primeira, desloca para cima do rodapé do grid 51 * caso contrário desloca para um pouco acima da última dialog criada 52 */ 53 offsetHeight = !offsetHeight ? 35 : offsetHeight + 20 ; 54 var dialog = new $.Zebra_Dialog(dialogText, { 55 'buttons': ['Ok'], 56 'modal': false, 57 'vcenter_short_message': false, 58 'position': ['right - 20', 'bottom - ' + offsetHeight.toString() ], 59 'custom_class': 'right-bottom followupflag-alarm', 60 }).dialog; 61 62 $(".ZebraDialog.followupflag-alarm .ZebraDialog_Button0").click(it.onOk); 63 64 $(".ZebraDialog.followupflag-alarm .display-options .more").click(function(event) { 65 $(event.target).parents('.followupflag-alarm').find('.message-list').css('height', 'auto'); 28 66 }); 29 $(".ZebraDialog_Body .footermenos").click(function(){ 30 $('.ZebraDialog').css('visibility','visible'); 31 $(this).parents('.ZebraDialog').animate( { top: '+=300px' } , 280) 32 .find("ul.alert-flags").animate( { height: 70 } , 300); 33 34 $(this).parents('.ZebraDialog').css({ 35 }); 36 $(".ZebraDialog_Body .footerMenos").hide(); 37 $(".ZebraDialog_Body .footerMais").show(); 38 }); 39 40 41 $("ul.alert-flags li").css({ 42 'width': '270px', 43 'white-space': 'nowrap', 44 'overflow': 'hidden', 45 'text-overflow': 'ellipsis' 46 }); 47 48 $("span.exc-ocul").css({ 49 'float' : 'right', 50 'margin-right' : '0', 51 'color' : '#2363a4', 52 'cursor' : 'pointer' 53 }).parent("ul").css(); 54 55 $(".zebraClass2 .ZebraDialog_Buttons .ZebraDialog_Button0").click(function(){ 56 var countCheckbox2 = $("input:checked").length; 57 58 if(countCheckbox2 == 1){ 59 date2 = (new Date).toString("dd/MM/yyyy"); 60 $.cookie("fadeAlarm", date2 , { expires: 1 }); 61 } 62 }); 67 63 68 } 64 69 } 65 70 66 if($.cookie("fadeCompleted") != (new Date).toString("dd/MM/yyyy")){67 var doneInRange = DataLayer.get('followupflagged', {filter: ['AND', ['>', 'doneDeadline', (new Date()).set({hour:0, minute:0, second:0}).toString('yyyy-MM-dd 00:00:00')], ['<', 'doneDeadline', (new Date()).set({hour:0, minute:0, second:0}).addHours(24).toString('yyyy-MM-dd 00:00:00')]], criteria: {deepness: 1}});68 if(doneInRange.length > 0){69 for(var i=0; i<doneInRange.length; i++){70 var date = Date.parseExact(doneInRange[i].doneDeadline, 'yyyy-MM-dd hh:mm:ss');71 doneInRange[i].doneDeadline = date.toString('hh:mm');72 }73 var data = {doneInRange : doneInRange};74 var valueZebra = DataLayer.render("../prototype/modules/mail/templates/followupflag_completed_list.ejs", data);75 76 //verificando se a primeira "model de alarme" está oculta ou não..77 //caso ela esteja caira nesse primeiro if, que coloca a model de "concluidos" no lugar da model de alarme.78 if($(".zebraClass2").length == 0){79 new $.Zebra_Dialog(valueZebra, {80 'buttons': ['Ok'],81 'modal': false,82 'position': ['right - 20', 'bottom - 30' ],83 'custom_class': 'zebraClass',84 });85 }else{86 new $.Zebra_Dialog(valueZebra, {87 'buttons': ['Ok'],88 'modal': false,89 'position': ['right - 20', 'bottom - 275' ],90 'custom_class': 'zebraClass',91 });92 }93 94 $(".ZebraDialog_Body .footerMenos2").hide()95 96 $(".ZebraDialog_Body .footerMais2").click(function(){97 $('.ZebraDialog').css('visibility','hidden');98 $(this).parents('.ZebraDialog').css("visibility","visible");99 if($.cookie("fadeAlarm") != (new Date).toString("dd/MM/yyyy")){100 $(this).parents('.ZebraDialog').animate( { top: '-=60px' } , 280)101 .find("ul.alert-flags").animate( { height: 360 } , 300);102 } else {103 $(this).parents('.ZebraDialog').animate( { top: '-=300px' } , 280)104 .find("ul.alert-flags").animate( { height: 360 } , 300);105 }106 107 $(".ZebraDialog_Body .footerMais2").hide();108 $(".ZebraDialog_Body .footerMenos2").show();109 });110 $(".ZebraDialog_Body .footermenos2").click(function(){111 $('.ZebraDialog').css('visibility','visible');112 if($.cookie("fadeAlarm") != (new Date).toString("dd/MM/yyyy")){113 $(this).parents('.ZebraDialog').animate( { top: '+=60px' } , 280)114 .find("ul.alert-flags").animate( { height: 70 } , 300);115 } else {116 $(this).parents('.ZebraDialog').animate( { top: '+=300px' } , 280)117 .find("ul.alert-flags").animate( { height: 70 } , 300);118 }119 $(this).parents('.ZebraDialog').css({120 });121 $(".ZebraDialog_Body .footerMenos2").hide();122 $(".ZebraDialog_Body .footerMais2").show();123 });124 125 126 $("ul.alert-flags li").css({127 'width': '270px',128 'white-space': 'nowrap',129 'overflow': 'hidden',130 'text-overflow': 'ellipsis'131 });132 133 $("span.exc-ocul").css({134 'float' : 'right',135 'margin-right' : '0',136 'color' : '#2363a4',137 'cursor' : 'pointer'138 }).parent("ul").css();139 140 $(".zebraClass .ZebraDialog_Buttons .ZebraDialog_Button0").click(function(){141 142 var countCheckbox1 = $("input:checked").length;143 144 if(countCheckbox1 == 1){145 date1 = (new Date).toString("dd/MM/yyyy");146 $.cookie("fadeCompleted", date1 , { expires: 1 });147 }148 });149 }150 }151 71 function init_followup(data){ 152 72 … … 423 343 }); 424 344 425 if(winElement.find( "#selectCor option:selected").val() == "custom"){426 winElement.find( "#selectCor").trigger("change");345 if(winElement.find('[name="setColor"] option:selected').val() == "custom"){ 346 winElement.find('[name="setColor"]').trigger("change"); 427 347 } 428 348 … … 445 365 446 366 }); 447 if(winElement.find( "#selectCor option:selected").val() == "custom"){367 if(winElement.find('[name="setColor"] option:selected').val() == "custom"){ 448 368 winElement.find(".colorwell").focus(); 449 369 } -
trunk/prototype/modules/mail/templates/followupflag_alarm_list.ejs
r5533 r5571 1 <p class="title"><strong> Você tem <%= data.alarmInRange.length %> <%= (data.alarmInRange.length == 1) ? 'mensagem sinalizada para hoje.' : 'mensagens sinalizadas para hoje.'%> </p></strong>2 <ul class="alert-flags" style="overflow: hidden; height: 70px;"> 3 1 <p class="title"><strong><%= data.caption %> </strong></p> 2 3 <ul class="message-list"> 4 4 <% 5 5 for(var i=0; i<data.alarmInRange.length; i++){ 6 7 var openMessageScript = "cExecute('$this.imap_functions.get_info_msg&msg_number="+data.alarmInRange[i].messageNumber+"&msg_folder="+data.alarmInRange[i].folderName+"', show_msg);"; 6 8 %> 7 8 <li><a onclick="cExecute('$this.imap_functions.get_info_msg&msg_number=<%=data.alarmInRange[i].messageNumber %>&msg_folder=<%= data.alarmInRange[i].folderName %>', show_msg);"><%= data.alarmInRange[i].alarmDeadline %> - <%= data.alarmInRange[i].followupflag.name %> - <%= data.alarmInRange[i].message.headers.subject %></a></li> 9 <li class="message-item"> 10 <a onclick="<%=openMessageScript%>"> 11 <%= data.alarmInRange[i].alarmDeadline %> - <%= data.alarmInRange[i].followupflag.name %> - <%= data.alarmInRange[i].message.headers.subject %> 12 </a> 13 </li> 9 14 <% 10 15 } 11 16 %> 12 </ul> 13 14 <br> 15 <a class="footerMais">ver mais</a><a class="footerMenos">ver menos</a> 16 <br><br> 17 <input type="checkbox" name="fadeModel2"> Não mostrar essa janela por hoje. 17 </ul> 18 19 <div class="display-options"> 20 <a class="display-option more">ver mais</a> 21 <a class="display-option less" style="display:none;">ver menos</a> 22 </div> 23 <fieldset class="alert-options"> 24 <input type="checkbox" name="stopAlert"> <label>Não mostrar essa janela por hoje.</label> 25 </fieldset> -
trunk/prototype/modules/mail/templates/followupflag_configure.ejs
r5567 r5571 40 40 } 41 41 } 42 typeFlag = DataLayer.get("followupflag", id = data.messages[0].followupflagged.followupflagId ).name;43 //followupflagged.followupflag.name44 42 %> 45 43 <div class="followupflag-container"> … … 52 50 <% for(var i=0; i<data.followupflags.length; i++) { %> 53 51 54 <% var selected = (data.followupflags[i]. name == typeFlag) ? 'selected="selected"' : '' %>52 <% var selected = (data.followupflags[i].id == followupflagged.followupflagId ) ? 'selected="selected"' : '' %> 55 53 <option value="<%= data.followupflags[i].id %>" <%= selected %>><%= data.followupflags[i].name %></option> 56 54 <% } %> … … 87 85 } 88 86 %> 89 <select id="selectCor"name="setColor">90 <option value="default" <%= (defaultColor ) ? 'selected="selected"' : ''%> ><%= get_lang("Default")%></option>91 <option value="custom" <%= (!defaultColor ) ? 'selected="selected"' : ''%> ><%= get_lang("Custom")%></option>87 <select name="setColor"> 88 <option value="default" <%= (defaultColor && !followupflagged.backgroundColor) ? 'selected="selected"' : ''%> ><%= get_lang("Default")%></option> 89 <option value="custom" <%= (!defaultColor && followupflagged.backgroundColor) ? 'selected="selected"' : ''%> ><%= get_lang("Custom")%></option> 92 90 </select> 93 91 </div> … … 116 114 </div> 117 115 </div> 118 119 <!--120 TODO121 ** Vai ter que ser arrumado a parte de buscar o tipo do sinalizador atual.122 -->
Note: See TracChangeset
for help on using the changeset viewer.