Changeset 7028
- Timestamp:
- 08/15/12 16:35:27 (12 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/js/main.js
r7016 r7028 4329 4329 "Importar" : function(){ 4330 4330 $.ajax({ 4331 url: "controller.php?action="+import_url+'&from_ajax=true&selected='+$("#select-agenda option:selected").val()+'&status='+$("#select-status option:selected").val()+'&uidAccount='+decodeOwner() ,4331 url: "controller.php?action="+import_url+'&from_ajax=true&selected='+$("#select-agenda option:selected").val()+'&status='+$("#select-status option:selected").val()+'&uidAccount='+decodeOwner()+'&cirus_delimiter='+cyrus_delimiter, 4332 4332 success: function(msg){ 4333 4333 var alt = ( (msg = connector.unserialize(msg)) == "ok") ? "Importado com sucesso para " : "Ocorreu um erro ao importar o evento/tarefa para a agenda "; … … 4356 4356 case 5: 4357 4357 $.ajax({ 4358 url: "controller.php?action="+import_url+'&from_ajax=true&selected=true',4358 url: 'controller.php?action='+import_url+'&from_ajax=true&selected=true&cirus_delimiter='+cyrus_delimiter, 4359 4359 success: function(msg){ 4360 4360 alert( ( ( connector.unserialize(msg)) == "ok") ? "Seu evento/tarefa foi Atualizado com sucesso" : "Ocorreu um erro ao atualizar evento/tarefa" ); -
trunk/prototype/modules/calendar/constants.php
r6996 r7028 2 2 3 3 define('EVENT_ID', 1); 4 define('T ASK_ID', 2);4 define('TODO_ID', 2); 5 5 6 6 define('SIGNATURE_TYPE_NORMAL', 0); -
trunk/prototype/modules/calendar/interceptors/DBMapping.php
r7006 r7028 781 781 $DayLigth['calendar']['endTime'] = $Time->format('I') ? 1 : 0; 782 782 783 if ( $currentTimezone != $v['timezone']) {783 if (!isset($currentTimezone) || ($currentTimezone != $v['timezone'])) { 784 784 $currentTimezone = $v['timezone']; 785 785 $Time->setTimezone(new DateTimeZone($v['timezone'])); -
trunk/prototype/modules/calendar/js/init.js
r7022 r7028 176 176 text: $('<div></div>').html( DataLayer.render( 'templates/task_quick_add.ejs', {"componente" : componente} ) ), 177 177 title: { 178 text:'Nova tarefa',178 text:'Nova Tarefa', 179 179 button: '<a class="button close" href="#">close</a>' 180 180 } -
trunk/prototype/modules/calendar/js/task.helpers.js
r7006 r7028 252 252 if (!UI.dialogs.addTask) { 253 253 254 UI.dialogs.addTask = jQuery('#sandbox').append('<div title="Criar tarefa" class="new-task-win active"> <div>').find('.new-task-win.active').html(html).dialog({254 UI.dialogs.addTask = jQuery('#sandbox').append('<div title="Criar Tarefa" class="new-task-win active"> <div>').find('.new-task-win.active').html(html).dialog({ 255 255 resizable: false, 256 256 modal: true, -
trunk/prototype/services/iCal.php
r7006 r7028 107 107 108 108 $vevent->setProperty('uid', $v['uid']); 109 110 break; 111 case TASK_ID: 109 break; 110 case TODO_ID: 112 111 113 112 $todo = $ical->newComponent('todo'); … … 138 137 } 139 138 140 if(isset($v['due']) && $v['due'] != '' ){139 if(isset($v['due']) && $v['due'] != '' && (int)$v['due'] > 0){ 141 140 $dueTime = new DateTime('@' . (int) ($v['due'] / 1000), $timezone); 142 141 $dueTime->setTimezone($apTimezoneOBJ); 143 142 144 143 $todo->setProperty('due', $dueTime->format(DATE_RFC822), array('TZID' => $apTimezone)); 145 } 146 147 $todo->setProperty('due', $dueTime->format(DATE_RFC822), array('TZID' => $apTimezone)); 144 $todo->setProperty('dueTime', $dueTime->format(DATE_RFC822), array('TZID' => $apTimezone)); 145 } 148 146 149 147 if (isset($v['participants']) && is_array($v['participants']) && count($v['participants']) > 0) … … 186 184 } 187 185 188 189 186 return $ical->createCalendar(); 190 187 } … … 269 266 break; 270 267 271 case T ASK_ID:268 case TODO_ID: 272 269 273 270 $todo = $ical->newComponent('todo'); … … 298 295 } 299 296 300 if(isset($v['due']) && $v['due'] != '' ){297 if(isset($v['due']) && $v['due'] != '' && (int)$v['due'] > 0){ 301 298 $dueTime = new DateTime('@' . (int) ($v['due'] / 1000), $timezone); 302 299 $dueTime->setTimezone($apTimezoneOBJ); … … 304 301 $todo->setProperty('due', $dueTime->format(DATE_RFC822), array('TZID' => $apTimezone)); 305 302 } 306 307 $todo->setProperty('due', $dueTime->format(DATE_RFC822), array('TZID' => $apTimezone));308 303 309 304 if (isset($v['participants']) && is_array($v['participants']) && count($v['participants']) > 0) … … 838 833 $user = Controller::Read(array('concept' => 'user'), false, array('filter' => array('=', 'id', $params['owner'])) ); 839 834 $pID = self::_getParticipantByMail($user[0]['mail'], $schedulable['participants']); 840 }else 835 }else{ 841 836 $pID = self::_getParticipantByMail(Config::me('mail'), $schedulable['participants']); 842 //Verifica a importação de eventos em que não participo 843 if ($pID) { 844 $interation['participant://' . $pID]['status'] = $params['status']; 837 //Verifica a importação de tarefas em que não participo 838 if ($pID) { 839 $pID = mt_rand() . '2(Formatter)'; 840 $interation['participant://' . $pID]['status'] = $params['status']; 841 $interation['participant://' . $pID]['user'] = $params['owner']; 842 $interation['participant://' . $pID]['isOrganizer'] = '0'; 843 $interation['participant://' . $pID]['schedulable'] = $schedulable['id']; 844 }else 845 $interation['participant://' . $pID]['status'] = $params['status']; 845 846 } 846 847 } 847 848 } 848 849 } else { // Importar tarefa 849 $interation = self::_makeV EVENT(array(), $component, $params);850 $interation = self::_makeVTODO(array(), $component, $params); 850 851 851 852 if (strpos($params['prodid'], 'kigkonsult.se') !== false) { //envia notificação para fora … … 915 916 if ($percentage = $component->getProperty('percent-complete', false, false)) 916 917 $sc['percentage'] = mb_convert_encoding(str_ireplace(array('\n', '\t'), array("\n", "\t"), $percentage), 'UTF-8', 'UTF-8,ISO-8859-1'); 917 918 $todo->setProperty('priority', $v['priority']);919 $todo->setProperty('percent-complete', $v['percentage']);920 $todo->setProperty('status', $this->_getStatusTodo($v['status']));921 918 922 919 /* Definindo location */ … … 1331 1328 ); 1332 1329 1333 return isset($a[$ id]) ? $a[$id] : 'STATUS_TODO_NEED_ACTION';1330 return isset($a[$action]) ? $a[$action] : 'STATUS_TODO_NEED_ACTION'; 1334 1331 1335 1332 } … … 1834 1831 1835 1832 $participantID = ($tpID = self::_getParticipantByMail($mailUser, $schedulable['participants'])) ? $tpID : mt_rand() . '2(Formatter)'; 1836 $participant['schedulable'] = $ eventID;1833 $participant['schedulable'] = $todoID; 1837 1834 1838 1835 if (isset($params['status']) && $mailUser == Config::me('mail')) … … 1874 1871 $participantID = mt_rand() . '2(Formatter)'; 1875 1872 1876 $participant['schedulable'] = $ eventID;1873 $participant['schedulable'] = $todoID; 1877 1874 $participant['status'] = (isset($property['params']['PARTSTAT']) && constant('STATUS_' . $property['params']['PARTSTAT']) !== null ) ? constant('STATUS_' . $property['params']['PARTSTAT']) : STATUS_UNANSWERED; 1878 1875 $participant['isOrganizer'] = '1';
Note: See TracChangeset
for help on using the changeset viewer.