Changeset 5746 for trunk/prototype/modules/calendar/js/calendar.codecs.js
- Timestamp:
- 03/18/12 15:07:09 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/modules/calendar/js/calendar.codecs.js
r5737 r5746 75 75 borderColor: '#' + signature.borderColor || User.preferences.borderColor, 76 76 textColor: '#' + signature.fontColor || User.preferences.fontColor, 77 className: 'calendar-' + signature.calendar.id,78 77 editable: signature.isOwner } 79 78 }); … … 179 178 180 179 if(force){ 181 delete Calendar.currentViewKey; 180 delete Calendar.currentViewKey; 181 182 182 $('#calendar').fullCalendar( 'refetchEvents' ); 183 183 } … … 189 189 190 190 $('#calendar').fullCalendar( 'refetchEvents' ); 191 192 contentMenu(); 191 193 } 192 194 } … … 271 273 DataLayer.commit( false, false, function(){ 272 274 if((typeof($tabs) != "undefined") && $tabs.tabs('option' ,'selected') == 0){ 273 Calendar.rerenderView(true); 274 contentMenu(); 275 Calendar.rerenderView(true); 275 276 }else if((typeof($tabs) != "undefined") && $tabs.tabs('option' ,'selected') != 0) 276 277 pageselectCallback($('.events-list-win.active [name=keyword]').val(), 0); … … 603 604 return(null); 604 605 605 var attend = DataLayer.get('participant', participant);606 var attend = DataLayer.get('participant', (participant.id || participant)); 606 607 attend.user = DataLayer.get('user', attend.user); 607 608 … … 612 613 id: attend.id, 613 614 status : attend.status, 614 delegatedFrom: attend.delegatedFrom ,615 delegatedFrom: attend.delegatedFrom || '0', 615 616 acl: attend.acl, 616 617 receiveNotification : attend.receiveNotification, … … 947 948 var calendar = DataLayer.get('calendar', evt.calendar); 948 949 949 var eventEditable = function(idEvent, isRecurrence ){950 var eventEditable = function(idEvent, isRecurrence, Recurrence){ 950 951 if(Calendar.signatureOf[calendar.id].isOwner == "1"){ 951 952 var attendee = {}; … … 953 954 attendee = DataLayer.get('participant', evt.participants[i]); 954 955 if(attendee.user == User.me.id) 955 return (attendee.acl.indexOf('w') >= 0 || attendee.acl.indexOf('o') >= 0 ) ? {selectable: true, className: 'fullcalendar-context-menu event-id-'+idEvent , editable: !isRecurrence} : { editable: false, selectable: true ,className: 'blocked-event-permision fullcalendar-not-context-menu event-id-'+idEvent};956 return (attendee.acl.indexOf('w') >= 0 || attendee.acl.indexOf('o') >= 0 ) ? {selectable: true, className: 'fullcalendar-context-menu event-id-'+idEvent+ (isRecurrence ? ' isRecurrence Recurrence-id-'+Recurrence : '')} : { editable: false, selectable: true ,className: 'blocked-event-permision fullcalendar-not-context-menu event-id-'+idEvent}; 956 957 } 957 958 return {editable: false, className: 'blocked-event-permision fullcalendar-not-context-menu event-id-'+idEvent, selectable: true, disableDragging: isRecurrence }; … … 963 964 var returns = "" 964 965 returns += acl['write'] ? "" : 'blocked-event-permision '; 965 returns += acl['busy'] ? 'fullcalendar-not-context-menu ' : (acl['read'] ? 'fullcalendar-context-menu ' : '');966 returns += acl['busy'] ? 'fullcalendar-not-context-menu ' : (acl['read'] ? 'fullcalendar-context-menu '+ idEvent + (isRecurrence ? ' isRecurrence Recurrence-id-'+Recurrence : '') : ''); 966 967 returns += 'event-id-'+idEvent; 967 968 return returns; … … 992 993 993 994 for( var i = 0; i < occurrences.length; i++ ) 994 grouped[ evt.calendar ].push( DataLayer.merge({ id: evt.URI || evt.id, 995 title: Encoder.htmlDecode(evt.summary), 996 start: Timezone.getDateCalendar(new Date( parseInt( occurrences[i] ) ), calendar.timezone, !!evt.DayLigth ? evt.DayLigth.calendar.startTime : Timezone.daylightSaving), 997 end: Timezone.getDateCalendar(new Date( parseInt( occurrences[i] ) + duration - (!!parseInt(evt.allDay) ? 86400000 : 0)), calendar.timezone, !!evt.DayLigth ? evt.DayLigth.calendar.startTime : Timezone.daylightSaving), 998 allDay: parseInt( evt.allDay ) }, eventEditable(evt.id, isRepeat ) ) ); 995 grouped[ evt.calendar ].push( DataLayer.merge({ id: evt.URI || evt.id+ '-' + i, 996 title: Encoder.htmlDecode(evt.summary), 997 start: Timezone.getDateCalendar(new Date( parseInt( occurrences[i] ) ), calendar.timezone, !!evt.DayLigth ? evt.DayLigth.calendar.startTime : Timezone.daylightSaving), 998 end: Timezone.getDateCalendar(new Date( parseInt( occurrences[i] ) + duration - (!!parseInt(evt.allDay) ? 86400000 : 0)), calendar.timezone, !!evt.DayLigth ? evt.DayLigth.calendar.startTime : Timezone.daylightSaving), 999 allDay: parseInt( evt.allDay ), 1000 isRepeat: isRepeat, 1001 occurrence: i }, eventEditable(evt.id, isRepeat, i ) ) ); 999 1002 }); 1000 1003
Note: See TracChangeset
for help on using the changeset viewer.