Changeset 6331 for trunk/prototype/modules/calendar/js/calendar.codecs.js
- Timestamp:
- 05/28/12 21:17:51 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/modules/calendar/js/calendar.codecs.js
r6300 r6331 153 153 delete DataLayer.tasks[this.clookRefresh]; 154 154 155 this.clookRefresh = (parseInt(($.now()) / 1000) + this.timeRefresh); 156 157 DataLayer.task( this.clookRefresh , function(){ 158 Calendar.rerenderView(true); 159 }); 160 155 //Realiza agendamentos de atualização de view somente se o módulo aberto for expressoCalendar 156 if(User.moduleName == "expressoCalendar"){ 157 this.clookRefresh = (parseInt(($.now()) / 1000) + this.timeRefresh); 158 159 DataLayer.task( this.clookRefresh , function(){ 160 Calendar.rerenderView(true); 161 }); 162 } 161 163 } 162 164 } … … 516 518 var pref = User.preferences; 517 519 518 var Owner = decodeOwnerCalendar(evtObj .calendar);520 var Owner = decodeOwnerCalendar(evtObj[0].calendar); 519 521 520 522 var res = $.map(evtObj, function( form ){ 521 523 522 return {524 return DataLayer.merge({ 523 525 id: form.idEvent, 524 calendar: form.calendar,525 526 participants : $.map(form.attendee, function( attendee, i ){ 526 527 if(isNaN(attendee)){ … … 536 537 if(DataLayer.get('participant', attendee).user == Owner.id){ 537 538 var me = { 538 user: User.id,539 user: Owner.id, 539 540 status: form.status, 540 541 id: attendee, … … 580 581 }; 581 582 }) 582 } 583 }, (Owner.id == User.me.id) ? (form.calendar != form.lastCalendar ? {calendar: form.calendar, lastCalendar: form.lastCalendar} : {}) : {}) 583 584 }); 584 585 return notArray ? res[0] : res; … … 641 642 attachments: $.map(objEvent.attachments || [], function( attachment, i ){ 642 643 var attach = DataLayer.get('schedulableToAttachment', attachment, false); 643 //TODO - Verificar na API retorno de id sobre os conceitos em que s ão utilizados tabelas de ligação644 //TODO - Verificar na API retorno de id sobre os conceitos em que s?o utilizados tabelas de liga??o 644 645 if(!attach.name) return(null); 645 646 … … 838 839 var Owner = decodeOwnerCalendar(form.calendar); 839 840 840 return {841 return DataLayer.merge({ 841 842 "class": form["class"], 842 843 startTime: Date.parseExact(form.startDate + (!!form.allDay ? " 00:00": " "+$.trim(form.startHour)) , formatString ).toString('yyyy-MM-dd HH:mm:00'), … … 846 847 location: form.location, 847 848 category: form.category, 848 calendar: form.calendar,849 849 summary: form.summary, 850 850 description: form.description, … … 901 901 }; 902 902 }) 903 } ;903 }, form.lastCalendar ? (( form.lastCalendar == form.calendar ) ? {} : {calendar: form.calendar, lastCalendar: form.lastCalendar}) : {calendar: form.calendar}); 904 904 }); 905 905
Note: See TracChangeset
for help on using the changeset viewer.