Changeset 2802 for trunk/calendar
- Timestamp:
- 05/18/10 09:41:04 (14 years ago)
- Location:
- trunk/calendar
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/calendar/inc/class.uicalendar.inc.php
r2748 r2802 4897 4897 $this->index(); 4898 4898 } 4899 4899 4900 4900 if(isset($param['event'])) 4901 4901 { 4902 4902 $event = $param['event']; 4903 4903 } 4904 4904 4905 4905 $hourformat = substr($this->bo->users_timeformat,0,1); 4906 4906 4907 4907 // $sb = CreateObject('phpgwapi.sbox'); 4908 4908 $sb = CreateObject('phpgwapi.sbox2'); 4909 4909 $jscal = CreateObject('phpgwapi.jscalendar'); // before phpgw_header() !!! 4910 4910 4911 4911 //unset($GLOBALS['phpgw_info']['flags']['noheader']); 4912 4912 //unset($GLOBALS['phpgw_info']['flags']['nonavbar']); … … 4915 4915 $GLOBALS['phpgw_info']['flags']['app_header'] = $event['id'] ? lang('Editing event') : lang('Adding event'); 4916 4916 if ($param['plain'] != "True"){ 4917 // $GLOBALS['phpgw']->common->phpgw_header();4917 // $GLOBALS['phpgw']->common->phpgw_header(); 4918 4918 } 4919 4919 else{ … … 4932 4932 $p->set_block('edit','list','list'); 4933 4933 $p->set_block('edit','hr','hr'); 4934 4934 4935 4935 $vars = Array( 4936 4936 'font' => $this->theme['font'], … … 4939 4939 'accounts_link' => $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.accounts_popup'), 4940 4940 'common_hidden' => '<input type="hidden" name="cal[id]" value="'.$event['id'].'">'."\n" 4941 4942 4943 4944 4945 4946 4941 . '<input type="hidden" name="cal[owner]" value="'.$event['owner'].'">'."\n" 4942 . '<input type="hidden" name="cal[uid]" value="'.$event['uid'].'">'."\n" 4943 . ($_GET['cal_id'] && $event['id'] == 0?'<input type="hidden" name="cal[reference]" value="'.$_GET['cal_id'].'">'."\n": 4944 (@isset($event['reference'])?'<input type="hidden" name="cal[reference]" value="'.$event['reference'].'">'."\n":'')) 4945 . (@isset($GLOBALS['phpgw_info']['server']['deny_user_grants_access']) && $GLOBALS['phpgw_info']['server']['deny_user_grants_access']? 4946 '<input type="hidden" name="participants[]" value="'.$this->bo->owner.'">'."\n":''), 4947 4947 'errormsg' => ($param['cd']?$GLOBALS['phpgw']->common->check_code($param['cd']):'') 4948 4948 ); 4949 4949 4950 4950 $p->set_var($vars); 4951 4951 4952 // Brief Description4952 // Brief Description 4953 4953 $var['title'] = Array( 4954 4954 'tr_color' => $this->theme['th_bg'], … … 4957 4957 ); 4958 4958 4959 // Full Description4959 // Full Description 4960 4960 $var['description'] = Array( 4961 4961 'field' => lang('Full Description'), … … 4963 4963 ); 4964 4964 4965 // Display Categories4965 // Display Categories 4966 4966 if(strpos($event['category'],',')) 4967 4967 { … … 4986 4986 ); 4987 4987 4988 // Location4988 // Location 4989 4989 $var['location'] = Array( 4990 4990 'field' => lang('Location'), … … 4992 4992 ); 4993 4993 4994 // Date4994 // Date 4995 4995 4996 4996 $start = $this->bo->maketime($event['start']) - $GLOBALS['phpgw']->datetime->tz_offset; 4997 4997 $var['startdate'] = Array( 4998 4998 'field' => lang('Start Date'), 4999 /*4999 /* 5000 5000 'data' => $GLOBALS['phpgw']->common->dateformatorder( 5001 5001 $sb->getYears('start[year]',(int)$GLOBALS['phpgw']->common->show_date($start,'Y')), … … 5003 5003 $sb->getDays('start[mday]',(int)$GLOBALS['phpgw']->common->show_date($start,'d')) 5004 5004 ) 5005 */5005 */ 5006 5006 'data' => $jscal->input('start[str]',$start) 5007 5007 ); 5008 5008 5009 // Time5009 // Time 5010 5010 if ($this->bo->prefs['common']['timeformat'] == '12') 5011 5011 { … … 5018 5018 ); 5019 5019 5020 // End Date5020 // End Date 5021 5021 $end = $this->bo->maketime($event['end']) - $GLOBALS['phpgw']->datetime->tz_offset; 5022 5022 $var['enddate'] = Array( 5023 5023 'field' => lang('End Date'), 5024 /*5024 /* 5025 5025 'data' => $GLOBALS['phpgw']->common->dateformatorder( 5026 5026 $sb->getYears('end[year]',(int)$GLOBALS['phpgw']->common->show_date($end,'Y')), … … 5028 5028 $sb->getDays('end[mday]',(int)$GLOBALS['phpgw']->common->show_date($end,'d')) 5029 5029 ) 5030 */5030 */ 5031 5031 'data' => $jscal->input('end[str]',$end) 5032 5032 ); 5033 5033 5034 // End Time5034 // End Time 5035 5035 if ($this->bo->prefs['common']['timeformat'] == '12') 5036 5036 { … … 5043 5043 ); 5044 5044 5045 // Priority5045 // Priority 5046 5046 $var['priority'] = Array( 5047 5047 'field' => lang('Priority'), … … 5051 5051 // Access 5052 5052 $var['access'] = Array( 5053 'field' => lang('Type'),5054 'data' => '<select onchange="javascript:changeViewMode(this.value);" id="cal[type]" name="cal[type]" '.($event['type'] == 'H'?'DISABLED':'').'><option value="normal" '.(($event['public'] && $event['type'] == 'E')?'SELECTED':'').' >'.lang('Normal').'</option><option value="private" '.((!$event['public'] && $event['type'] == 'E')?'SELECTED':'').' >'. lang('Restrict').'</option><option value="privateHiddenFields" '.($event['type']=='P'?'SELECTED':'').' >'. lang('Private').'</option><option value="hourAppointment" '.($event['type'] == 'H'?'SELECTED':'').' >'.lang('Hours Appointment').'</option></select>'5053 'field' => lang('Type'), 5054 'data' => '<select onchange="javascript:changeViewMode(this.value);" id="cal[type]" name="cal[type]" '.($event['type'] == 'H'?'DISABLED':'').'><option value="normal" '.(($event['public'] && $event['type'] == 'E')?'SELECTED':'').' >'.lang('Normal').'</option><option value="private" '.((!$event['public'] && $event['type'] == 'E')?'SELECTED':'').' >'. lang('Restrict').'</option><option value="privateHiddenFields" '.($event['type']=='P'?'SELECTED':'').' >'. lang('Private').'</option><option value="hourAppointment" '.($event['type'] == 'H'?'SELECTED':'').' >'.lang('Hours Appointment').'</option></select>' 5055 5055 ); //event['public'] 5056 5056 … … 5066 5066 { 5067 5067 $str .= '<option value="' . $id.$event['participants'][$id] . '"'.($event['participants'][$id]?' selected':'').'>('.$GLOBALS['phpgw']->accounts->get_type($id) 5068 5068 .') ' . $GLOBALS['phpgw']->common->grab_owner_name($id) . '</option>' . "\n"; 5069 5069 } 5070 5070 } 5071 5071 $var['participants'] = array 5072 (5073 'field' => '<input type="button" value="' . lang('Participants') . '" onClick="accounts_popup();">' . "\n"5074 5075 'data' => "\n".' <select name="participants[]" multiple size="7">' . "\n" . $str . '</select>'5076 );5072 ( 5073 'field' => '<input type="button" value="' . lang('Participants') . '" onClick="accounts_popup();">' . "\n" 5074 . '<input type="hidden" name="accountid" value="' . $accountid . '">', 5075 'data' => "\n".' <select name="participants[]" multiple size="7">' . "\n" . $str . '</select>' 5076 ); 5077 5077 break; 5078 5078 default: … … 5089 5089 $str = utf8_decode($str); 5090 5090 $footer_ext_participantes = '<br> '.lang("The email addresses must be separated by ','"); 5091 5091 5092 5092 $var['participants'] = array 5093 5093 ( 5094 5094 'field' => lang('Participants'), 5095 5095 'data' => " 5096 <table width='100%' border='0'> 5097 <tr> 5098 <td width='30%'> 5099 <center>Participantes</center> 5100 </td> 5101 <td width='8%' > </td> 5102 <td width='40%'> </td> 5103 </tr> 5104 <tr> 5105 <td width='30%'> 5106 <center><select id='user_list' name='participants[]' style='width: 220px' multiple size='7'>".$str."</select></center> 5107 </td> 5108 <td width='8%'> 5109 <center> 5110 <table width='100%' border='0'> 5111 <tr height='5'><td> </td></tr> 5112 <tr><td align='center'> 5113 <button type='button' onClick='javascript:openListUsers(340,533, " 5114 .$event['owner']. 5115 ")'><img src='calendar/templates/".$_SESSION['phpgw_info']['calendar']['user']['preferences']['common']['template_set']."/images/add.png' style='vertical-align: middle;' > Adicionar</button> 5116 </td> 5117 </tr> 5118 <tr height='5'><td> </td></tr> 5119 <tr><td align='center'> 5120 <button type='button' onClick='javascript:rem()'><img src='calendar/templates/".$_SESSION['phpgw_info']['calendar']['user']['preferences']['common']['template_set']."/images/rem.png' style='vertical-align: middle;' > Remover</button> 5121 </td> 5122 </tr> 5123 </table> 5124 </center> 5125 </td> 5126 <td width='40%'> </td> 5127 </tr> 5128 </table> 5129 <script src='{$GLOBALS['phpgw'] -> link( '/calendar' )}/js/edit.js' type='text/javascript'></script> 5130 " 5096 <table width='100%' border='0'> 5097 <tr> 5098 <td width='30%'> 5099 <center>Participantes</center> 5100 </td> 5101 <td width='8%' > </td> 5102 <td width='40%'> </td> 5103 </tr> 5104 <tr> 5105 <td width='30%'> 5106 <center><select id='user_list' name='participants[]' style='width: 220px' multiple size='7'>".$str."</select></center> 5107 </td> 5108 <td width='8%'> 5109 <center> 5110 <table width='100%' border='0'> 5111 <tr height='5'><td> </td></tr> 5112 <tr><td align='center'> 5113 <button type='button' onClick='javascript:openListUsers(340,533, " 5114 .$event['owner']. 5115 ")'><img src='calendar/templates/".$_SESSION['phpgw_info']['calendar']['user']['preferences']['common']['template_set']."/images/add.png' style='vertical-align: middle;' > Adicionar</button> 5116 </td> 5117 </tr> 5118 <tr height='5'><td> </td></tr> 5119 <tr><td align='center'> 5120 <button type='button' onClick='javascript:rem()'><img src='calendar/templates/".$_SESSION['phpgw_info']['calendar']['user']['preferences']['common']['template_set']."/images/rem.png' style='vertical-align: middle;' > Remover</button> 5121 </td> 5122 </tr> 5123 </table> 5124 </center> 5125 </td> 5126 <td width='40%'> </td> 5127 </tr> 5128 </table> 5129 <script src='{$GLOBALS['phpgw'] -> link( '/calendar' )}/js/edit.js' type='text/javascript'></script>" 5131 5130 ); 5131 5132 5132 // if ExpressoMail 1.2 has been installed and enabled, show the plugin using AJAX. 5133 if($GLOBALS['phpgw_info']['server']['cal_expressoMail']) { 5133 if($GLOBALS['phpgw_info']['server']['cal_expressoMail']) { 5134 5134 $module_name = 'expressoMail'.(str_replace("1.","1_",$GLOBALS['phpgw_info']['server']['cal_expressoMail'])); 5135 5135 … … 5179 5179 'field' => ' 5180 5180 <script src="'.$GLOBALS['phpgw'] -> link( '/calendar' ).'/js/edit.js" type="text/javascript"></script><div id=\'disponibility\' style=\'display:none;position:absolute\' bgcolor=\'#FFFFFF\'> 5181 <iframe src=\'#\' id=\'frame_disponibility\' width=\'500\' marginHeight=\'0\' marginWidth=\'0\' height=\'200px\'></iframe>5182 </div>5181 <iframe src=\'#\' id=\'frame_disponibility\' width=\'500\' marginHeight=\'0\' marginWidth=\'0\' height=\'200px\'></iframe> 5182 </div> 5183 5183 '.lang('Participants'), 5184 'data' => '5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5184 'data' => ' 5185 <input type="hidden" id="txt_loading" value="'.lang("Loading").'">' . 5186 '<input type="hidden" id="txt_searching" value="'.lang("Searching").'">' . 5187 '<input type="hidden" id="txt_users" value="'.lang("Users").'">' . 5188 '<input type="hidden" id="txt_groups" value="'.lang("Groups").'">' . 5189 '<table width="100%" border="0">'. 5190 '<tr>'. 5191 '<td width="25%"><br><br>'. 5192 '<br><br> <b>'.lang("Event's participants").'</b><br>'. 5193 ' <select id="user_list" name="participants[]" style="width: 300px" multiple size="13">'.$str.'</select>'. 5194 '</td>'. 5195 '<td width="30px" valign="middle" align="center"> '. 5196 '</td>'. 5197 '<td valign="bottom">'. 5198 ' '.lang("Organization").': '. 5199 ' <select name="org_context" id="combo_org" onchange="javascript:get_available_users(\''.$module_name.'\',this.value,\''.($recursive ? "" : "search").'\',\''.$GLOBALS['phpgw_info']['server']['auto_search'].'\');">'.$combo_org.'</select>'. 5200 ' <br>'. 5201 ' <font color="red"><span id="cal_span_searching"> </span></font>'. 5202 ' <br>'.lang("Search for").':'. 5203 ' <input value="" id="cal_input_searchUser" size="35" autocomplete="off" onkeyup="javascript:optionFinderTimeout(this,'.$GLOBALS['phpgw_info']['server']['min_num_characters'].',\''.($recursive ? "" : "search").'\',\''.$GLOBALS['phpgw_info']['server']['auto_search'].'\')"><br>'. 5204 ' <b>'.lang("Available users and groups").'</b><br>'. 5205 ' <select id="user_list_in" style="width: 300px" multiple size="13"></select>'. 5206 '</td>'. 5207 '</tr>'. 5208 '<tr>'. 5209 '<td width="25%">'. 5210 '<button type="button" id="time_map" onClick="javascript:show_disponibility();">'.lang("Disponibility map").'</button>'. 5211 '</td>'. 5212 '<td width="30px" valign="middle" align="center"> '. 5213 '</td>'. 5214 '<td valign="bottom">'. 5215 '<button type="button" onClick="javascript:add_user();"><img src="calendar/templates/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'].'/images/add.png" style="vertical-align: middle;" > '.lang("Add").'</button>'. 5216 ' <button type="button" onClick="javascript:remove_user();"><img src="calendar/templates/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'].'/images/rem.png" style="vertical-align: middle;" > '.lang("Remove").'</button>'. 5217 '</td>'. 5218 '</tr>'. 5219 '</table>'. 5220 '<script type="text/javascript" src="' . $GLOBALS[ 'phpgw' ] -> link( '/phpgwapi/js/dJSWin/dJSWin.js' ) .'"></script>'. 5221 '<script src="' . $GLOBALS[ 'phpgw' ] -> link( '/calendar/js/edit_exmail.js' ) . '" type="text/javascript"></script>' . 5222 $load_lang_vars. 5223 "<script type='text/javascript'>var DEFAULT_URL = '".$module_name."/controller.php?action=';</script> ". 5224 "<script type='text/javascript'>" . 5225 "var timeout_get_available_users = setTimeout('get_available_users(\"".$module_name."\",\'".$user_context."\',\'".($recursive ? "" : "search")."\',\'".$GLOBALS['phpgw_info']['server']['auto_search']."\')',1000);". 5226 "</script> " 5227 5227 ); 5228 5228 } 5229 5229 } 5230 5230 5231 5231 $var['participants']['data'] .= '<br /><a id="a_ext_participants" title="'.lang("It types below the email addresses, if you want to invite other people out" . 5232 5232 " of this system").'" name="a_ext_participants" onClick="javascript:showExParticipants(this,\''.$module_name.'\');return false;" href="#a_ext_participants"><b>'.lang("Inform").' '.lang("external participants").'</b> <img align="top" ' . … … 5246 5246 '</table>'; 5247 5247 break; 5248 5249 }5248 5249 } 5250 5250 if((($event['id'] > 0) && isset($event['participants'][$event['owner']])) || !$event['id']) 5251 5251 { -
trunk/calendar/js/edit_exmail.js
r2748 r2802 164 164 var count_users = select_users.options.length; 165 165 var new_options = ''; 166 166 167 for ( var i = 0; i < count_available_users; i++ ) 168 if ( select_available_users.options[ i ].selected ) 169 { 170 select_users.appendChild( select_available_users.options[ i-- ] ); 171 count_available_users--; 172 } 173 174 /* 167 175 for (i = 0 ; i < count_available_users ; i++) { 168 176 if (select_available_users.options[i].selected) { … … 195 203 select_users.outerHTML = select_users.outerHTML; 196 204 } 205 */ 197 206 } 198 207 -
trunk/calendar/templates/default/edit.tpl
r1154 r2802 15 15 Window1=window.open('{accounts_link}',"Search","width=800,height=600,toolbar=no,scrollbars=yes,resizable=yes"); 16 16 } 17 function send_form( ) 18 { 19 var participants; 20 21 if ( ( participants = document.getElementById( 'user_list_in' ) ) ) 22 for ( var i = 0; i < participants.length; i++ ) 23 participants.options[ i ].selected = false; 24 25 if ( ( participants = document.getElementById( 'user_list' ) ) ) 26 for ( var i = 0; i < participants.length; i++ ) 27 participants.options[ i ].selected = true; 28 29 return ExpressoLivre.form( arguments[ 0 ].parentNode.removeChild( arguments[ 0 ] ) ); 30 } 17 31 </script> 18 32 <center> 19 33 <font color="#000000" face="{font}"> 20 34 21 <form action="{action_url}" method="post" name="app_form" >35 <form action="{action_url}" method="post" name="app_form" onsubmit="return send_form( this );"> 22 36 {common_hidden} 23 37 <table id="editFormTable" border="0" width="90%" class="prefTable">
Note: See TracChangeset
for help on using the changeset viewer.