Changeset 7228 for branches/2.4/prototype/modules/calendar/js/load.js
- Timestamp:
- 09/17/12 14:30:47 (12 years ago)
- Location:
- branches/2.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.4
- Property svn:mergeinfo changed
-
branches/2.4/prototype/modules/calendar/js/load.js
r6754 r7228 1 1 Refresh = { 2 //Tempo em que ap ós a ultima sincronização será verificado atualizações2 //Tempo em que após a ultima sincronização será verificado atualizações 3 3 timeRefresh : 180, 4 4 clookRefresh: false, … … 8 8 delete DataLayer.tasks[this.clookRefresh]; 9 9 10 //Realiza agendamentos de atualiza ção de view somente se o módulo aberto for expressoCalendar10 //Realiza agendamentos de atualização de view somente se o módulo aberto for expressoCalendar 11 11 if(User.moduleName == "expressoCalendar"){ 12 12 this.clookRefresh = (parseInt(($.now()) / 1000) + this.timeRefresh); … … 54 54 } 55 55 56 this.calendarIds = [], this. signatureOf = {}, this.calendars = [], this.calendarOf= {};56 this.calendarIds = [], this.groupIds = [], this.signatureOf = {}, this.calendars = [], this.groups = [], this.calendarOf = {}, this.groupOf= {}; 57 57 58 58 for( var i = 0; i < this.signatures.length; i++ ){ 59 59 if(this.signatures[i].isOwner == "0") 60 60 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]; 62 66 } 63 67 … … 67 71 68 72 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ódulos73 //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 70 74 if(User.moduleName == "expressoCalendar"){ 71 75 if((typeof($tabs) != "undefined") && $tabs.tabs('option' ,'selected') == 0){ … … 89 93 contentMenu(); 90 94 }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); 92 97 } 93 98 } 94 99 } 95 100 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: eventDay111 }, 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 124 101 Calendar.load(); 125 Alarms.load();
Note: See TracChangeset
for help on using the changeset viewer.