Ignore:
Timestamp:
06/02/12 17:33:39 (12 years ago)
Author:
acoutinho
Message:

Ticket #2831 - Implementação ao suporte a repetição de eventos

Location:
trunk/prototype/modules/calendar
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/modules/calendar/interceptors/DBMapping.php

    r6369 r6393  
    261261            Controller::begin(array('service' => 'PostgreSQL')); 
    262262 
    263             foreach ($result as $id => $res) 
    264                 Controller::service('PostgreSQL')->execResultSql("INSERT INTO calendar_repeat_occurrence(repeat_id,occurrence)VALUES('" . $id . "','" . implode("'),('" . $id . "', '", $res) . "')"); 
    265  
     263            foreach ($result as $id => $res){ 
     264                 
     265                $ocurrences = array_unique($res); 
     266                Controller::service('PostgreSQL')->execResultSql("INSERT INTO calendar_repeat_occurrence(repeat_id,occurrence)VALUES('" . $id . "','" . implode("'),('" . $id . "', '", $ocurrences) . "')"); 
     267            } 
    266268            $data = array(); 
    267269 
  • trunk/prototype/modules/calendar/js/helpers.js

    r6371 r6393  
    14111411 
    14121412        if(!!data.result && data.result != "[]"){ 
    1413             var newAttach = jQuery.parseJSON(data.result); 
     1413            var newAttach = (attch = jQuery.parseJSON(data.result)) ? attch : jQuery.parseJSON(data.result[0].activeElement.childNodes[0].data); 
    14141414            $('.attachment-list').append('<input tyepe="hidden" name="attachment[]" value="'+newAttach['attachment'][0][0].id+'"/>'); 
    14151415            currentUpload.removeClass('on-complete').parents('p') 
     
    14211421}); 
    14221422$('.attachments-list .button').button(); 
    1423                          
     1423 
     1424if(!!window.FormData)                    
    14241425$('#fileupload').bind('fileuploadstart', function () { 
    14251426    var widget = $(this), 
  • trunk/prototype/modules/calendar/templates/alarms_add_itemlist.ejs

    r5652 r6393  
    66                                <option value="alert" <%= data.alarm.defaultAlarms[i].type=='alert' ? 'selected="selected"':'' %>>Alerta</option> 
    77                                <option value="mail" <%= data.alarm.defaultAlarms[i].type=='mail' ? 'selected="selected"':'' %>>E-mail</option> 
    8                                 <option value="sms" <%= data.alarm.defaultAlarms[i].type=='sms' ? 'selected="selected"':'' %>>SMS</option> 
     8                                <!--<option value="sms" <%= data.alarm.defaultAlarms[i].type=='sms' ? 'selected="selected"':'' %>>SMS</option>--> 
    99                        </select> 
    1010                        <input type="text" name="alarmTime[]" class="number input-small" value="<%= data.alarm.defaultAlarms[i].time %>"/> 
  • trunk/prototype/modules/calendar/templates/event_add.ejs

    r6369 r6393  
    99                                <input type="hidden" class="id-event" name="idEvent" value="<%= data.event.id %>"/> 
    1010                        <% } %> 
    11                         <% if( data.event.calendar ){ %> 
     11                        <% if( data.event.id && data.event.calendar ){ %> 
    1212                                <input type="hidden" class="last-calendar" name="lastCalendar" value="<%= data.event.calendar %>"/> 
    1313                        <% } %> 
Note: See TracChangeset for help on using the changeset viewer.