Changeset 128


Ignore:
Timestamp:
12/11/07 16:47:03 (16 years ago)
Author:
niltonneto
Message:

Nova funcionalidade: Teclas de Atalho
Correção de frases lang

Location:
trunk/expressoMail1_2/js
Files:
1 added
10 edited

Legend:

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

    r118 r128  
    6565 
    6666                        var butt = document.createElement('BUTTON'); 
    67                         var buttext = document.createTextNode(get_lang('OK')); 
     67                        var buttext = document.createTextNode('OK'); 
    6868                        butt.id = "QuickCatalogSearch_button_ok"; 
    6969                        butt.appendChild(buttext); 
     
    293293                 
    294294                var handler_cc_contacts= function(data){ 
    295                         if(data.length > 0){ 
     295                        if(data && data.length > 0){ 
    296296                                var aux = data.split(","); 
    297297                                for(var i=0; i< aux.length; i++){ 
     
    303303 
    304304                var handler_cc_groups = function(data){ 
    305                         if(data.length > 0){ 
     305                        if(data && data.length > 0){ 
    306306                                var aux = data.split(","); 
    307307                                for(var i=0; i < data.length; i++){ 
  • trunk/expressoMail1_2/js/TreeS.js

    r118 r128  
    180180                n_root.changeState(); 
    181181                if(opentomb != ""){folders_tree.openTo(opentomb);} 
    182                 if(selected != ""){folders_tree.getNodeById(selected)._select();} 
     182                if(selected != "" && folders_tree.getNodeById(selected)){folders_tree.getNodeById(selected)._select();} 
    183183 
    184184        } 
  • trunk/expressoMail1_2/js/TreeShow.js

    r118 r128  
    9191                        if(this.verify_names(aux2)){ 
    9292                                if(func == "newpast") 
    93                                        if(aux2 == "INBOX"){alert(get_lang("It's not possible create inside : INBOX" ))}else{alert(get_lang("It's not possible create inside : ") + aux2)}; 
     93                   alert(get_lang("It's not possible create inside")+ " : " + (aux2 == "INBOX" ? get_lang("INBOX"): aux2)); 
    9494                                if(func == "rename") 
    95                                       if(aux2 == "INBOX"){alert(get_lang("It's not possible rename the folder : Caixa de Entrada" ))}else{alert(get_lang("It's not possible rename the folder : ") + aux2)}; 
     95                   alert(get_lang("It's not possible rename the folder")+ " : " + (aux2 == "INBOX" ? get_lang("INBOX") : aux2)); 
    9696                                return false; 
    9797                        }else{ 
    9898                                if(func == "newpast"){ 
    99                                        var button = prompt(get_lang("Enter the name of the new box :"),""); 
    100  
     99                    var button = prompt(get_lang("Enter the name of the new box :"),""); 
    101100                                        if(trim(button) == "" || trim(button) == null){ 
    102101                                                return false; 
     
    107106                                if(func == "rename"){ 
    108107                                        if(ttree.FOLDER == "root"){ 
    109                                                alert(get_lang("It's not possible rename this folder!")); 
     108                                alert(get_lang("It's not possible rename this folder!")); 
    110109                                                return false; 
    111110                                        } 
    112111                                        if(ttree.FOLDER == get_current_folder()){ 
    113                                                alert(get_lang("It's not possible rename this folder becouse it is being used in the moment!")); 
    114                                                 return false; 
    115                                         } 
    116                                        var button1 = prompt(get_lang("Enter a name for the box"), ""); 
     112                        alert(get_lang("It's not possible rename this folder becouse it is being used in the moment!")); 
     113                                                return false; 
     114                                        } 
     115                    var button1 = prompt(get_lang("Enter a name for the box"), ""); 
    117116                                        if(trim(button1) == "" || trim(button1) == null){ 
    118117                                                return false; 
     
    123122                        } 
    124123                }else{ 
    125                         alert(get_lang("Select a folder")); 
     124            alert(get_lang("Select a folder!")); 
    126125                        return false; 
    127126                } 
     
    135134                 
    136135                if(aux.length == 1 && aux[0] != "root"){ 
    137                        alert(get_lang("It's not possible create inside : ") + aux[0]); 
     136            alert(get_lang("It's not possible create inside") + " : " + aux[0]); 
    138137                        newp = ""; 
    139138                }else{ 
    140139                        if( aux[0] == "root"){ 
    141140                                if(!this.verify(newp)){ 
    142                                        alert(get_lang("Type without spaces, dots or special characters!")); 
     141                    alert(get_lang("Type without spaces, dots or special characters!")); 
    143142                                        newp = ""; 
    144143                                        return false; 
     
    149148                        }else{ 
    150149                                if(!this.verify(newp)){ 
    151                                         alert(get_lang("Type without spaces, dots or special characters!")); 
     150                    alert(get_lang("Type without spaces, dots or special characters!")); 
    152151                                        newp = ""; 
    153152                                        return false; 
     
    176175        // Funcao para renomear a pasta; 
    177176        Tree_Box.prototype.rename = function(rename){ 
    178  
    179177                var old_box  = ttree.FOLDER; 
    180178                var aux = old_box.split(cyrus_delimiter); 
     
    182180                 
    183181                if(old_box == "root"){ 
    184                        alert(get_lang("Select a folder")); 
     182            alert(get_lang("Select a folder!")); 
    185183                        return false; 
    186184                } 
    187185                if(aux.length == 1){ 
    188                        alert(get_lang("It's not possible rename : ") + aux[0]); 
     186            alert(get_lang("It's not possible rename") + " : " + aux[0]); 
    189187                        rename = ""; 
    190188                        return false; 
    191189                }else{ 
    192190                        if(this.verify_names(aux[1])){ 
    193                                alert(get_lang("It's not possible rename : ") + aux[1]); 
     191                alert(get_lang("It's not possible rename") + " : " + aux[1]); 
    194192                                rename = ""; 
    195193                                return false; 
    196194                        }else{ 
    197195                                if(!this.verify(rename)){ 
    198                                         alert(get_lang("Type without spaces, dots or special characters!")); 
     196                    alert(get_lang("Type without spaces, dots or special characters!")); 
    199197                                        rename = ""; 
    200198                                        return false; 
     
    249247                 
    250248                if(aux.length == 1){ 
    251                        alert(get_lang("It's not possible delete the folder Inbox"));             
     249            alert(get_lang("It's not possible delete the folder ") + get_lang("Inbox")); 
    252250                        return false; 
    253251                }else{ 
    254252                        if(this.verify_names(aux[1])){ 
    255                                alert(get_lang("It's not possible delete the folter ") + aux[1]);          
    256                                 return false; 
     253                    alert(get_lang("It's not possible delete the folder ") + aux[1]);     
     254                        return false; 
    257255                        }else{ 
    258256                                this.verify_children(ttree.FOLDER); 
     
    267265 
    268266                if(ttree.FOLDER == get_current_folder()){ 
    269                       alert(get_lang("It's not possible rename this folder, it is begin in use at the moment!"));  
    270                         return false; 
    271                 } 
    272                if(confirm(get_lang("Do you wish to erase the folder ") + aux1+ "?")){ 
     267            alert(get_lang("It's not possible rename this folder, it is begin in use at the moment!"));  
     268                        return false; 
     269                } 
     270        if(confirm(get_lang("Do you wish to exclude the folder ") + aux1+ "?")){ 
    273271                        var handler_return = function(data) 
    274272                        {                
     
    279277                                        ttree.FOLDER = ""; 
    280278                                        ttreeBox.update_folder(); 
    281                                        alert(get_lang("The folder " + aux1 + get_lang(" was successfully erased")));                                     
     279                    alert(get_lang("The folder %1 was successfully removed", aux1)); 
    282280                                } 
    283281                        } 
  • trunk/expressoMail1_2/js/draw_api.js

    r118 r128  
    403403        } 
    404404 
     405        if ((preferences.use_shortcuts == '1') && (headers_msgs[0])) 
     406                select_msg(headers_msgs[0].msg_number, 'null'); 
     407 
    405408        var tdFolders  =  Element("folderscol"); 
    406409        tdFolders.style.display = preferences.hide_folders == '1'  ? "none" : ""; 
     
    674677        next_previous_msg_td.width = "40px"; 
    675678        var img_next_msg = document.createElement("IMG"); 
     679        img_next_msg.id = 'msg_opt_next_' + ID; 
    676680        img_next_msg.src = './templates/default/images/down.button.png'; 
    677681        img_next_msg.title = get_lang('Next'); 
     
    681685        img_space.innerHTML = "&nbsp;"; 
    682686        var img_previous_msg = document.createElement("IMG"); 
     687        img_previous_msg.id = 'msg_opt_previous_' + ID; 
    683688        img_previous_msg.src = './templates/default/images/up.button.png'; 
    684689        img_previous_msg.title = get_lang('Previous'); 
     
    776781 
    777782        var option_print = document.createElement("SPAN"); 
     783        option_print.id = 'msg_opt_print_'+ID; 
    778784        option_print.className = 'message_options'; 
    779785        option_print.onclick = function(){print_msg(info_msg.msg_folder,info_msg.msg_number,ID);}; 
     
    782788        options.appendChild(option_print); 
    783789        var option_forward = document.createElement("SPAN"); 
     790        option_forward.id = 'msg_opt_forward_'+ID; 
    784791        option_forward.className = 'message_options'; 
    785792        option_forward.onclick = function(){new_message('forward', ID);}; 
     
    788795        options.appendChild(option_forward); 
    789796        var option_reply = document.createElement("SPAN"); 
     797        option_reply.id = 'msg_opt_reply_'+ID; 
    790798        option_reply.className = 'message_options'; 
    791799        option_reply.onclick = function(){new_message('reply_with_history', ID);}; 
     
    794802        options.appendChild(option_reply); 
    795803        var option_delete = document.createElement("SPAN"); 
     804        option_delete.id = 'msg_opt_delete_'+ID; 
    796805        option_delete.className = 'message_options'; 
    797806        option_delete.onclick = function(){delete_msgs(info_msg.msg_folder, info_msg.msg_number, ID);}; 
     
    817826 
    818827        var option_mark_as                                              = '<span>'+get_lang("Mark as")+'</span>: '; 
    819         var option_mark_as_unseen                               = '<span class="message_options" onclick="set_messages_flag(\'unseen\','+info_msg.msg_number+');write_msg(\''+get_lang('Message markes as Unseen.')+'\');">'+get_lang("Unseen")+'</span>, '; 
    820         var option_mark_as_important                    = '<span class="message_options" onclick="set_messages_flag(\'flagged\','+info_msg.msg_number+');write_msg(\''+get_lang('Message markes as Important.')+'\');">'+get_lang("Important")+'</span>, '; 
    821         var option_mark_as_normal                               = '<span class="message_options" onclick="set_messages_flag(\'unflagged\','+info_msg.msg_number+');write_msg(\''+get_lang('Message markes as Normal.')+'\');">'+get_lang("Normal")+'</span> | '; 
     828        var option_mark_as_unseen                               = '<span class="message_options" onclick="set_messages_flag(\'unseen\','+info_msg.msg_number+');write_msg(\''+get_lang('Message marked as ')+get_lang("Unseen")+'.\');">'+get_lang("Unseen")+'</span>, '; 
     829        var option_mark_as_important                    = '<span class="message_options" onclick="set_messages_flag(\'flagged\','+info_msg.msg_number+');write_msg(\''+get_lang('Message marked as ')+get_lang("Important")+'.\');">'+get_lang("Important")+'</span>, '; 
     830        var option_mark_as_normal                               = '<span class="message_options" onclick="set_messages_flag(\'unflagged\','+info_msg.msg_number+');write_msg(\''+get_lang('Message marked as ')+get_lang("Normal")+'.\');">'+get_lang("Normal")+'</span> | '; 
    822831         
    823832        var option_move                                                 = '<span class="message_options" onclick=wfolders.makeWindow("'+ID+'","move_to");>'+get_lang("Move")+'</span> | '; 
  • trunk/expressoMail1_2/js/filter.js

    r118 r128  
    496496                                mount_rule += fld_men.value + "&&on "; 
    497497                        }else{ 
    498                                 alert(get_lang("Inform the forwarding e-mail(s)!")); 
     498                                alert(get_lang("Inform a forwarding e-mail!")); 
    499499                                return false; 
    500500                        } 
  • trunk/expressoMail1_2/js/filters.js

    r118 r128  
    8686                        list += "<div id='set_rules'>"; 
    8787                        for(var i=0; i < filter.rulest.length; i++){ 
    88                                 list += "<input id=rule_"+i+" type='checkBox'>&nbsp;<img src='"+this.filter_img.src+"' width='16' height='16' border='0'>&nbsp;" + get_lang("Rule : ") + parseInt(i+1) + " -- " + this.vl_rule(filter.rulest[i],i) + "<br>"; 
     88                                list += "<input id=rule_"+i+" type='checkBox'>&nbsp;<img src='"+this.filter_img.src+"' width='16' height='16' border='0'>&nbsp;" + get_lang("Rule")+" : " + parseInt(i+1) + " -- " + this.vl_rule(filter.rulest[i],i) + "<br>"; 
    8989                        } 
    9090                } 
  • trunk/expressoMail1_2/js/main.js

    r118 r128  
    7070                //Change the tr color to read. 
    7171                set_msg_class_to_read(msg_info['msg_number'], true); 
     72                 
     73                if (preferences.use_shortcuts == '1') 
     74                        select_msg(msg_info.msg_number, 'null'); 
    7275                 
    7376                if ((msg_info.DispositionNotificationTo) && ((msg_info.Unseen == 'U') || (msg_info.Recent == 'N'))){ 
     
    141144                        msg_to_delete = Element(data.msgs_number[i]); 
    142145                        if (msg_to_delete){ 
     146                                if ( (msg_to_delete.style.backgroundColor != '') && (preferences.use_shortcuts == '1') ) 
     147                                        select_msg('null', 'down'); 
    143148                                mail_msg.removeChild(msg_to_delete); 
    144149                        } 
     
    188193                        msg_to_delete = Element(data.msgs_number[i]); 
    189194                        if (msg_to_delete){ 
     195                                if ( (msg_to_delete.style.backgroundColor != '') && (preferences.use_shortcuts == '1') ) 
     196                                        select_msg('null', 'down'); 
    190197                                mail_msg.removeChild(msg_to_delete); 
    191198                        } 
     
    315322                        body.contentWindow.document.write("<html><body bgcolor='#FFFFFF'></body></html>"); 
    316323                        body.contentWindow.document.close(); 
    317                         body.contentWindow.focus(); 
    318324                        body.contentWindow.document.designMode = "on"; 
    319325                        body.contentWindow.focus(); 
     326                        if (is_ie) 
     327                                body.contentWindow.document.onkeypress = function(){if(body.contentWindow.event.keyCode == 13){changeEnterKey(body.contentWindow)}}; 
    320328                        msg_reply_from = document.createElement('input'); 
    321329                        msg_reply_from.id = "msg_reply_from_" + new_border_ID; 
     
    335343                        body.contentWindow.document.designMode = "on"; 
    336344                        body.contentWindow.focus(); 
     345                        if (is_ie) 
     346                                body.contentWindow.document.onkeypress = function(){if(body.contentWindow.event.keyCode == 13){changeEnterKey(body.contentWindow)}};                     
    337347                        msg_reply_from = document.createElement('input'); 
    338348                        msg_reply_from.id = "msg_reply_from_" + new_border_ID; 
     
    358368                        body.contentWindow.document.designMode = "on"; 
    359369                        body.contentWindow.focus(); 
     370                        if (is_ie) 
     371                                body.contentWindow.document.onkeypress = function(){if(body.contentWindow.event.keyCode == 13){changeEnterKey(body.contentWindow)}}; 
    360372                        msg_reply_from = document.createElement('input'); 
    361373                        msg_reply_from.id = "msg_reply_from_" + new_border_ID; 
     
    382394                        body.contentWindow.document.designMode = "on"; 
    383395                        body.contentWindow.focus(); 
     396                        if (is_ie) 
     397                                body.contentWindow.document.onkeypress = function(){if(body.contentWindow.event.keyCode == 13){changeEnterKey(body.contentWindow)}}; 
    384398                        msg_reply_from = document.createElement('input'); 
    385399                        msg_reply_from.id = "msg_reply_from_" + new_border_ID; 
     
    417431                        body.contentWindow.document.close(); 
    418432                        body.contentWindow.document.designMode = "on"; 
     433                        if (is_ie) 
     434                                body.contentWindow.document.onkeypress = function(){if(body.contentWindow.event.keyCode == 13){changeEnterKey(body.contentWindow)}}; 
    419435                        Element("to_" + new_border_ID).focus(); 
    420436                        break; 
     
    442458                        body.contentWindow.document.close(); 
    443459                        body.contentWindow.document.designMode = "on"; 
     460                        if (is_ie) 
     461                                body.contentWindow.document.onkeypress = function(){if(body.contentWindow.event.keyCode == 13){changeEnterKey(body.contentWindow)}}; 
    444462                        Element("to_" + new_border_ID).focus(); 
    445463                        break; 
     
    465483                        body.contentWindow.document.designMode = "on"; 
    466484                        body.contentWindow.focus(); 
     485                        if (is_ie) 
     486                                body.contentWindow.document.onkeypress = function(){if(body.contentWindow.event.keyCode == 13){changeEnterKey(body.contentWindow)}}; 
    467487                        break; 
    468488                default: 
     
    483503 
    484504        Element("border_id_" + new_border_ID).innerHTML = "<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td id=font_border_id_" + new_border_ID +" class='font-menu' width=*>" +title + "</td><td width=1px><img onmousedown='javascript:return false' style='cursor:pointer' onclick=delete_border('" + new_border_ID + "','false') src='templates/default/images/close_button.gif'></td></tr></table>"; 
     505} 
     506 
     507// Change the tag <P> for the tag <BR> on IE 
     508function changeEnterKey(win) { 
     509        var oSel = win.document.selection.createRange(); 
     510        oSel.pasteHTML("<br />"); 
     511        win.event.cancelBubble = true; 
     512        win.event.returnValue=false; 
     513        oSel.select(); 
     514        oSel.moveEnd("character",1); 
     515        oSel.moveStart("character",1); 
     516        oSel.collapse(false); 
     517        return false; 
    485518} 
    486519 
  • trunk/expressoMail1_2/js/preferences.js

    r83 r128  
    7272                                "<option value='11'>"+get_lang("Normal")+"</option>"+                                                    
    7373                                "<option value='15'>"+get_lang("Big")+"</option>"+ 
    74                                 "</select></td>"+                                                        
    75                                 "</tr>"+ 
     74                                "</select></td></tr>"+ 
     75                                "<tr><td> - " + get_lang("Use shortcuts") + "?" + "</td>"+ 
     76                                "<td><input type='checkBox' id='check_use_shortcuts' name='check_use_shortcuts'></td></tr>"+ 
    7677                                "<tr><td colspan='2'> - " + get_lang('Signature') + "<br>"+ 
    7778                                "<textarea id='txt_signature' name='txt_signature' rows='3' cols='59'></textarea></td>"+ 
     
    8081                                "<td align='left'><input type='button' value='"+get_lang("Save")+"' onclick='prefe.save_form()'>"+ 
    8182                                "</tr>"+ 
    82                                 "</table>";                                                      
     83                                "</table>"; 
    8384                        form_pref.appendChild(form); 
    8485                        var sel_nm = Element("sel_name_box"); 
     
    129130                var txt_signature = Element("txt_signature"); 
    130131                        txt_signature.value = preferences.signature; 
     132                 
     133                if( preferences.use_shortcuts == 1){Element("check_use_shortcuts").checked = true;} 
    131134        } 
    132135         
     
    147150                reload_page = true; 
    148151            else if(preferences.font_size != Element("sel_size_font").value) 
     152                        reload_page = true; 
     153            else if(preferences.use_shortcuts != Element("check_use_shortcuts").checked) 
    149154                        reload_page = true; 
    150155                                 
     
    170175                prefe_string += Element("sel_size_font").value + "##"; 
    171176                preferences.signature = Element("txt_signature").value; 
    172                 prefe_string += url_encode(Element("txt_signature").value); 
     177                prefe_string += url_encode(Element("txt_signature").value) + "##"; 
     178                preferences.check_use_shortcuts = Element("check_use_shortcuts").checked ? 1 : 0; 
     179                prefe_string += Element("check_use_shortcuts").checked ? "1":"0"; 
    173180                 
    174181                var _this = this; 
     
    187194                var params = "prefe_string="+prefe_string; 
    188195                cExecute(args,handler_preferences,params); 
    189          
    190196        }        
    191197        //Fecha a janela 
     
    209215                 
    210216                if(! this.prefeW[div.id]) { 
    211                         div.style.height = is_ie ? "345px" : "355px"; 
     217                        div.style.height = is_ie ? "355px" : "365px"; 
    212218                        div.style.width = "510px"; 
    213219                        div.style.visibility = "hidden"; 
  • trunk/expressoMail1_2/js/search.js

    r118 r128  
    411411                fields += "##"; 
    412412                if(fields == "####"){ 
    413                         alert(get_lang("Define some parameters!")); 
     413                        alert(get_lang("Define some search parameters!")); 
    414414                        return false; 
    415415                } 
     
    474474                        div.style.position = "absolute"; 
    475475                        div.style.zIndex = "10003";                      
    476                         var title = get_lang(":: Search ::"); 
     476                        var title = ":: "+ get_lang("Search")+" ::"; 
    477477                        var wHeight = div.offsetHeight + "px"; 
    478478                        var wWidth =  div.offsetWidth   + "px"; 
  • trunk/expressoMail1_2/js/sharemailbox.js

    r118 r128  
    243243                        div.style.height = "460px"; 
    244244                        div.style.width = "540px"; 
    245                         var title = get_lang(":: Mailbox Sharing ::"); 
     245                        var title = ":: "+get_lang("Mailbox Sharing")+" ::"; 
    246246                        var wHeight = div.offsetHeight + "px"; 
    247247                        var wWidth =  div.offsetWidth   + "px"; 
Note: See TracChangeset for help on using the changeset viewer.