Ignore:
Timestamp:
09/17/12 14:30:47 (12 years ago)
Author:
douglas
Message:

Ticket #0000 - Copiadas as alterações do Trunk. Versão final da 2.4.2.

Location:
branches/2.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.4

  • branches/2.4/prototype/modules/calendar/js/load.js

    r6754 r7228  
    11Refresh = { 
    2     //Tempo em que após a ultima sincronização será verificado atualizações 
     2    //Tempo em que após a ultima sincronização será verificado atualizações 
    33    timeRefresh : 180, 
    44    clookRefresh: false, 
     
    88        delete DataLayer.tasks[this.clookRefresh]; 
    99         
    10         //Realiza agendamentos de atualização de view somente se o módulo aberto for expressoCalendar 
     10        //Realiza agendamentos de atualização de view somente se o módulo aberto for expressoCalendar 
    1111        if(User.moduleName == "expressoCalendar"){ 
    1212            this.clookRefresh = (parseInt(($.now()) / 1000) + this.timeRefresh); 
     
    5454    } 
    5555 
    56     this.calendarIds = [], this.signatureOf = {}, this.calendars = [], this.calendarOf= {}; 
     56    this.calendarIds = [], this.groupIds = [], this.signatureOf = {}, this.calendars = [], this.groups = [], this.calendarOf = {}, this.groupOf= {}; 
    5757 
    5858    for( var i = 0; i < this.signatures.length; i++ ){ 
    5959        if(this.signatures[i].isOwner == "0") 
    6060            this.signatures[i].permission =  DataLayer.encode('calendarToPermission:detail', this.signatures[i].permission); 
    61         this.signatureOf[ this.calendarIds[i] = ( this.calendars[ this.calendars.length ] = this.calendarOf[ this.signatures[i].id ] = this.signatures[i].calendar ).id ] = this.signatures[i]; 
     61 
     62        if(this.signatures[i].calendar.type == '1') 
     63           this.signatureOf[ this.groupIds[this.groupIds.length] = ( this.groups[ this.groups.length ] = this.groupOf[ this.signatures[i].id ] = this.signatures[i].calendar ).id ] = this.signatures[i]; 
     64        else 
     65           this.signatureOf[ this.calendarIds[ this.calendarIds.length] = ( this.calendars[ this.calendars.length ] = this.calendarOf[ this.signatures[i].id ] = this.signatures[i].calendar ).id ] = this.signatures[i]; 
    6266    } 
    6367 
     
    6771 
    6872    rerenderView: function(force){ 
    69         //TODO - Remover if quando centralizar o objeto User que contem as informações do usuário logado em um local acessível a todos módulos 
     73        //TODO - Remover if quando centralizar o objeto User que contem as informações do usuário logado em um local acessível a todos módulos 
    7074        if(User.moduleName == "expressoCalendar"){ 
    7175            if((typeof($tabs) != "undefined") && $tabs.tabs('option' ,'selected') == 0){ 
     
    8993                contentMenu(); 
    9094            }else if((typeof($tabs) != "undefined") && $tabs.tabs('option' ,'selected') != 0) 
    91                 pageselectCallback($('.events-list-win.active [name=keyword]').val(), 0); 
     95                                 
     96                pageselectCallback($('.events-list-win.active [name=keyword]').val(), 0, false, ($tabs.tabs('option' ,'selected') > 2) ? 2 : ($tabs.tabs('option' ,'selected') == 1) ? 0 : 1); 
    9297        } 
    9398    } 
    9499} 
    95100 
    96 Alarms = { 
    97     load: function(){ 
    98         var eventsDay = DataLayer.get('alarm:schedulable',['=', 'date', Date.today().getTime()]); 
    99         if(eventsDay) 
    100         for(var i = 0; i < eventsDay.length; i++){ 
    101             this.addAlarm( eventsDay[i] ); 
    102         } 
    103     }, 
    104          
    105     addAlarm: function( eventDay ){             
    106         if(!DataLayer.tasks[parseInt(eventDay.sendTime)]){ 
    107             DataLayer.task( parseInt(eventDay.sendTime) , function( timestamp ){ 
    108                 var path = User.moduleName == 'expressoCalendar' ? '' : '../prototype/modules/calendar/'; 
    109                 DataLayer.render(path+'templates/alarm.ejs',{ 
    110                     event: eventDay 
    111                 }, function( html ){                                 
    112                     $.Zebra_Dialog(html , { 
    113                         'type':     'question', 
    114                         'overlay_opacity': '0.5', 
    115                         'buttons':  ['Fechar'], 
    116                         'onClose':  function(clicked) {} 
    117                     }); 
    118                 }); 
    119             }); 
    120         } 
    121     } 
    122 } 
    123  
    124101Calendar.load(); 
    125 Alarms.load(); 
Note: See TracChangeset for help on using the changeset viewer.