Changeset 7980
- Timestamp:
- 03/08/13 11:50:57 (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/inc/class.uiconfig.inc.php
r7655 r7980 53 53 default: 54 54 $appname = $_GET['appname']; 55 $config_appname = $appname;55 $config_appname = (isset($_GET['config']) && $_GET['config']) ? $_GET['config'] : $appname ; 56 56 break; 57 57 } … … 72 72 } 73 73 74 if($appname === "expressoCalendar"){ 74 if($appname === "expressoCalendar"){ 75 76 if($config_appname == 'expressoCalendar' ) 77 { 78 $t->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname)); 79 80 }; 81 82 if($_POST['newsettings']['expressoCalendar_autoImportCalendars'] == 'true') 83 { 84 $db = $GLOBALS['phpgw']->db; 85 $calendars = array(); 86 $db->query('SELECT calendar_signature.user_uidnumber as "user",calendar.id as "calendar" FROM calendar,calendar_signature WHERE calendar.id = calendar_signature.calendar_id AND calendar.type = 0 AND calendar_signature.is_owner = 1 AND (SELECT id from module_preference WHERE user_uidnumber = calendar_signature.user_uidnumber AND module_preference.module = \'expressoCalendar\' AND module_preference.name = \'dafaultImportCalendar\' ) IS NULL'); 87 while( $db->next_record() ) 88 { 89 $calendars[] = $db->row(); 90 } 91 92 foreach($calendars as $v) 93 { 94 $db->query('INSERT INTO module_preference ("user_uidnumber","value","name","module") VALUES ( \''.$v['user'].'\' , \''.$v['calendar'].'\',\'dafaultImportCalendar\' , \'expressoCalendar\')'); 95 } 96 } 97 75 98 if (isset($_POST['migration']) && ($_POST['migration'] == "true")){ 76 99 … … 80 103 $migratrion->calendar(); 81 104 } 105 82 106 } 83 107 … … 105 129 if(function_exists(substr($key,0,strrpos($key,'_')))) 106 130 { 107 call_user_func(substr($key,0,strrpos($key,'_')), &$config);131 call_user_func(substr($key,0,strrpos($key,'_')), $config); 108 132 } 109 133 else … … 114 138 if($GLOBALS['config_error']) 115 139 { 116 $errors .= lang($GLOBALS['config_error']) . ' ';140 $errors = lang($GLOBALS['config_error']) . ' '; 117 141 $GLOBALS['config_error'] = False; 118 142 } -
trunk/expressoCalendar/inc/hook_admin.inc.php
r5804 r7980 13 13 $title = $appname; 14 14 $file = Array( 15 'ExpressoCalendar migração' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname) 15 'ExpressoCalendar migration' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname. '&config=migra'), 16 'Global Settings' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname) 16 17 ); 17 18 //Do not modify below this line -
trunk/expressoCalendar/templates/default/config.tpl
r5804 r7980 1 1 <!-- BEGIN header --> 2 <form method="POST" action="{action_url}"> 3 <input type="hidden" name="migration" value="true"> 4 <table border="0" align="center"> 5 <tr class="th"> 6 <td colspan="2"><font color="{th_text}"> <b>{title}</b></font></td> 7 </tr> 8 <tr> 9 <td></td> 10 </tr> 11 <tr> 12 <td colspan="2"><b>{error}</b></td> 13 </tr> 14 <tr> 15 <td></td> 16 </tr> 17 <!-- END header --> 18 <!-- BEGIN body --> 19 <tr class="th"> 20 <td colspan="2" align="center"><b>{lang_expressoCalendar_migration}</b></td> 21 </tr> 22 <tr> 23 <td></td> 24 </tr> 25 <tr class="row_on"> 26 <td>{lang_Migrate_all_calendar_events_for_expressoCalendar}:</td> 27 </tr> 28 <!-- END body --> 29 <!-- BEGIN footer --> 30 <tr class="th"> 31 <td colspan="2"> </td> 32 </tr> 33 <tr> 34 <td colspan="2" align="center"> 35 <input type="submit" name="submit" value="{lang_submit}"> 36 <input type="submit" name="cancel" value="{lang_cancel}"> 37 </td> 38 </tr> 39 </table> 2 <form method="POST" action="{action_url}"> 3 <table border="0" align="center"> 4 <!-- END header --> 5 <!-- BEGIN body --> 6 <tr class="th"> 7 <td colspan="2" align="center"><b>{lang_expressoCalendar_Setup}</b></td> 8 </tr> 9 10 <tr><td></td></tr> 11 12 <tr class="row_off"> 13 <td>{lang_Auto_import_calendars_to_receive_an_internal_event}:</td> 14 <td> 15 <select name="newsettings[expressoCalendar_autoImportCalendars]"> 16 <option value="false" {selected_expressoCalendar_autoImportCalendars_false}>{lang_no}</option> 17 <option value="true" {selected_expressoCalendar_autoImportCalendars_true}>{lang_yes}</option> 18 </select> 19 </td> 20 </tr> 21 <!-- END body --> 22 <!-- BEGIN footer --> 23 <tr class="th"> 24 <td colspan="2"> </td> 25 </tr> 26 <tr> 27 <td colspan="2" align="center"> 28 <input type="submit" name="submit" value="{lang_submit}"> 29 <input type="submit" name="cancel" value="{lang_cancel}"> 30 </td> 31 </tr> 32 </table> 40 33 </form> 41 34 <!-- END footer --> -
trunk/phpgwapi/setup/phpgw_pt-br.lang
r5870 r7980 54 54 austria common pt-br AUSTRIA 55 55 author common pt-br Autor 56 Auto import calendars to receive an internal event common pt-br Auto importar calendarios ao receber um evento interno 56 57 autohide sidebox menus common pt-br Ocultar Caixa do Menu 57 58 automacally hide the sidebox menus? common pt-br Esconder automáticamente os menus laterais … … 208 209 exact common pt-br exato(a) 209 210 exit common pt-br Sair 211 ExpressoCalendar migration common pt-br ExpressoCalendar migração 212 expressoCalendar Setup common pt-br Configuração do ExpressoCalendar 210 213 ExpressoLivre is unavailable at this moment. Code %1<br>Please, try later. common pt-br ExpressoLivre indisponível no momento. Código %1<br>Tente mais tarde. 211 214 Catalog is out of service, you will not able to do some operations common pt-br O serviço de catálogo está em manutenção, você não poderá realizar algumas operações … … 244 247 gibraltar common pt-br GIBRALTAR 245 248 Global Catalogues Configuration common pt-br Configuração Global do Catálogo 249 Global Settings common pt-br Configurações globais 246 250 global common pt-br Global 247 251 global public common pt-br Público a todos -
trunk/prototype/config/participant.ini
r7377 r7980 21 21 [after.create] 22 22 createParticipantHistoric = modules/calendar/interceptors/DBMapping.php 23 autoImportCalendar = modules/calendar/interceptors/DBMapping.php 23 24 24 25 [before.create] -
trunk/prototype/modules/calendar/interceptors/DBMapping.php
r7973 r7980 169 169 public function schedulableSecurity(&$uri, &$params, &$criteria, $original) 170 170 { 171 171 172 if( !isset($criteria['filter'][1]) || !$criteria['filter'][1] == 'uid') 172 173 { … … 763 764 } 764 765 } 766 } 767 768 static function autoImportCalendar(&$uri, &$params, &$criteria, $original){ 769 $autoCommit = Controller::service('PostgreSQL')->execResultSql('Select config_value FROM phpgw_config WHERE config_app = \'expressoCalendar\' AND config_name = \'expressoCalendar_autoImportCalendars\''); 770 771 772 if(isset($autoCommit[0]) && $autoCommit[0]['config_value'] == 'true') 773 { 774 if(isset($original['properties']) && isset($original['properties']['user']) && isset($original['properties']['isOrganizer']) && $original['properties']['isOrganizer'] != '1') 775 { 776 $defaultCalendar = Controller::find(array('concept' => 'modulePreference'), array('value') , array('filter' => array( 'and' , array('=' , 'name' , 'dafaultImportCalendar') , array('=' , 'module' , 'expressoCalendar') , array('=' , 'user' , $original['properties']['user']) )) ); 777 if(isset($defaultCalendar[0]) && $defaultCalendar[0]['value'] > 0) 778 { 779 Controller::create(array('concept' => 'calendarToSchedulable'), 780 array('schedulable' => $original['properties']['schedulable'], 781 'calendar' => $defaultCalendar[0]['value'] 782 ) 783 ); 784 } 785 } 786 } 765 787 } 766 788 … … 1392 1414 1393 1415 Controller::delete(array('concept' => 'calendar', 'id' => $signature['calendar'])); 1394 1395 $permissions = Controller::find(array('concept' => 'calendarToPermission'), array('id'), array('filter' => array('=', 'calendar', $signature['calendar']))); 1396 1397 1398 1416 1417 $autoCommit = Controller::service('PostgreSQL')->execResultSql('Select config_value FROM phpgw_config WHERE config_app = \'expressoCalendar\' AND config_name = \'expressoCalendar_autoImportCalendars\''); 1418 if(isset($autoCommit[0]) && $autoCommit[0]['config_value'] == 'true') 1419 { 1420 $defaultCalendar = Controller::find(array('concept' => 'modulePreference'), array('value','id') , array('filter' => array( 'and' , array('=' , 'name' , 'dafaultImportCalendar') , array('=' , 'module' , 'expressoCalendar') , array('=' , 'user' , $original['properties']['user']) )) ); 1421 if(isset($defaultCalendar[0]) && $defaultCalendar[0]['value'] == $signature['calendar'] ) 1422 { 1423 Controller::delete(array('concept' => 'modulePreference', 'id' => $defaultCalendar[0]['id'])); 1424 } 1425 } 1426 1427 $permissions = Controller::find(array('concept' => 'calendarToPermission'), array('id'), array('filter' => array('=', 'calendar', $signature['calendar']))); 1428 1399 1429 if($permissions && count($permissions) > 0){ 1400 1430 $ids = array(); … … 1543 1573 } 1544 1574 1545 DAViCalAdapter::importCollection($v->url, $calCreated['id']); 1575 if($i == 0) 1576 { 1577 $pref = array(); 1578 $pref['user'] = $_SESSION['wallet']['user']['uidNumber']; 1579 $pref['value'] = $calCreated['id']; 1580 $pref['name'] = 'dafaultImportCalendar' ; 1581 $pref['module'] = 'expressoCalendar'; 1582 Controller::create(array('concept' => 'modulePreference'), $pref); 1583 } 1584 1546 1585 } 1547 1586 } else { … … 1565 1604 1566 1605 $sigCreated = Controller::create(array('concept' => 'calendarSignature'), $sig); 1606 1607 1608 $pref = array(); 1609 $pref['user'] = $_SESSION['wallet']['user']['uidNumber']; 1610 $pref['value'] = $calCreated['id']; 1611 $pref['name'] = 'dafaultImportCalendar' ; 1612 $pref['module'] = 'expressoCalendar'; 1613 Controller::create(array('concept' => 'modulePreference'), $pref); 1614 1615 1567 1616 } 1568 1617 -
trunk/prototype/modules/calendar/js/calendar.codecs.js
r7959 r7980 1858 1858 occurrence: occurrences[i], 1859 1859 type: typeEvent, 1860 calendar: evt.calendar, 1860 calendar: evt.calendar, 1861 unanswered: evt.unanswered, 1861 1862 status: evt.status 1862 1863 }, (parseInt(typeEvent) == 1 ? eventEditable(evt.id, isRepeat, i ) : (parseInt(typeEvent) == 2 ? taskEditable(evt.id) : {editable: false, disableResizing: true, disableDragging: true})))); -
trunk/prototype/modules/calendar/js/helpers.js
r7964 r7980 1559 1559 DataLayer.render( 'templates/preferences_calendar.ejs', { 1560 1560 preferences:User.preferences, 1561 calendars: Calendar.calendars 1561 calendars: Calendar.calendars, 1562 signatureOf : Calendar.signatureOf 1562 1563 }, function( template ){ 1563 1564 var tabPrefCalendar = jQuery('#preference_tab').html( template ).find('.preferences-win'); 1564 1565 1565 tabPrefCalendar.find('option[value="'+User.preferences.defaultCalendar+'"]').attr('selected','selected').trigger('change'); 1566 1567 DataLayer.render( 'templates/timezone_list.ejs', {}, function( timezones_options ){ 1566 tabPrefCalendar.find('select[name="defaultCalendar"] option[value="'+User.preferences.defaultCalendar+'"]').attr('selected','selected').trigger('change'); 1567 tabPrefCalendar.find('select[name="dafaultImportCalendar"] option[value="'+User.preferences.dafaultImportCalendar+'"]').attr('selected','selected').trigger('change'); 1568 1569 DataLayer.render( 'templates/timezone_list.ejs', {}, function( timezones_options ){ 1568 1570 tabPrefCalendar.find('select[name="timezone"]').html(timezones_options).find('option[value="'+User.preferences.timezone+'"]').attr('selected','selected').trigger('change'); 1569 1571 }); -
trunk/prototype/modules/calendar/js/init.js
r7957 r7980 359 359 var status_ball = ""; //nome da imagem a ser inserida 360 360 var status_img = ""; 361 if(event.type == 1) 362 img_icon = "mini-event.png"; 363 if(event.type == 2) 364 img_icon = "mini-task.png"; 365 if(event.type == 3) 366 img_icon = "mini-activity.png"; 367 368 //se for diferente de evento(type 1). 369 if(event.type != 1){ 370 if(event.status == "1"){ 371 status_ball = "gray.png"; 372 }else if(event.status == "2"){ 373 status_ball = "yellow.png"; 374 }else if(event.status == "3"){ 375 status_ball = "green.png"; 376 }else if(event.status == "4"){ 377 status_ball = "red.png"; 378 } 379 380 status_img = '<img style="width: 8px; height: 8px; margin-bottom: 2px;" src="../prototype/modules/calendar/img/' + status_ball + '"></img>'; 381 } 361 362 if( !!parseInt(event.unanswered) ){ 363 364 img_icon = "mini-attention.png"; 365 366 }else{ 367 368 if(event.type == 1) 369 img_icon = "mini-event.png"; 370 if(event.type == 2) 371 img_icon = "mini-task.png"; 372 if(event.type == 3) 373 img_icon = "mini-activity.png"; 374 375 //se for diferente de evento(type 1). 376 if(event.type != 1){ 377 if(event.status == "1"){ 378 status_ball = "gray.png"; 379 }else if(event.status == "2"){ 380 status_ball = "yellow.png"; 381 }else if(event.status == "3"){ 382 status_ball = "green.png"; 383 }else if(event.status == "4"){ 384 status_ball = "red.png"; 385 } 386 387 status_img = '<img style="width: 8px; height: 8px; margin-bottom: 2px;" src="../prototype/modules/calendar/img/' + status_ball + '"></img>'; 388 } 389 390 } 391 392 382 393 //html que exibe a imagem do type e do status 383 394 element.find(".fc-event-inner.fc-event-skin").prepend($('<img style="width: 11px; height: 13px;" class="" src="../prototype/modules/calendar/img/' + img_icon + '"></img>' + status_img)); -
trunk/prototype/modules/calendar/schedules.php
r7956 r7980 161 161 $attend = Controller::read(array('concept' => 'participant'), null, array('filter' => array('AND', array('=','schedulable',$v['id']), array('=','user', Config::me('uidNumber')) ))); 162 162 163 $result[$i]['unanswered'] = 0; 164 163 165 if(count($attend) > 0 && !empty($attend)){ 164 165 166 if(array_key_exists(0, $attend)) 166 167 $attend = $attend[0]; 167 168 168 169 $result[$i]['editable'] = (strstr($attend['acl'],"w") || strstr($attend['acl'],"o") || $attend['isOrganizer'] == '1') ? 1 : 0; 170 171 if($attend['status'] == STATUS_UNANSWERED) 172 $result[$i]['unanswered'] = 1; 169 173 170 174 }else{ -
trunk/prototype/modules/calendar/templates/attendee_add.ejs
r7388 r7980 11 11 <option value="3" <%= data.event.status=='3' ? 'selected="selected"':'' %>>Eu não vou</option> 12 12 <option value="2" <%= data.event.status=='2' ? 'selected="selected"':'' %>>Talvez</option> 13 <option class="hidden" value="5">Delegado</option> 13 <option value="4" <%= data.event.status=='4' ? 'selected="selected"':'' %>>Sem resposta </option> 14 <option class="hidden" value="5" >Delegado</option> 14 15 <%}%> 15 16 <%}else{%> -
trunk/prototype/modules/calendar/templates/event_detail_list.ejs
r7702 r7980 3 3 var encoder = {}; 4 4 encoder.alarm = {'1':'do evento','2':'da tarefa','3':'da atividade'}; 5 encoder.status = {'1':'Eu vou', '2':'Talvez', '3':'Eu não vou' };5 encoder.status = {'1':'Eu vou', '2':'Talvez', '3':'Eu não vou' , '4':'Sem resposta'}; 6 6 encoder.statusEvent = {1: 'Sem ações', 2: 'Em processo', 3: 'Completo', 4: 'Cancelado'}; 7 7 encoder.priority = {1: 'Alta', 2: 'Normal', 3: 'Baixa'}; -
trunk/prototype/modules/calendar/templates/preferences_calendar.ejs
r7143 r7980 72 72 73 73 <p class="input-group"> 74 <label for="defaultCalendar">Agenda padrão :</label>74 <label for="defaultCalendar">Agenda padrão para Criação de Eventos:</label> 75 75 <select name="defaultCalendar" > 76 76 <%for(var i = 0; i < data.calendars.length; i++){%> … … 79 79 </select> 80 80 </p> 81 82 <p class="input-group"> 83 <label for="dafaultImportCalendar">Agenda padrão para Importação de Eventos :</label> 84 <select name="dafaultImportCalendar" > 85 <option value=""> </option> 86 <%for(var i = 0; i < data.calendars.length; i++){ 87 if(data.signatureOf[data.calendars[i].id].isOwner == '1'){ 88 %> 89 <option value="<%=data.calendars[i].id%>"> <%= data.calendars[i].name %></option> 90 <%}}%> 91 </select> 92 </p> 81 93 82 94 <p class="input-group">
Note: See TracChangeset
for help on using the changeset viewer.