Changeset 7992 for branches


Ignore:
Timestamp:
03/11/13 18:55:17 (11 years ago)
Author:
douglas
Message:

Ticket #3382 - Travamento do navegador ao carregar repetições com muitos participantes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/prototype/modules/calendar/js/helpers.js

    r7985 r7992  
    186186    {  
    187187        $.each(objEvent.participants ,function(index, value) {  
     188 
    188189            var part = DataLayer.get('participant' , value );  
    189190            var user = DataLayer.get('user' , part.user );  
     
    28442845} 
    28452846 
    2846 function copyAndMoveTo(calendar, event, idRecurrence, type, evt){ 
     2847function copyAndMoveTo(calendar, event, idRecurrence, type, evt ){ 
    28472848    /* 
    28482849     * Types 
     
    29282929        delete schedulable['historic']; 
    29292930 
    2930         schedulable.participants =  $.map( participants, function( attendee, i ){ 
    2931                          
    2932             var participant = DataLayer.get('participant', attendee, false); 
    2933                          
    2934             if(typeof(participant) == 'array') 
    2935                     participant = participant[0]; 
    2936  
    2937         if(owner.id != participant.user) 
    2938             delete participant.status; 
    2939          
    2940             delete participant.delegatedFrom; 
    2941             delete participant.id; 
    2942             delete participant.schedulable; 
    2943                          
    2944             participant.id = DataLayer.put('participant', participant); 
    2945                          
    2946             return participant ; 
    2947         }); 
     2931    if(parseInt(type) == 3){  
     2932        schedulable.participants = participants;  
     2933    }  
     2934    else  
     2935    {  
     2936        schedulable.participants =  $.map( participants, function( attendee, i ){  
     2937  
     2938            var participant = DataLayer.get('participant', attendee, false);  
     2939  
     2940            if(typeof(participant) == 'array')  
     2941                participant = participant[0];  
     2942  
     2943            if(owner.id != participant.user)  
     2944                delete participant.status;  
     2945  
     2946            delete participant.delegatedFrom;  
     2947            delete participant.id;  
     2948            delete participant.schedulable;  
     2949  
     2950            participant.id = DataLayer.put('participant', participant);  
     2951  
     2952            return participant ;  
     2953        });  
     2954    }  
     2955  
    29482956        //Edit ocurrence 
    29492957        if(parseInt(type) == 3){ 
Note: See TracChangeset for help on using the changeset viewer.