Changeset 7895 for sandbox


Ignore:
Timestamp:
02/19/13 16:08:41 (11 years ago)
Author:
gustavo
Message:

Ticket #3349 - Adicionado campo de busca, removido o collapse do jqgrid, adicionada marca ao input

Location:
sandbox/2.5.1-expresso1
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.5.1-expresso1/expressoMail1_2/js/draw_api.js

    r7800 r7895  
    51355135            }, 
    51365136                        autoOpen:false 
    5137         }); 
    5138         jQuery.getScript("../prototype/modules/attach_message/attach_message.js", function(){ 
    5139                 jQuery('#message-attach-dialog').dialog('open'); 
    5140                 jQuery('#message-attach-attach-btn').unbind('click'); 
    5141                 jQuery('#message-attach-attach-btn').click(function(event){ 
    5142                         jQuery.each(selectedMessages, function(folder_name, messages) { 
    5143                                 jQuery.each(selectedMessages[folder_name], function(message_number, message) {  
    5144                                         if (message) { 
    5145                                                 fileUploadMSG.find(' .attachments-list').show();         
    5146                                                 var att = new Object(); 
    5147                                                 att.folder = folder_name; 
    5148                                                 att.uid = message_number; 
    5149                                                 att.type = 'imapMSG'; 
    5150                                                 att.name = Base64.encode(onceOpenedMessages[folder_name][message_number].subject + '.eml'); 
    5151                                                 var idATT = JSON.stringify(att); 
    5152                                                 addAttachment( ID , idATT);                         
    5153                                                 var attach = {}; 
    5154                                                 attach.fileName = onceOpenedMessages[folder_name][message_number].subject + '.eml'; 
    5155                                                 attach.fullFileName = onceOpenedMessages[folder_name][message_number].subject + '.eml'; 
    5156                                                 if(attach.fileName.length > 20) 
    5157                                                         attach.fileName = attach.fileName.substr(0, 17) + "... " + attach.fileName.substr(attach.fileName.length-9, attach.fileName.length); 
    5158  
    5159                                                 attach.error = false; 
    5160                         attach.OK = true; 
    5161                                                 attach.fileSize = formatBytes(onceOpenedMessages[folder_name][message_number].size); 
    5162                                                 var upload = $(DataLayer.render("../prototype/modules/mail/templates/attachment_add_itemlist.ejs", {file : attach})); 
    5163                                                 $("#content_id_"+currentTab+" .save").button("enable"); 
    5164                         upload.find('.att-box-loading').remove(); 
    5165                                                 upload.append('<input type="hidden" name="fileId[]" value=\''+idATT+'\'/>'); 
    5166                                                  
    5167                                                 upload.find('.att-box-delete').click(function(){ 
    5168                             $("#content_id_"+currentTab+" .save").button("enable"); 
    5169                                                         var idAttach = $(this).parent().find('input[name="fileId[]"]').val(); 
    5170                                                         fileUploadMSG.find(' .attachments-list').find('input[value="'+idAttach+'"]').remove(); 
    5171                                                         delAttachment(ID,idAttach);  
    5172                                                         $(this).parent().qtip("destroy"); 
    5173                                                         $(this).parent().remove(); 
    5174                                                         if(!fileUploadMSG.find(' .attachments-list').find(".att-box").length){ 
    5175                                                                 fileUploadMSG.find(' .attachments-list').hide(); 
    5176                                                         } 
    5177                                                 });      
    5178                                                          
    5179                                                 fileUploadMSG.find('.attachments-list').append(upload); 
    5180  
    5181                                                 upload.find('.att-box-loading').remove(); 
    5182  
    5183                                                 fileUploadMSG.find('.attachments-list .att-box:last').qtip({ 
    5184                                         content: DataLayer.render("../prototype/modules/mail/templates/attachment_add_itemlist_tooltip.ejs", {attach : attach}), 
    5185                                                         position: { 
    5186                                                                 corner: { 
    5187                                                                         tooltip: 'bottomMiddle', 
    5188                                                                         target: 'topMiddle' 
    5189                                                                 }, 
    5190                                                                 adjust: { 
    5191                                                        resize: true, 
    5192                                                        scroll: true 
    5193                                                     } 
    5194                                                         }, 
    5195                                                         show: { 
    5196                                                                 when: 'mouseover', // Don't specify a show event 
    5197                                                                 ready: false // Show the tooltip when ready 
    5198                                                         }, 
    5199                                                         hide: 'mouseout', // Don't specify a hide event 
    5200                                                         style: { 
    5201                                                                 border: { 
    5202                                                                         width: 1, 
    5203                                                                         radius: 5 
    5204                                                                 }, 
    5205                                                                 width: { 
    5206                                                                          min: 75, 
    5207                                                                          max : 1000 
    5208                                                                 }, 
    5209                                                                 padding: 5,  
    5210                                                                 textAlign: 'center', 
    5211                                                                 tip: true, // Give it a speech bubble tip with automatic corner detection 
    5212                                                                 name: 'blue' // Style it according to the preset 'cream' style 
    5213                                                         } 
    5214                                 }); 
    5215                                         } 
    5216                                 }); 
    5217                         }); 
    5218                         jQuery('#message-attach-dialog').dialog('close'); 
    5219                 }); 
    5220                 jQuery('#message-attach-cancel-btn').click(function(event){ 
    5221                         jQuery('#message-attach-dialog').dialog('close'); 
    5222                 });                      
    5223         }); 
     5137            }); 
     5138         
     5139        jQuery.getScript("../prototype/modules/attach_message/attach_message.js", function(){ 
     5140                jQuery('#message-attach-dialog').dialog('open'); 
     5141                jQuery('#message-attach-attach-btn').unbind('click'); 
     5142                jQuery('#message-attach-attach-btn').click(function(event){ 
     5143                        jQuery.each(selectedMessages, function(folder_name, messages) { 
     5144                                jQuery.each(selectedMessages[folder_name], function(message_number, message) {  
     5145                                        if (message) { 
     5146                                                fileUploadMSG.find(' .attachments-list').show();         
     5147                                                var att = new Object(); 
     5148                                                att.folder = folder_name; 
     5149                                                att.uid = message_number; 
     5150                                                att.type = 'imapMSG'; 
     5151                                                att.name = Base64.encode(onceOpenedMessages[folder_name][message_number].subject + '.eml'); 
     5152                                                var idATT = JSON.stringify(att); 
     5153                                                addAttachment( ID , idATT);                         
     5154                                                var attach = {}; 
     5155                                                attach.fileName = onceOpenedMessages[folder_name][message_number].subject + '.eml'; 
     5156                                                attach.fullFileName = onceOpenedMessages[folder_name][message_number].subject + '.eml'; 
     5157                                                if(attach.fileName.length > 20) 
     5158                                                        attach.fileName = attach.fileName.substr(0, 17) + "... " + attach.fileName.substr(attach.fileName.length-9, attach.fileName.length); 
     5159 
     5160                                                attach.error = false; 
     5161                            attach.OK = true; 
     5162                                                attach.fileSize = formatBytes(onceOpenedMessages[folder_name][message_number].size); 
     5163                                                var upload = $(DataLayer.render("../prototype/modules/mail/templates/attachment_add_itemlist.ejs", {file : attach})); 
     5164                                                $("#content_id_"+currentTab+" .save").button("enable"); 
     5165                            upload.find('.att-box-loading').remove(); 
     5166                                                upload.append('<input type="hidden" name="fileId[]" value=\''+idATT+'\'/>'); 
     5167                                                 
     5168                                                upload.find('.att-box-delete').click(function(){ 
     5169                                $("#content_id_"+currentTab+" .save").button("enable"); 
     5170                                                        var idAttach = $(this).parent().find('input[name="fileId[]"]').val(); 
     5171                                                        fileUploadMSG.find(' .attachments-list').find('input[value="'+idAttach+'"]').remove(); 
     5172                                                        delAttachment(ID,idAttach);  
     5173                                                        $(this).parent().qtip("destroy"); 
     5174                                                        $(this).parent().remove(); 
     5175                                                        if(!fileUploadMSG.find(' .attachments-list').find(".att-box").length){ 
     5176                                                                fileUploadMSG.find(' .attachments-list').hide(); 
     5177                                                        } 
     5178                                                });      
     5179                                                         
     5180                                                fileUploadMSG.find('.attachments-list').append(upload); 
     5181 
     5182                                                upload.find('.att-box-loading').remove(); 
     5183 
     5184                                                fileUploadMSG.find('.attachments-list .att-box:last').qtip({ 
     5185                                        content: DataLayer.render("../prototype/modules/mail/templates/attachment_add_itemlist_tooltip.ejs", {attach : attach}), 
     5186                                                        position: { 
     5187                                                                corner: { 
     5188                                                                        tooltip: 'bottomMiddle', 
     5189                                                                        target: 'topMiddle' 
     5190                                                                }, 
     5191                                                                adjust: { 
     5192                                                       resize: true, 
     5193                                                       scroll: true 
     5194                                                    } 
     5195                                                        }, 
     5196                                                        show: { 
     5197                                                                when: 'mouseover', // Don't specify a show event 
     5198                                                                ready: false // Show the tooltip when ready 
     5199                                                        }, 
     5200                                                        hide: 'mouseout', // Don't specify a hide event 
     5201                                                        style: { 
     5202                                                                border: { 
     5203                                                                        width: 1, 
     5204                                                                        radius: 5 
     5205                                                                }, 
     5206                                                                width: { 
     5207                                                                         min: 75, 
     5208                                                                         max : 1000 
     5209                                                                }, 
     5210                                                                padding: 5,  
     5211                                                                textAlign: 'center', 
     5212                                                                tip: true, // Give it a speech bubble tip with automatic corner detection 
     5213                                                                name: 'blue' // Style it according to the preset 'cream' style 
     5214                                                        } 
     5215                                }); 
     5216                                        } 
     5217                                }); 
     5218                        }); 
     5219                        jQuery('#message-attach-dialog').dialog('close'); 
     5220                }); 
     5221                jQuery('#message-attach-cancel-btn').click(function(event){ 
     5222                        jQuery('#message-attach-dialog').dialog('close'); 
     5223                });                      
     5224        }); 
    52245225        }); 
    52255226        $(document).bind('drop dragover', function (e) { 
  • sandbox/2.5.1-expresso1/prototype/modules/attach_message/attach_message.js

    r7894 r7895  
    465465                                  id: "0" 
    466466                        }, 
     467                        hidegrid:false, 
    467468                        rowNum:10, 
    468469                        rowList:[10,25,50], 
     
    659660                }); 
    660661                //.jqGrid('navGrid','#message_attacher_grid_pager',{edit:false,add:false,del:false}); 
     662 
     663                var search_messages = function(param){ 
     664 
     665                } 
     666 
    661667                var title = [get_lang("First page"), get_lang("Prev page"), get_lang("Next page"), get_lang("Last page")]; 
    662668                $("#first_message_attacher_grid_pager").attr("title",title[0]); 
     
    664670                $("#next_message_attacher_grid_pager").attr("title",title[2]); 
    665671                $("#last_message_attacher_grid_pager").attr("title",title[3]); 
     672                $("#mailgrid-container .ui-jqgrid-titlebar") 
     673                .append( DataLayer.render("../prototype/modules/mail/templates/attachment_search.ejs") ).find(".ui-jqgrid-titlebar-close").hide() 
     674                .end().find(".attach-message-search-input").Watermark("Pesquisa...").keydown(function(e){ 
     675                        if($.ui.keyCode.ENTER == e.keyCode){ 
     676                                search_messages($(this).val()); 
     677                        } 
     678                }); 
    666679        } 
    667680}); 
Note: See TracChangeset for help on using the changeset viewer.