Ignore:
Timestamp:
12/04/12 15:49:21 (11 years ago)
Author:
fernando
Message:

Ticket #3218 - Inserir validação de mensagem ao sair do EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/js/common_functions.js

    r7459 r7608  
    102102 
    103103function unloadMess(){ 
    104         if (typeof BordersArray == 'undefined') return; // We're not on expressoMail 
     104    if (typeof BordersArray == 'undefined') return; // We're not on expressoMail 
    105105        if (typeof(expresso_mail_sync) != "undefined" && expresso_mail_sync.working) { 
    106106                var mess = get_lang("You're about archiving your e-mails from server. Do you really want to stop this action?"); 
     
    108108        } 
    109109        else { 
    110             for (var i = 0; i < BordersArray.length; i++)  
    111                     if(BordersArray[i].sequence > 0 && (!isNaN(BordersArray[i].sequence)&&parseInt(BordersArray[i].sequence) == BordersArray[i].sequence) ) 
    112                             return get_lang('There are still editing posts, really want to leave the page')+'?'; 
     110                var ret = null; 
     111                $(".conteudo .new-msg-head-buttons .save").each(function(index) { //Pega todos os botões "Save" de todas as abas 
     112                        if($(this).is(':disabled')) { //se a mensagem estiver salva (botão Salvar desabilitado) 
     113                                ret = null; 
     114                        } else { //se estiver em modo edição (botão Salvar habilitado) 
     115                                ret = get_lang('There are still editing posts, really want to leave the page')+'?'; 
     116                        } 
     117                }); 
     118 
     119                return ret; 
    113120        } 
    114121} 
Note: See TracChangeset for help on using the changeset viewer.