Changeset 7597


Ignore:
Timestamp:
12/04/12 08:21:09 (7 years ago)
Author:
acoutinho
Message:

Ticket #3212 - Problema com criação de eventos em conta compartilhada

Location:
trunk/prototype/modules/calendar/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/modules/calendar/js/calendar.codecs.js

    r7579 r7597  
    567567         
    568568        var delegateAttendee = {}; 
     569 
     570        var myCalendar = function(){ 
     571                for(var i in Calendar.signatures) 
     572                if(Calendar.signatures[i].isOwner == "1" && Calendar.signatures[i].type == "0") 
     573                                return Calendar.signatures[i].calendar.id; 
     574        } 
    569575         
    570576        for( var i = 0; i < statusLabels.length; i++ ) 
     
    577583 
    578584            var isAttendee = false; 
     585 
     586 
     587            objEvent.calendar = !!objEvent.calendar ? objEvent.calendar : (User.preferences.defaultCalendar ? User.preferences.defaultCalendar : myCalendar()); 
     588 
    579589            var Owner = decodeOwnerCalendar(objEvent.calendar); 
    580590 
  • trunk/prototype/modules/calendar/js/helpers.js

    r7457 r7597  
    539539var calendar = DataLayer.get('calendar', objEvent.calendar); 
    540540                                 
    541 if (calendar.timezone != objEvent.timezone){ 
     541if ( (calendar.timezone != objEvent.timezone) && objEvent.id){ 
    542542    UI.dialogs.addEvent.find('.calendar-addevent-details-txt-timezone').find('option[value="'+objEvent.timezone+'"]').attr('selected','selected').trigger('change'); 
    543543    UI.dialogs.addEvent.find('.calendar_addevent_details_lnk_timezone').addClass('hidden'); 
Note: See TracChangeset for help on using the changeset viewer.