Ignore:
Timestamp:
05/21/08 16:56:17 (16 years ago)
Author:
rafaelraymundo
Message:

Vide Trac - #197, #166, #198, #199

  1. Correção de problema na leitura do arquivo configuração.
  2. Permissão do click2dial também no contactcenter.
  3. Visualização de matricula, e nro celular no resultado da pesquisa(se estiverem populados)
  4. Adicionada a leitura a Catálogos Externos
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/contactcenter/js/ccMain.js

    r119 r284  
    1 var last_id = 0;         
    2  
    3 function openwindow(url){        
    4         var window_features =   "scrollbars=yes,resizable=yes,location=no,menubar=no," +  
    5                                                 "personalbar=no,status=no,titlebar=no,toolbar=no," +  
    6                                                 "screenX=0,screenY=0,top=0,left=0,width=" +  
    7                                                 screen.width + ",height=" + screen.height/5*3;  
    8                          
    9         window.open(url,'', window_features);  
     1var last_id = 0; 
     2 
     3function openwindow(url){ 
     4        var window_features =   "scrollbars=yes,resizable=yes,location=no,menubar=no," + 
     5                                                "personalbar=no,status=no,titlebar=no,toolbar=no," + 
     6                                                "screenX=0,screenY=0,top=0,left=0,width=" + 
     7                                                screen.width + ",height=" + screen.height/5*3; 
     8 
     9        window.open(url,'', window_features); 
    1010} 
    1111 
    1212var Main_pre_load = document.body.onload; 
    1313var ccSearch, ccTree; 
    14 var Main_load = function ()  
    15         {        
     14var Main_load = function () 
     15        { 
    1616                Connector.setProgressBox(Element('cc_loading'), true); 
    17                 Connector.setProgressHolder(Element('cc_loading_inner'));                
     17                Connector.setProgressHolder(Element('cc_loading_inner')); 
    1818                /* Associate the Quick Add Button with the Plugin */ 
    19                                          
     19 
    2020 
    2121                /* Create the Search Object */ 
     
    3737                ccSearch.DOMresult.style.visibility = 'hidden'; 
    3838                ccSearch.onSearchFinish = ccSearchUpdate; 
    39                          
     39 
    4040                Connector.setProgressBox(Element('cc_loading'), true); 
    4141                Connector.setProgressHolder(Element('cc_loading_inner')); 
    42                          
     42 
    4343                /* Create the Tree Object */ 
    44                 ccTree = new ccCatalogTree({name: 'ccTree', id_destination: 'cc_tree', afterSetCatalog: 'ccSearchHidePanel(); updateCards()'}); 
     44                //ccTree = new ccCatalogTree({name: 'ccTree', id_destination: 'cc_tree', afterSetCatalog: 'ccSearchHidePanel(); updateCards()'}); 
     45                ccTree = new ccCatalogTree({name: 'ccTree', id_destination: 'cc_tree', afterSetCatalog: 'ccSearchHidePanel(); clearCards();'}); 
    4546 
    4647                ccTree.Connector = Connector; 
     
    6465        var _timeout = ''; 
    6566        var menu = function () { 
    66                   
     67 
    6768         if(! this.menuStarted) 
    6869                this.menuStarted = true; 
    69                  
     70 
    7071                submenu = []; 
    7172                textmenu = []; 
    72                          
     73 
    7374                textmenu[0] = ["cc_msg_contact_qa","cc_msg_contact_full","cc_msg_group"] 
    74                 textmenu[1] = ["cc_quick_add", "cc_full_add", "cc_add_group"];           
     75                textmenu[1] = ["cc_quick_add", "cc_full_add", "cc_add_group"]; 
    7576                function show(){ 
    7677                        clearTimeout(_timeout); 
    7778                        button = document.getElementById("cc_button_new"); 
    78                                  
    79                         this.style.top = 19 + findPosY(button) + "px";  
    80                         this.style.visibility='visible';  
     79 
     80                        this.style.top = 19 + findPosY(button) + "px"; 
     81                        this.style.visibility='visible'; 
    8182                } 
    8283                function hide(){ _timeout = setTimeout("menu.style.visibility='hidden';",200); }; 
    83                          
     84 
    8485                if(document.getElementById) { 
    8586                        menu = document.getElementById("Layer1"); 
    86                                  
     87 
    8788                        for (i=0; i< textmenu[0].length; i++) { 
    8889                                textmenu[0][i] = "<span onclick= 'menu.onmouseout();'>" + document.getElementById(textmenu[0][i]).value + "</span><br>"; 
    89                                 submenu[i] = document.createElement("DIV");                              
     90                                submenu[i] = document.createElement("DIV"); 
    9091                                submenu[i].innerHTML = textmenu[0][i]; 
    9192                                submenu[i].id = textmenu[1][i]; 
    9293                                submenu[i].onmouseover = function () {this.style.backgroundColor = 'LIGHTYELLOW';this.style.color = 'DARKBLUE';}; 
    93                                 submenu[i].onmouseout   = function () {  this.style.backgroundColor = '#DCDCDC'; this.style.color = '#006699';};                                         
     94                                submenu[i].onmouseout   = function () {  this.style.backgroundColor = '#DCDCDC'; this.style.color = '#006699';}; 
    9495                                submenu[i].setAttribute("className", "special"); 
    9596                                submenu[i].setAttribute("class", "special"); 
    96                                 submenu[i].style.padding = "5px";                                          
     97                                submenu[i].style.padding = "5px"; 
    9798                                menu.appendChild(submenu[i]); 
    98                         }                        
    99                                  
     99                        } 
     100 
    100101                        menu.onmouseover = show; 
    101102                        menu.onmouseout = hide; 
    102103                } 
    103                          
     104 
    104105                ccQuickAdd.associateAsButton(Element('cc_quick_add')); 
    105106                ccAddGroup.associateAsButton(Element('cc_add_group')); 
    106107                document.getElementById("cc_full_add").onclick= newContact; 
    107                           
    108                          
     108 
     109 
    109110                ccQuickAdd.afterSave = function () 
    110111                { 
    111112                        updateCards(); 
    112                 }                        
    113                          
    114                 ccAddGroup.load = function ()  
    115                 {                                
    116                         editGroup();                     
    117                 } 
    118                          
     113                } 
     114 
     115                ccAddGroup.load = function () 
     116                { 
     117                        editGroup(); 
     118                } 
     119 
    119120                ccAddGroup.afterSave = function () 
    120121                { 
    121122                        updateCards(); 
    122123                } 
    123                          
     124 
    124125                return true; 
    125126        } 
     
    127128        if (is_ie) 
    128129        { 
    129                          
     130 
    130131                document.body.onload = function (e) 
    131                 {                        
    132                         Main_pre_load();                                                                 
    133                         Main_load();                                     
    134                                                                  
     132                { 
     133                        Main_pre_load(); 
     134                        Main_load(); 
     135 
    135136                } 
    136137        } 
    137138        else 
    138         {                
    139                 Main_load();     
    140                          
    141         }        
     139        { 
     140                Main_load(); 
     141 
     142        } 
    142143 
    143144// BEGIN: FUNCTION RESIZE WINDOW 
     
    156157showBar = __showBar; 
    157158hideBar = __hideBar; 
    158          
     159 
    159160var _onResize   = window.onresize; 
    160161window.onresize = resizeWindow; 
    161162var defaultHeight = 0; 
    162163function setDefaultHeight(){ 
    163          
     164 
    164165        var bar = Element("toolbar"); 
    165166        var offset = 0; 
    166         if(bar.style.visibility != 'hidden')  
    167                 offset = (bar.offsetHeight ? bar.offsetHeight :  bar.clientHeight);      
     167        if(bar.style.visibility != 'hidden') 
     168                offset = (bar.offsetHeight ? bar.offsetHeight :  bar.clientHeight); 
    168169 
    169170        var screenHeight = document.body.clientHeight ? document.body.clientHeight : document.body.offsetHeight; 
    170         defaultHeight = screenHeight - offset;   
    171         Element("cc_tree").style.height                 = defaultHeight - 68;    
    172         Element("cc_left_main").style.height    = defaultHeight - 68;    
     171        defaultHeight = screenHeight - offset; 
     172        Element("cc_tree").style.height                 = defaultHeight - 68; 
     173        Element("cc_left_main").style.height    = defaultHeight - 68; 
    173174} 
    174175 
     
    176177        setDefaultHeight(); 
    177178        if(Element("divScrollMain")) 
    178                 Element("divScrollMain").style.height   = defaultHeight - 108;   
     179                Element("divScrollMain").style.height   = defaultHeight - 108; 
    179180        if (!is_ie) 
    180181                Element('tableDivAppbox').width = '100%'; 
     
    184185setDefaultHeight(); 
    185186Element('cc_main').style.height = defaultHeight; 
    186 var lang_warn_firefox = Element('cc_msg_warn_firefox'); 
    187 var lang_firefox_msg1 = Element('cc_msg_firefox_half1'); 
    188 var lang_firefox_msg2 = Element('cc_msg_firefox_half2'); 
    189 var lang_install_now = Element('cc_msg_install_now'); 
    190 var lang_install_new_firefox = Element('cc_msg_install_new_firefox'); 
    191 var lang_close = Element('cc_msg_close'); 
    192187function buildWarningMsg(_version) { 
    193188        var screenWidth = document.body.clientWidth ? document.body.clientWidth: document.body.offsetWidth; 
     
    196191        "border:1px solid black;left:"+(screenWidth - 330)+";top:10px;width:300px;padding:10px;"+ 
    197192        (document.body.clientWidth ? "-moz-border-radius: 9px 9px 9px 9px;'>" : "")+ 
    198             "<font color='RED' size='2'>"+lang_warn_firefox +  "("+_version+")</font><BR>"+ 
    199             "<font color='black' size='2'><p style='text-align:justify'>&nbsp;"+lang_firefox_msg1+ 
    200             lang_firefox_msg2 + ".</p></font><div style='width:100%' align='center'>"+ 
    201             "<a title='"+lang_install_now+"' href='http://br.mozdev.org/firefox/download.html' target='_blank'>"+lang_install_new_firefox+ "</a>"+       
     193        "<font color='RED' size='2'>Aviso: Versão muito antiga do Firefox ("+_version+")</font><BR>"+ 
     194        "<font color='black' size='2'><p style='text-align:justify'>&nbsp;Para que essa aplicação funcione <u>corretamente</u> "+ 
     195        "é necessário atualizar o seu navegador Firefox para uma versão mais nova (versão > 1.5). "+ 
     196        "Instale agora clicando no link abaixo ou caso queira atualizar mais tarde (não recomendável), clique em Fechar.</p></font><div style='width:100%' align='center'>"+ 
     197        "<a title='Instalar agora' href='http://br.mozdev.org/firefox/download.html' target='_blank'>Instalar nova versão do Firefox</a>"+ 
    202198        "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+ 
    203             "<a title='"+lang_close+"' href='javascript:void(0)' onclick='javascript:myOpacity.toggle()'>"+lang_close+"</a></div>"+ 
    204  
     199        "<a title='Fechar' href='javascript:void(0)' onclick='javascript:myOpacity.toggle()'>Fechar</a></div>"+ 
    205200        "</DIV>"; 
    206201 
     
    208203 
    209204        myOpacity = new fx.Opacity('warning_msg', {duration: 600}); 
    210         document.getElementById("warning_msg").style.visibility = 'hidden';              
     205        document.getElementById("warning_msg").style.visibility = 'hidden'; 
    211206        myOpacity.now = 0; 
    212207        setTimeout("myOpacity.toggle()",3000); 
Note: See TracChangeset for help on using the changeset viewer.