Changeset 4098 for branches/2.2.0.1/calendar
- Timestamp:
- 04/20/11 14:23:50 (13 years ago)
- Location:
- branches/2.2.0.1/calendar
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.0.1/calendar/inc/class.uicalendar.inc.php
r4049 r4098 506 506 507 507 } 508 509 echo $this->printer_friendly($this->print_month_new($params),lang('Weekview')); 508 if($_GET['friendly']==1) 509 echo $this->printer_friendly($this->get_month(),lang('Monthview')); 510 else 511 echo $this->printer_friendly($this->print_month_new($params),lang('Weekview')); 510 512 $GLOBALS['phpgw']->common->phpgw_footer(); 511 513 } … … 5143 5145 $m = mktime(0,0,0,$this->bo->month,1,$this->bo->year); 5144 5146 5147 $next = $GLOBALS['phpgw']->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day + 7,$this->bo->year); 5148 $prev = $GLOBALS['phpgw']->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day - 7,$this->bo->year); 5149 $prev_week_link = '<a href="'.$this->page('week','&date='.$prev['full']).'"><<</a>'; 5150 $next_week_link = '<a href="'.$this->page('week','&date='.$next['full']).'">>></a>'; 5151 5152 5145 5153 $templates = Array( 5146 5154 'new_week' => $tpl, … … 5154 5162 $p->set_var('hora_final',$result_events_json['hora_final']); 5155 5163 $p->set_var('hora_inicial',$result_events_json['hora_inicial']); 5156 5157 $p->set_var('title', lang(strftime("%B",$m)).' '.$this->bo->year);5158 $p->set_var('user',$ GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner));5164 $p->set_var('minical',$minical_prev.'<br>'.$minical_next.'<br>'.$minical_next1); 5165 $p->set_var('title',$this->bo->get_week_label()); 5166 $p->set_var('user',$prev_week_link.' '.$GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner).' '.$next_week_link); 5159 5167 $p->set_var('events_json',json_encode($result_events_json['events_to_show_json'])?json_encode($result_events_json['events_to_show_json']):'null'); 5160 5168 return $p->fp('out','day'); … … 5209 5217 ) 5210 5218 ); 5219 5220 $next = $this->bo->month + 1; 5221 $prev = $this->bo->month - 1; 5222 $nextyear = $this->bo->year; 5223 $prevyear = $this->bo->year; 5224 if ($this->bo->month == 12) 5225 { 5226 $next = 1; 5227 $nextyear = $nextyear + 1; 5228 } 5229 elseif ($this->bo->month == 1) 5230 { 5231 $prev = 12; 5232 $prevyear = $prevyear - 1; 5233 } 5234 5211 5235 $m = mktime(0,0,0,$this->bo->month,1,$this->bo->year); 5212 5236 $p->set_file($templates); … … 5214 5238 $params['period'] = 3; 5215 5239 $result_events_json = $this->print_events_to_show_json($params); 5240 $prev_month_link = '<a href="'.$this->page('month','&year='.$prevyear.'&month='.$prev.'&sday='.$sday).'"><<</a>'; 5241 $next_month_link = '<a href="'.$this->page('month','&year='.$nextyear.'&month='.$next.'&sday='.$sday).'">>></a>'; 5216 5242 $p->set_var('date',$result_events_json['date_events_json']); 5217 5243 $p->set_var('hora_final',$result_events_json['hora_final']); … … 5219 5245 $p->set_var('minical',$minical_prev.'<br>'.$minical_next.'<br>'.$minical_next1); 5220 5246 $p->set_var('title',lang(strftime("%B",$m)).' '.$this->bo->year); 5221 $p->set_var('user',$ GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner));5247 $p->set_var('user',$prev_month_link." ".$GLOBALS['phpgw']->common->grab_owner_name($this->bo->owner).' '.$next_month_link); 5222 5248 $p->set_var('events_json',json_encode($result_events_json['events_to_show_json'])?json_encode($result_events_json['events_to_show_json']):'null'); 5223 5249 return $p->fp('out','day'); … … 5337 5363 else 5338 5364 { 5339 $text =$event['title']." - ".$event['description'];5365 $text = ' - '.$event['end']['hour'].':'.$event['end']['min'].' - '.$event['title']." - ".$event['description']; 5340 5366 } 5341 5367 -
branches/2.2.0.1/calendar/js/dhtmlx/sources/ext/ext_new_week.js
r4049 r4098 174 174 return pos; 175 175 } 176 177 scheduler._pre_render_events=function(evs,hold){ 178 var hb = this.xy.bar_height; 179 var h_old = this._colsS.heights; 180 var h=this._colsS.heights=[0,0,0,0,0,0,0]; 181 182 if (!this._table_view) evs=this._pre_render_events_line(evs,hold); //ignore long events for now 183 else evs=this._pre_render_events_table(evs,hold); 184 185 if (this._table_view){ 186 if (hold) 187 this._colsS.heights = h_old; 188 else { 189 var evl = this._els["dhx_cal_data"][0].firstChild; 190 if (evl.rows){ 191 for (var i=0; i<evl.rows.length; i++){ 192 h[i]++; 193 if ((h[i])*hb > this._colsS.height-22){ // 22 - height of cell's header 194 //we have overflow, update heights 195 var cells = evl.rows[i].cells; 196 for (var j=0; j < cells.length; j++) { 197 cells[j].childNodes[1].style.height = h[i]*hb+"px"; 198 } 199 h[i]=(h[i-1]||0)+cells[0].offsetHeight; 200 } 201 h[i]=(h[i-1]||0)+evl.rows[i].cells[0].offsetHeight; 202 } 203 h.unshift(0); 204 if (evl.parentNode.offsetHeight<evl.parentNode.scrollHeight && !evl._h_fix){ 205 //we have v-scroll, decrease last day cell 206 for (var i=0; i<evl.rows.length; i++){ 207 if(this._mode=='month'){ 208 var cell = evl.rows[i].cells[6].childNodes[0]; 209 var w = cell.offsetWidth-scheduler.xy.scroll_width+"px"; 210 cell.style.width = w; 211 cell.nextSibling.style.width = w; 212 } 213 } 214 evl._h_fix=true; 215 } 216 } else{ 217 218 if (!evs.length && this._els["dhx_multi_day"][0].style.visibility == "visible") 219 h[0]=-1; 220 if (evs.length || h[0]==-1){ 221 //shift days to have space for multiday events 222 var childs = evl.parentNode.childNodes; 223 var dh = (h[0]+1)*hb+"px"; 224 for (var i=0; i<childs.length; i++) 225 if (this._colsS[i]) 226 childs[i].style.top=dh; 227 var last = this._els["dhx_multi_day"][0]; 228 last.style.top = "0px"; 229 last.style.height=dh; 230 last.style.visibility=(h[0]==-1?"hidden":"visible"); 231 last=this._els["dhx_multi_day"][1]; 232 last.style.height=dh; 233 last.style.visibility=(h[0]==-1?"hidden":"visible"); 234 last.className=h[0]?"dhx_multi_day_icon":"dhx_multi_day_icon_small"; 235 236 this._dy_shift=(h[0]+1)*hb; 237 h[0] = 0; 238 } 239 240 } 241 } 242 } 243 244 return evs; 245 }; -
branches/2.2.0.1/calendar/templates/default/new_month.tpl
r4049 r4098 30 30 <link rel="stylesheet" href="calendar/js/dhtmlx/codebase/dhtmlxscheduler.css" type="text/css" charset="utf-8"> 31 31 32 33 34 <div id='conteiner' class="th" style='width:100px; height:650px;margin-left:50px;margin-right:50px;float:left;'> 32 35 <div class='calendar_month_identifier' style='background-color:white;padding-bottom:2px;text-align:center'>{title}</div> 33 36 <div class='calendar_user_identifier' style='background-color:white;padding-bottom:2px;text-align:center'>: {user} :</div> 34 35 <div id='conteiner' class="th" style='width:100px; height:650px;margin-left:50px;margin-right:50px;float:left;'> 36 37 <div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%; border-left: 1px dotted #586A7E;'> 37 <div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:95%; border-left: 1px dotted #586A7E;'> 38 38 <div class="dhx_cal_navline" style="display: none;"> 39 39 <div class="dhx_cal_prev_button"> </div> … … 53 53 54 54 {minical} 55 56 <div class='calendar_month_identifier' style='clear:left;margin-left:50px;margin-right:50px;text-align:center'><a href="javascript:void(0)" onclick="javascript:scheduler.toPDF('calendar/js/dhtmlx/server/generate.php')">Printer Friendly</a></div> 55 <div class='calendar_month_identifier' style='clear:left;margin-left:50px;margin-right:50px;text-align:center'> </div> 57 56 <body onload="resize();loadScheduler();"></body> 58 57 -
branches/2.2.0.1/calendar/templates/default/new_week.tpl
r4049 r4098 32 32 33 33 34 35 <div id='conteiner' class="th" style='height:700px;margin-left:50px;margin-right:50px;float:left;'> 34 36 <div class='calendar_month_identifier' style='background-color:white;padding-bottom:2px;text-align:center'>{title}</div> 35 37 <div class='calendar_user_identifier' style='background-color:white;padding-bottom:2px;text-align:center'>: {user} :</div> 36 38 37 <div id='conteiner' class="th" style='height:700px;margin-left:50px;margin-right:50px;float:left;'> 38 <div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%; border-left: 1px dotted #586A7E;'> 39 <div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:95%; border-left: 1px dotted #586A7E;'> 39 40 <div class="dhx_cal_navline" style="display: none;"> 40 41 <div class="dhx_cal_prev_button"> </div> … … 54 55 {minical} 55 56 56 <div class='calendar_month_identifier' style='clear:left;margin-left:50px;margin-right:50px;text-align:center'> <a href="javascript:void(0)" onclick="javascript:scheduler.toPDF('calendar/js/dhtmlx/server/generate.php')">Printer Friendly</a></div>57 <div class='calendar_month_identifier' style='clear:left;margin-left:50px;margin-right:50px;text-align:center'> </div> 57 58 <body onload="resize();loadScheduler();"></body> 58 59
Note: See TracChangeset
for help on using the changeset viewer.