Changeset 7991 for trunk


Ignore:
Timestamp:
03/11/13 18:48:04 (11 years ago)
Author:
cristiano
Message:

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

File:
1 edited

Legend:

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

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