Changeset 583 for trunk/calendar
- Timestamp:
- 01/08/09 16:11:54 (15 years ago)
- Location:
- trunk/calendar
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/calendar/inc/class.bocalendar.inc.php
r582 r583 867 867 $this->fix_update_time($l_start); 868 868 $this->fix_update_time($l_end); 869 870 if(!isset($l_cal['private']))871 {872 $l_cal['private'] = 'public';873 }874 869 if(!isset($l_cal['ex_participants'])) 875 870 { … … 882 877 } 883 878 884 $is_public = ( int)(isset($l_cal['public']) ? $l_cal['public'] : $l_cal['private'] == 'public');879 $is_public = ($l_cal['type'] != 'private'); 885 880 $this->so->event_init(); 886 881 $this->add_attribute('uid',$l_cal['uid']); 882 $this->add_attribute('type',$l_cal['type']); 887 883 if($l_cal['ex_participants']) { 888 884 $this->add_attribute('ex_participants',$l_cal['ex_participants']); -
trunk/calendar/inc/class.socalendar.inc.php
r2 r583 91 91 } 92 92 $cats = $GLOBALS['phpgw']->categories->return_all_children($this->cat_id); 93 $extra .= "AND (phpgw_cal.category".(count($cats) > 1 ? ' IN ('.implode(',',$cats).')' : '= '.(int)$this->cat_id);93 $extra .= "AND (phpgw_cal.category".(count($cats) > 1 ? ' IN ('.implode(',',$cats).')' : '=\''.(int)$this->cat_id."'"); 94 94 foreach($cats as $cat) 95 95 { -
trunk/calendar/inc/class.socalendar_sql.inc.php
r386 r583 563 563 $this->add_attribute('owner',(int)$this->stream->f('owner')); 564 564 $this->add_attribute('id',(int)$this->stream->f('cal_id')); 565 $this->add_attribute('type',$this->stream->f('cal_type')); 565 566 $this->set_class((int)$this->stream->f('is_public')); 566 567 $this->set_category($this->stream->f('category')); … … 954 955 else 955 956 { 956 $type = 'E'; 957 if ($event['type'] == 'hourAppointment') 958 $type = 'H'; 959 else 960 $type = 'E'; 957 961 } 958 962 -
trunk/calendar/inc/class.uicalendar.inc.php
r362 r583 4394 4394 $var['category'] = Array( 4395 4395 'field' => lang('Category'), 4396 'data' => '<select name="categories[]" multiple size="5">'.$this->cat->formated_list('select','all',$check_cats,True).'</select>'4396 'data' => '<select name="categories[]" onchange="javascript:updateTitleField(this)" multiple size="5">'.$this->cat->formated_list('select','all',$check_cats,True).'</select>' 4397 4397 ); 4398 4398 … … 4460 4460 ); 4461 4461 4462 // Access4462 // Access 4463 4463 $var['access'] = Array( 4464 'field' => lang(' Private'),4465 'data' => '< input type="checkbox" name="cal[private]" value="private"'.(!$event['public']?' checked':'').'>'4466 ); 4464 'field' => lang('Type'), 4465 'data' => '<select onchange="javascript:changeViewMode(this.value);" id="cal[type]" name="cal[type]"><option value="normal">'.lang('Normal').'</option><option value="private" '.(!$event['public']?'SELECTED':'').' >'. lang('Private').'</option><option value="hourAppointment" '.($event['type'] == 'H'?'SELECTED':'').' >'.lang('Hours Appointment').'</option></select>' 4466 ); //event['public'] 4467 4467 4468 4468 // Participants … … 4751 4751 'data' => '<input name="cal[recur_interval]" size="4" maxlength="4" value="'.$event['recur_interval'].'">' 4752 4752 ); 4753 // $this->output_template_array($p,'row','list',Array('data' => '<script src="simple_show_hide.js" type="text/javascript"></script>')); 4753 4754 4754 4755 if (!isset($this->fields)) … … 4758 4759 $this->stock_fields = &$this->custom_fields->stock_fields; 4759 4760 } 4761 $this->output_template_array($p,'row','list',$var['access']); 4762 unset($var['access']); 4763 4760 4764 $preserved = False; 4761 4765 foreach($this->fields as $field => $data) … … 4777 4781 case 'recure_type': 4778 4782 $p->set_var('tr_color',$this->theme['th_bg']); 4779 $p->set_var('hr_text','<center ><b>'.lang('Repeating Event Information').'</b></center>');4783 $p->set_var('hr_text','<center name="cal[rpt_label]"><b>'.lang('Repeating Event Information').'</b></center>'); 4780 4784 $p->parse('row','hr',True); 4781 4785 $this->output_template_array($p,'row','list',$var['recure_type']); … … 4869 4873 $p->set_var('cancel_button',$cancel_button); 4870 4874 $p->pparse('out','edit_entry'); 4875 echo "<script src='calendar/templates/celepar/js/edit.js' type='text/javascript'></script>"; 4876 echo "<script>var type=document.getElementById('cal[type]'); changeViewMode(type.value);</script>"; 4877 4871 4878 4872 4879 } -
trunk/calendar/templates/celepar/js/edit.js
r2 r583 92 92 selectOpener.options[selectOpener.options.length-1].selected = true; 93 93 } 94 94 function changeViewMode(chValue){ 95 switch (chValue){ 96 case 'hourAppointment': 97 var names=new Array('title','priority','location','alarmhours','alarmminutes','recur_type','rpt_use_end','recur_interval','rpt_label'); 98 for (var i=0; i < names.length; i++) 99 { 100 var Field = document.getElementsByName('cal['+names[i]+']'); 101 if (Field[0]) 102 Field[0].parentNode.parentNode.style.display = "none"; 103 } 104 105 Field = document.getElementsByName('participants[]'); 106 Field[0].parentNode.parentNode.style.display = "none"; 107 Field[1].parentNode.parentNode.style.display = "none"; 108 Field = document.getElementById('txt_loading'); 109 Field.parentNode.parentNode.style.display = "none"; 110 Field = document.getElementsByName('cal[rpt_day][]'); 111 Field[0].parentNode.parentNode.style.display = "none"; 112 break; 113 default: 114 var names=new Array('title','priority','location','alarmhours','alarmminutes','recur_type','rpt_use_end','recur_interval','rpt_label'); 115 for (var i=0; i < names.length; i++) 116 { 117 var Field = document.getElementsByName('cal['+names[i]+']'); 118 if (Field[0]) 119 Field[0].parentNode.parentNode.style.display = ""; 120 } 121 Field = document.getElementsByName('participants[]'); 122 Field[0].parentNode.parentNode.style.display = ""; 123 Field[1].parentNode.parentNode.style.display = ""; 124 Field = document.getElementById('txt_loading'); 125 Field.parentNode.parentNode.style.display = ""; 126 Field = document.getElementsByName('cal[rpt_day][]'); 127 Field[0].parentNode.parentNode.style.display = ""; 128 break; 129 } 130 131 } 132 function updateTitleField(select){ 133 var typeField = document.getElementsByName('cal[type]'); 134 if (typeField[0].value != 'hourAppointment') 135 return; 136 var titleField = document.getElementsByName('cal[title]'); 137 var optionsArray = select.childNodes; 138 titleField[0].value = ''; 139 for(option in optionsArray) 140 if (optionsArray[option].selected) 141 titleField[0].value += optionsArray[option].text + ' '; 142 } 143 144 95 145 // Fim
Note: See TracChangeset
for help on using the changeset viewer.