Changeset 6599


Ignore:
Timestamp:
06/25/12 11:10:16 (12 years ago)
Author:
acoutinho
Message:

Ticket #2899 - Problema ao criar um evento de uma mensagem

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/js/draw_api.js

    r6592 r6599  
    30433043                                        location: '', 
    30443044                                        attendee: $.map(emails, function( mail ){                        
    3045                                                  
     3045                                                var contact = false; 
    30463046                                                var decoded =  Encoder.htmlDecode(mail); 
    30473047                                                var newAttendeeName = ""; 
    30483048 
    3049                                                 var user = DataLayer.get('user', ["=", "mail", decoded.match(/<([^<]*)>[\s]*$/) ? decoded.match(/<([^<]*)>[\s]*$/)[1].toLowerCase() : decoded], true); 
     3049                                                var name = decoded.match(/"([^"]*)"/) ? decoded.match(/"([^"]*)"/)[1] : ''; 
     3050                                                var mail = decoded.match(/<([^<]*)>[\s]*$/) ? decoded.match(/<([^<]*)>[\s]*$/)[1].toLowerCase() : decoded;  
     3051 
     3052 
     3053                                                var user = DataLayer.get('user', ["=", "mail", mail], true); 
    30503054                                                 
    30513055                                                if( $.type(user) == "array") 
    30523056                                                    user = user[0]; 
    30533057 
    3054                                                 if(typeof(user) != 'object') 
     3058                                                if(user != ''){ 
     3059                                                    //user = {name : name , mail : mail}; 
     3060                                                    if(User.me.mail == user.mail) 
     3061                                                            return(null); 
     3062                                                    user.isExternal = (!!user && !(!!user.isExternal)) ? 0 : 1; 
     3063 
     3064                                                    return  DataLayer.merge({ 
     3065                                                            name: user.name, 
     3066                                                            mail: user.mail, 
     3067                                                            acl:  'r', 
     3068                                                            delegatedFrom: '0', 
     3069                                                            status: '4', 
     3070                                                            isExternal: user.isExternal 
     3071                                                    }, !!user.id ? {id : DataLayer.put('participant', {user: user.id, isExternal: user.isExternal})} : {id: DataLayer.put('participant', {user: user})});  
     3072                                                }else if(mail.match(/[\w-]+(\.[\w-]+)*@(([A-Za-z\d][A-Za-z\d-]{0,61}[A-Za-z\d]\.)+[A-Za-z]{2,6}|\[\d{1,3}(\.\d{1,3}){3}\])/)){ 
     3073                                                     
     3074                                                    var userId = DataLayer.put('user', { 
     3075                                                        name: name,  
     3076                                                        mail: mail,  
     3077                                                        isExternal: '1' 
     3078                                                    }); 
     3079                                                    var newAttendeeId = DataLayer.put('participant', { 
     3080                                                        user: userId,  
     3081                                                        isExternal: '1' 
     3082                                                    }); 
     3083 
     3084                                                    return  { 
     3085                                                            id: newAttendeeId, 
     3086                                                            name: name, 
     3087                                                            mail: mail, 
     3088                                                            acl:  'r', 
     3089                                                            delegatedFrom: '0', 
     3090                                                            status: '4', 
     3091                                                            isExternal: '1' 
     3092                                                    }; 
     3093                                                     
     3094                                                }else 
    30553095                                                    return (null); 
    3056  
    3057                                                 if(!user) 
    3058                                                         user = {name : decoded.match(/"([^"]*)"/)[1] , mail : decoded.match(/[\w-]+(\.[\w-]+)*@(([A-Za-z\d][A-Za-z\d-]{0,61}[A-Za-z\d]\.)+[A-Za-z]{2,6}|\[\d{1,3}(\.\d{1,3}){3}\])/)[1]}; 
    3059  
    3060                                                 if(User.me.mail == user.mail) 
    3061                                                         return(null); 
    3062                                                          
    3063                                                 user.isExternal = (!!user && !(!!user.isExternal)) ? 0 : 1; 
    3064  
    3065                                                 return  DataLayer.merge({ 
    3066                                                         name: user.name, 
    3067                                                         mail: user.mail, 
    3068                                                         acl:  'r', 
    3069                                                         delegatedFrom: '0', 
    3070                                                         status: '4' 
    3071                                                 }, !!user.id ? {id : DataLayer.put('participant', {user: user.id, isExternal: user.isExternal})} : {id: DataLayer.put('participant', {user: user})});  
    3072                                  
    30733096                                        })       
    30743097                                         
  • trunk/expressoMail1_2/templates/default/main.css

    r6543 r6599  
    10491049} 
    10501050 
     1051div.new-event-win.active div.button-files-upload{ 
     1052    margin: 15px 0 0 0; 
     1053} 
     1054 
     1055div.new-event-win.active div.files-list{ 
     1056    margin: 45px 0 0 0; 
     1057} 
     1058 
    10511059/*#divAppbox 
    10521060{ background: #fff url( ../images/bgBlockContent.jpg ) repeat-x; border-color: #9c9c9c; } 
  • trunk/prototype/config/user.ini

    r6528 r6599  
    1515insertOwnerLink = modules/calendar/interceptors/DBMapping.php 
    1616 
    17 [OpenLDAP.before.create] 
    18 encodeURIUser = modules/calendar/interceptors/DBMapping.php 
    19 encodeCreateConcept = modules/calendar/interceptors/DBMapping.php 
     17;[OpenLDAP.before.create] 
     18;encodeURIUser = modules/calendar/interceptors/DBMapping.php 
     19;encodeCreateConcept = modules/calendar/interceptors/DBMapping.php 
    2020 
    2121[OpenLDAP.before.find] 
Note: See TracChangeset for help on using the changeset viewer.