Changeset 6533 for trunk/prototype
- Timestamp:
- 06/18/12 12:26:38 (12 years ago)
- Location:
- trunk/prototype/modules/calendar
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/modules/calendar/interceptors/DBMapping.php
r6528 r6533 149 149 .'(range_start >= \'' . $start[1] . '\' AND range_start <= \'' . $end[1] . '\') OR ' 150 150 .'(range_start <= \'' . $start[2] . '\' AND range_end >= \'' . $end[2] . '\')) ' 151 .(!empty($ids) ? ' ' .'AND calendar_object.id NOT IN (\'' . implode('\',\'', $ids) . '\') ' : ' '); 152 151 .(!empty($ids) ? ' ' .'AND calendar_object.id NOT IN (\'' . implode('\',\'', $ids) . '\') ' : ' ') 152 .'AND calendar_object.dtstart NOT IN (SELECT calendar_repeat_occurrence.occurrence from calendar_repeat_occurrence, ' 153 .'calendar_repeat where (calendar_repeat_occurrence.repeat_id = calendar_repeat.id) ' 154 .'AND (calendar_repeat.object_id = calendar_object.id))'; 153 155 154 156 $params = Controller::service('PostgreSQL')->execResultSql($sql.$where); … … 206 208 //Recurepa as execeções anteriores caso exista 207 209 if (isset($lastExceptions) && count($lastExceptions) && $lastExceptions) 208 foreach ($lastExceptions as $ key => $value)209 array_push($exceptions, $ lastExceptions[$key]['occurrence']);210 foreach ($lastExceptions as $value) 211 array_push($exceptions, $value['occurrence']); 210 212 211 213 $params = array_diff(self::decodeRepeat($repeat, $ranges[0]['rangeStart'], $ranges[0]['rangeEnd']), $exceptions); … … 215 217 if (!empty($params)) 216 218 Controller::service('PostgreSQL')->execResultSql("INSERT INTO calendar_repeat_occurrence(repeat_id,exception,occurrence)VALUES('" . $id . "','0','" . implode("'),('" . $id . "','0','", $params) . "')" . ( empty($exceptions) ? "" : ",('" . $id . "','1','" . implode("'),('" . $id . "','1','", $exceptions) . "')" )); 217 } 219 else if(!empty($exceptions)) 220 Controller::service('PostgreSQL')->execResultSql("INSERT INTO calendar_repeat_occurrence(repeat_id,exception,occurrence)VALUES ('" . $id . "','1','" . implode("'),('" . $id . "','1','", $exceptions) . "')" ); 221 } 218 222 219 223 public function checkOccurrences($start, $end, $calendarIds) { -
trunk/prototype/modules/calendar/js/calendar.codecs.js
r6476 r6533 643 643 var formatString = User.preferences.dateFormat + " " + User.preferences.hourFormat; 644 644 645 patati['startTime'] = Date.parseExact( form.startDate + " "+$.trim(form.startHour) , formatString ).toString(!!form.allDay ? 'yyyy-MM-dd 00:00:00' : 'yyyy-MM-dd HH:mm:00'); 645 var date = Date.parseExact( form.startDate + " "+$.trim(form.startHour) , formatString ) 646 647 patati['startTime'] = date.toString(!!form.allDay ? 'yyyy-MM-dd 00:00:00' : 'yyyy-MM-dd HH:mm:00'); 646 648 647 649 if( !patati['byday'] ) -
trunk/prototype/modules/calendar/js/calendar.contentMenu.js
r6451 r6533 26 26 var schedulable = DataLayer.get('schedulable', idEvent); 27 27 28 var isRecurrence = DataLayer.get('repeat', schedulable.repeat).frequency; 29 30 var top; 31 var elementId = document.getElementById("divAppbox"); 32 33 top = elementId.scrollTop; 34 28 var isRecurrence = DataLayer.get('repeat', schedulable.repeat).frequency || false; 29 30 var top = $('#divAppbox').scrollTop(); 31 35 32 var template = DataLayer.render( 'templates/menu_context_event.ejs', {event: schedulable.id , 36 33 top: (event.clientY - 135 + top), left: (event.clientX - 445), 37 38 calendars: Calendar.calendars, isRecurrence: isRecurrence == 'none'? false : true,34 signature: Calendar.signatureOf[idCalendar], 35 calendars: Calendar.calendars, isRecurrence: (!isRecurrence || isRecurrence == 'none') ? false : true, 39 36 idRecurrence: idRecurrence 40 37 }); 41 38 42 39 $('#context-menu-event').html(template); 43 40 44 41 var method = function(value){ 45 42 switch (value){
Note: See TracChangeset
for help on using the changeset viewer.