Changeset 6861
- Timestamp:
- 07/24/12 10:32:47 (11 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/js/draw_api.js
r6851 r6861 3190 3190 } 3191 3191 attachments.id = "attachments_" + ID; 3192 var parserImport = false; 3192 3193 for (var i=0; i<info_msg.attachments.length; i++) 3193 3194 { 3195 var import_url = '$this.db_functions.import_vcard&msg_folder='+info_msg.msg_folder+"&msg_number="+info_msg.msg_number+"&msg_part="+info_msg.attachments[i].pid+"&idx_file="+i+"&encoding="+info_msg.attachments[i].encoding; 3194 3196 var link_attachment = document.createElement("a"); 3197 link_attachment.setAttribute("class", "type_images"); 3198 link_attachment.style.display = "block"; 3195 3199 link_attachment.setAttribute("href", proxy_mensagens.link_anexo(info_msg,i)); 3196 3200 link_attachment.innerHTML = url_decode(info_msg.attachments[i].name) + " ("+borkb(info_msg.attachments[i].fsize)+")"; … … 3205 3209 link_import_attachment.setAttribute("onclick","javascript:import_calendar('"+info_msg.msg_folder+"&msg_number="+info_msg.msg_number+"&msg_part="+info_msg.attachments[i].pid+"&idx_file="+i+"&encoding="+info_msg.attachments[i].encoding+"'); return false;"); 3206 3210 link_import_attachment.title = get_lang("Import to calendar"); 3211 link_import_attachment.style.display = "inline"; 3207 3212 link_import_attachment.align = "top"; 3208 3213 link_import_attachment.style.marginLeft = "5px"; 3209 3214 link_import_attachment.style.cursor = "pointer"; 3210 3215 link_attachment.appendChild(link_import_attachment); 3211 } 3212 3213 if((url_decode(info_msg.attachments[i].name).indexOf(".eml") != -1)) 3216 parserImport = true; 3217 } 3218 3219 if((url_decode(info_msg.attachments[i].name).indexOf(".eml") != -1)) 3214 3220 { 3215 3221 //Link para importar calendário … … 3223 3229 link_open_msg.style.cursor = "pointer"; 3224 3230 link_attachment.appendChild(link_open_msg); 3225 }3226 3227 link_attachment.innerHTML += '<br/>';3231 } 3232 3233 //link_attachment.innerHTML += '<br/>'; 3228 3234 attachments.appendChild(link_attachment); 3229 3235 } 3230 3236 tr6.appendChild(td6); 3231 3237 tr6.appendChild(attachments); 3232 3238 tbody_message_others_options.appendChild(tr6); 3233 3239 } 3234 3240 3241 if (parserImport){ 3242 $.ajax({ 3243 url: "controller.php?action="+import_url+'&from_ajax=true&id_user='+User.me.id+'&readable=true&cirus_delimiter='+cyrus_delimiter+'&analize=true&uidAccount='+decodeOwner(), 3244 async: true, 3245 success: function(data){ 3246 data = connector.unserialize(data); 3247 3248 if(typeof(data) == "object"){ 3249 var calendarPermission = data.calendar; 3250 data = data.action; 3251 } 3252 3253 switch(parseInt(data)){ 3254 case 5: 3255 $('.type_images').append('<img class="loader" src="templates/default/images/ajax-loader.gif" align="top" style="margin-left: 5px; cursor: pointer; display: inline">'); 3256 $.ajax({ 3257 url: "controller.php?action="+import_url+'&from_ajax=true&selected=true', 3258 success: function(msg){ 3259 $('.type_images').append('<img src="../prototype/modules/mail/img/flagDone.png" align="top" style="margin: 3px 0 0 5px; cursor: pointer; display: inline">').parent().find('.loader').remove(); 3260 write_msg( ( ( connector.unserialize(msg)) == "ok") ? "Seu evento foi Atualizado com sucesso" : "Ocorreu um erro ao atualizar evento" ); 3261 } 3262 }); 3263 return; 3264 break; 3265 case 4: 3266 $('.type_images').append('<img src="../prototype/modules/mail/img/flagDone.png" align="top" style="margin: 3px 0 0 5px; cursor: pointer; ">'); 3267 write_msg("Seu evento encontra-se atualizado."); 3268 return; 3269 break; 3270 case 12: 3271 write_msg('Este evento não existe mais.'); 3272 return; 3273 break; 3274 } 3275 } 3276 }); 3277 } 3235 3278 //k!! 3236 3279 … … 4301 4344 show_hide(content.find(".cc-tr"), $(this)); 4302 4345 change_text($(this).find(".ui-button-text"), get_lang("Add CC"), get_lang('Remove CC')); 4303 }) ;4346 }) 4304 4347 4305 4348 //BOTAO ENVIAR -
trunk/prototype/modules/calendar/constants.php
r6295 r6861 33 33 define('ICAL_ACTION_IMPORT_FROM_PERMISSION', 10); 34 34 define('ICAL_ACTION_NONE_FROM_PERMISSION', 11); 35 define('ICAL_NOT_FOUND', 12); 35 36 36 37 define('ATTENDEE_ACL_ORGANIZATION', 'o'); -
trunk/prototype/services/iCal.php
r6807 r6861 572 572 $interation['schedulable://' . $schedulable['id']] = false; 573 573 break; 574 574 575 575 case 'ADD': 576 576 break; … … 720 720 721 721 case 'REPLY': 722 $interation = ICAL_ACTION_REPLY; 722 if ($schedulable = self::_getSchedulable($uid)) { 723 while ($property = $component->getProperty('attendee', FALSE, TRUE)) 724 if ($attendee = self::_getParticipantByMail(str_replace('MAILTO:', '', $property['value']), $schedulable['participants'], true)) 725 $interation = (constant('STATUS_' . strtoupper($property['params']['PARTSTAT'])) == $attendee['status']) ? ICAL_ACTION_NONE : ICAL_ACTION_REPLY; 726 }else 727 $interation = ICAL_NOT_FOUND; 723 728 break; 724 729 … … 810 815 811 816 812 private static function _getParticipantByMail($mail, &$participants ) {817 private static function _getParticipantByMail($mail, &$participants, $isFull) { 813 818 if ($participants && $participants != '') 814 819 foreach ($participants as $i => $v) 815 820 if ((is_array($v) && isset($v['user'])) && ($v['user']['mail'] == $mail || (isset($v['user']['mailAlternateAddress']) && in_array($mail, $v['user']['mailAlternateAddress'])))) 816 return$v['id'];821 return !!$isFull ? $v : $v['id']; 817 822 return false; 818 823 }
Note: See TracChangeset
for help on using the changeset viewer.