Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 47 |
CRAP | |
0.00% |
0 / 117 |
| TCalendar | |
0.00% |
0 / 1 |
|
0.00% |
0 / 47 |
6806 | |
0.00% |
0 / 117 |
| __construct | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 17 |
|||
| show | |
0.00% |
0 / 1 |
552 | |
0.00% |
0 / 32 |
|||
| setHeight | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 3 |
|||
| getHeight | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
|||
| setContentHeight | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getContentHeight | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
|||
| setAspectRatio | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getAspectRatio | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
|||
| setShowHeader | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getShowHeader | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
|||
| setShowTitle | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getShowTitle | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
|||
| setShowNavigatorButtons | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getShowNavigatorButtons | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
|||
| setShowTodayButton | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getShowTodayButton | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
|||
| setShowMonthButton | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getShowMonthButton | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
|||
| setShowDayButton | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getShowDayButton | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
|||
| setShowWeekButton | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getShowWeekButton | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
|||
| setBasicView | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getBasicView | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
|||
| getView | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
|||
| setShowWeekends | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getShowWeekends | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
|||
| setUrl | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getUrl | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| setJsOnResize | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getJsOnResize | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| setJsOnDrag | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getJsOnDrag | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| setJsOnDrop | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getJsOnDrop | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| setJsOnEventClick | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getJsOnEventClick | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| setJsMouseOver | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getJsMouseOver | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| setDefaultView | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getDefaultView | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| setJsEventRender | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getJsEventRender | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| setJsOnSelectDay | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getJsOnSelectDay | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| setJsViewDisplay | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getJsViewDisplay | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| 1 | <?php |
| 2 | /* |
| 3 | * Formdin Framework |
| 4 | * Copyright (C) 2012 Ministério do Planejamento |
| 5 | * Criado por Luís Eugênio Barbosa |
| 6 | * Essa versão é um Fork https://github.com/bjverde/formDin |
| 7 | * |
| 8 | * ---------------------------------------------------------------------------- |
| 9 | * This file is part of Formdin Framework. |
| 10 | * |
| 11 | * Formdin Framework is free software; you can redistribute it and/or |
| 12 | * modify it under the terms of the GNU Lesser General Public License version 3 |
| 13 | * as published by the Free Software Foundation. |
| 14 | * |
| 15 | * This program is distributed in the hope that it will be useful, |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | * GNU General Public License for more details. |
| 19 | * |
| 20 | * You should have received a copy of the GNU Lesser General Public License version 3 |
| 21 | * along with this program; if not, see <http://www.gnu.org/licenses/> |
| 22 | * or write to the Free Software Foundation, Inc., 51 Franklin Street, |
| 23 | * Fifth Floor, Boston, MA 02110-1301, USA. |
| 24 | * ---------------------------------------------------------------------------- |
| 25 | * Este arquivo é parte do Framework Formdin. |
| 26 | * |
| 27 | * O Framework Formdin é um software livre; você pode redistribuí-lo e/ou |
| 28 | * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação |
| 29 | * do Software Livre (FSF). |
| 30 | * |
| 31 | * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA |
| 32 | * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou |
| 33 | * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português |
| 34 | * para maiores detalhes. |
| 35 | * |
| 36 | * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título |
| 37 | * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/> |
| 38 | * ou escreva para a Fundação do Software Livre (FSF) Inc., |
| 39 | * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. |
| 40 | */ |
| 41 | |
| 42 | class TCalendar extends TControl |
| 43 | { |
| 44 | private $height; |
| 45 | private $contentHeight; |
| 46 | private $aspectRatio; |
| 47 | private $showHeader; |
| 48 | private $showTitle; |
| 49 | private $showNavigatorButtons; |
| 50 | private $showTodayButton; |
| 51 | private $showDayButton; |
| 52 | private $showMonthButton; |
| 53 | private $showWeekButton; |
| 54 | private $showWeekends; |
| 55 | private $basicView; |
| 56 | private $buttons; |
| 57 | private $views; |
| 58 | private $url; |
| 59 | |
| 60 | private $jsOnResize; |
| 61 | private $jsOnDrag; |
| 62 | private $jsOnDrop; |
| 63 | private $jsOnEventClick; |
| 64 | private $jsOnSelectDay; |
| 65 | private $jsMouseOver; |
| 66 | private $jsEventRender; |
| 67 | private $jsViewDisplay; |
| 68 | private $defaultView; |
| 69 | |
| 70 | /*** |
| 71 | * Criação de campo calendário de eventos tipo agenda |
| 72 | * http://arshaw.com/fullcalendar/docs/event_data/Event_Object/ |
| 73 | * |
| 74 | * @param string $strName |
| 75 | * @param string $strUrl |
| 76 | * @param string $strHeight |
| 77 | * @param string $strWidth |
| 78 | * @param mixed $defaultView |
| 79 | * @param string $jsOnResize |
| 80 | * @param string $jsOnDrag |
| 81 | * @param string $jsOnDrop |
| 82 | * @param string $jsOnEventClick |
| 83 | * @param string $jsOnSelectDay |
| 84 | * @param string $jsMouseOver |
| 85 | * @param string $jsViewDisplay |
| 86 | */ |
| 87 | public function __construct($strName, $strUrl=null, $strHeight=null, $strWidth=null, $defaultView=null, $jsOnResize=null, $jsOnDrag=null, $jsOnDrop=null, $jsOnEventClick=null, $jsOnSelectDay=null, $jsMouseOver=null, $jsEventRender=null, $jsViewDisplay=null) |
| 88 | { |
| 89 | //parent::__construct('fieldset',$strName); |
| 90 | parent::__construct('div', $strName); |
| 91 | parent::setFieldType('fullcalendar'); |
| 92 | $this->setClass('fwHtml'); |
| 93 | $this->setCss('margin','0'); |
| 94 | $this->setUrl($strUrl); |
| 95 | $this->setWidth($strWidth); |
| 96 | $this->setHeight($strHeight); |
| 97 | $this->setJsOnResize($jsOnResize); |
| 98 | $this->setJsOnDrag($jsOnDrag); |
| 99 | $this->setJsOnDrop($jsOnDrop); |
| 100 | $this->setJsOnEventClick($jsOnEventClick); |
| 101 | $this->setJsMouseOver($jsMouseOver); |
| 102 | $this->setDefaultView($defaultView); |
| 103 | $this->setJsOnSelectDay($jsOnSelectDay); |
| 104 | $this->setJsEventRender($jsEventRender); |
| 105 | $this->setJsViewDisplay($jsViewDisplay); |
| 106 | // $this->setIncludeFile($strIncludeFile); |
| 107 | // $this->setLoadingMessage($strLoadingMessage); |
| 108 | } |
| 109 | |
| 110 | //------------------------------------------------------------------------------------- |
| 111 | public function show($print=true) |
| 112 | { |
| 113 | $script=new TElement('<script>'); |
| 114 | $script->add(' |
| 115 | jQuery(document).ready(function() { |
| 116 | |
| 117 | var date = new Date(); |
| 118 | var d = date.getDate(); |
| 119 | var m = date.getMonth(); |
| 120 | var y = date.getFullYear(); |
| 121 | |
| 122 | var selecionavel; |
| 123 | |
| 124 | jQuery("#'. $this->getName(). '").fullCalendar({ |
| 125 | '.( ($aux=$this->getAspectRatio()) ? "aspectRatio: {$aux}," : '' ) .' |
| 126 | '.( ($aux=$this->getHeight()) ? "height: {$aux}," : '' ) .' |
| 127 | '.( ($aux=$this->getContentHeight()) ? "contentHeight: {$aux}," : '' ) .' |
| 128 | theme: true, |
| 129 | monthNames: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", |
| 130 | "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], |
| 131 | monthNamesShort: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", |
| 132 | "Jul", "Ago", "Set", "Out", "Nov", "Dec"], |
| 133 | dayNames: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sabado"], |
| 134 | dayNamesShort: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"], |
| 135 | allDayText : "Dia todo", |
| 136 | firstHour : 6, |
| 137 | buttonText: { |
| 138 | today: "Hoje", |
| 139 | month: "Mês", |
| 140 | week: "Semana", |
| 141 | day: "Dia" |
| 142 | }, |
| 143 | header: ' . |
| 144 | ($this->getShowHeader() == false ? |
| 145 | 'false' : |
| 146 | '{ |
| 147 | left: "' . |
| 148 | ($this->getShowNavigatorButtons() ? 'prev,next' : '') . |
| 149 | ($this->getShowTodayButton() ? ',today' : '') . |
| 150 | '", |
| 151 | center: "' . |
| 152 | ($this->getShowTitle() ? 'title' : '') . |
| 153 | '", |
| 154 | right: "' . |
| 155 | ($this->getShowMonthButton() ? 'month' : '') . |
| 156 | ($this->getShowWeekButton() ? ','.$this->getView().'Week' : '') . |
| 157 | ($this->getShowDayButton() ? ','.$this->getView().'Day' : '') . |
| 158 | '" |
| 159 | }') . ', |
| 160 | loading: function (carregando) { |
| 161 | selecionavel = !carregando;}, |
| 162 | lazyFetching: false, |
| 163 | defaultView: "' . ($this->getDefaultView() ? $this->getDefaultView() : "month") . '", |
| 164 | weekends: ' . ($this->getShowWeekends() ? 'true' : 'false') . ' , |
| 165 | |
| 166 | eventSources: [ { |
| 167 | url: "'.$this->getUrl().'", |
| 168 | type: "POST", |
| 169 | data: { ajax:1 }, |
| 170 | error: function() { alert("Erro ao carregar os eventos da Agenda!");} |
| 171 | }], |
| 172 | eventResize: '.($this->getJsOnResize() ? $this->getJsOnResize() : 'null').', |
| 173 | eventDragStart: '.($this->getJsOnDrag() ? $this->getJsOnDrag() : 'null').', |
| 174 | eventDrop: '.($this->getJsOnDrop() ? $this->getJsOnDrop() : 'null').', |
| 175 | eventClick: '.($this->getJsOnEventClick() ? $this->getJsOnEventClick() : 'null').', |
| 176 | eventMouseover: '.($this->getJsMouseOver() ? $this->getJsMouseOver() : 'null').', |
| 177 | editable: '.($this->getReadOnly() ? 'false' : 'true').', |
| 178 | eventRender: '.($this->getJsEventRender() ? $this->getJsEventRender() : 'null').', |
| 179 | selectable: '.($this->getJsOnSelectDay() ? 'true' : 'false').', |
| 180 | select: '.($this->getJsOnSelectDay() ? $this->getJsOnSelectDay() : 'null').', |
| 181 | |
| 182 | viewDisplay: '.($this->getJsViewDisplay() ? $this->getJsViewDisplay() : 'null').' |
| 183 | }); |
| 184 | }); |
| 185 | '); |
| 186 | //$this->add(); |
| 187 | |
| 188 | return parent::show($print).$script->show($print); |
| 189 | } |
| 190 | /* |
| 191 | select: function (dataInicial, dataFinal) { |
| 192 | if (selecionavel) { |
| 193 | // Executa código |
| 194 | }}*/ |
| 195 | //------------------------------------------------------------------------------------- |
| 196 | |
| 197 | /** |
| 198 | * @param integer $newHeight Tamanho da área total ocupada pelo calendário |
| 199 | * @return TCalendar |
| 200 | */ |
| 201 | public function setHeight($newHeight=null) |
| 202 | { |
| 203 | parent::setHeight($newHeight); |
| 204 | $this->height = (int) ($newHeight - 10); |
| 205 | return $this; |
| 206 | } |
| 207 | public function getHeight($strMinHeight = null) |
| 208 | { |
| 209 | return ( is_integer($this->height) ) ? $this->height : null; |
| 210 | } |
| 211 | |
| 212 | /** |
| 213 | * @param integer $newContentHeight Tamanho do calendário |
| 214 | * @return TCalendar |
| 215 | */ |
| 216 | public function setContentHeight($newContentHeight=null) |
| 217 | { |
| 218 | $this->contentHeight = $newContentHeight; |
| 219 | return $this; |
| 220 | } |
| 221 | public function getContentHeight() |
| 222 | { |
| 223 | return ( is_integer($this->contentHeight) ) ? $this->contentHeight : null; |
| 224 | } |
| 225 | |
| 226 | /** |
| 227 | * @param float $newAspectRatio Proporção entra largura e altura do calendário |
| 228 | * @return TCalendar |
| 229 | */ |
| 230 | public function setAspectRatio($newAspectRatio=null) |
| 231 | { |
| 232 | $this->aspectRatio = $newAspectRatio; |
| 233 | return $this; |
| 234 | } |
| 235 | public function getAspectRatio() |
| 236 | { |
| 237 | return ( is_integer($this->aspectRatio) ) ? $this->aspectRatio : null; |
| 238 | } |
| 239 | |
| 240 | /** |
| 241 | * @param boolean $boolShowHeader Informa se deve exibir o cabeçalho |
| 242 | * @return TCalendar |
| 243 | */ |
| 244 | public function setShowHeader($boolShowHeader=null) |
| 245 | { |
| 246 | $this->showHeader = $boolShowHeader; |
| 247 | return $this; |
| 248 | } |
| 249 | public function getShowHeader() |
| 250 | { |
| 251 | return ( $this->showHeader === false) ? false : true; |
| 252 | } |
| 253 | |
| 254 | /** |
| 255 | * @param boolean $boolShowTitle Informa se deve exibir o título "Ex: Janeiro 2000". |
| 256 | * @return TCalendar |
| 257 | */ |
| 258 | public function setShowTitle($boolShowTitle=null) |
| 259 | { |
| 260 | $this->showTitle = $boolShowTitle; |
| 261 | return $this; |
| 262 | } |
| 263 | public function getShowTitle() |
| 264 | { |
| 265 | return ( $this->showTitle === false) ? false : true; |
| 266 | } |
| 267 | |
| 268 | /** |
| 269 | * @param boolean $boolShowNavigatorButtons Informa se deve exibir os botões de navegação (anterior e próximo). |
| 270 | * @return TCalendar |
| 271 | */ |
| 272 | public function setShowNavigatorButtons($boolShowNavigatorButtons=null) |
| 273 | { |
| 274 | $this->showNavigatorButtons = $boolShowNavigatorButtons; |
| 275 | return $this; |
| 276 | } |
| 277 | public function getShowNavigatorButtons() |
| 278 | { |
| 279 | return ( $this->showNavigatorButtons === false) ? false : true; |
| 280 | } |
| 281 | |
| 282 | /** |
| 283 | * @param boolean $boolShowTodayButton Informa se deve exibir o botão "Hoje". |
| 284 | * @return TCalendar |
| 285 | */ |
| 286 | public function setShowTodayButton($boolShowTodayButton=null) |
| 287 | { |
| 288 | $this->showTodayButton = $boolShowTodayButton; |
| 289 | return $this; |
| 290 | } |
| 291 | public function getShowTodayButton() |
| 292 | { |
| 293 | return ( $this->showTodayButton === false) ? false : true; |
| 294 | } |
| 295 | |
| 296 | /** |
| 297 | * @param boolean $boolShowMonthButton Informa se deve exibir o botão "Mês". |
| 298 | * @return TCalendar |
| 299 | */ |
| 300 | public function setShowMonthButton($boolShowMonthButton=null) |
| 301 | { |
| 302 | $this->showMonthButton = $boolShowMonthButton; |
| 303 | return $this; |
| 304 | } |
| 305 | public function getShowMonthButton() |
| 306 | { |
| 307 | return ( $this->showMonthButton === false) ? false : true; |
| 308 | } |
| 309 | |
| 310 | /** |
| 311 | * @param boolean $boolShowDayButton Informa se deve exibir o botão "Dia". |
| 312 | * @return TCalendar |
| 313 | */ |
| 314 | public function setShowDayButton($boolShowDayButton=null) |
| 315 | { |
| 316 | $this->showDayButton = $boolShowDayButton; |
| 317 | return $this; |
| 318 | } |
| 319 | public function getShowDayButton() |
| 320 | { |
| 321 | return ( $this->showDayButton === false) ? false : true; |
| 322 | } |
| 323 | |
| 324 | /** |
| 325 | * @param boolean $boolShowWeekButton Informa se deve exibir o botão "Semana". |
| 326 | * @return TCalendar |
| 327 | */ |
| 328 | public function setShowWeekButton($boolShowWeekButton=null) |
| 329 | { |
| 330 | $this->showWeekButton = $boolShowWeekButton; |
| 331 | return $this; |
| 332 | } |
| 333 | public function getShowWeekButton() |
| 334 | { |
| 335 | return ( $this->showWeekButton === false) ? false : true; |
| 336 | } |
| 337 | |
| 338 | /** |
| 339 | * @param boolean $boolBasicView Define tipo de visão dos calendários "Semana" e "Dia" para básica ou completa. |
| 340 | * @return TCalendar |
| 341 | */ |
| 342 | public function setBasicView($boolBasicView=null) |
| 343 | { |
| 344 | $this->basicView = $boolBasicView; |
| 345 | return $this; |
| 346 | } |
| 347 | public function getBasicView() |
| 348 | { |
| 349 | return ( $this->basicView === true) ? true : false; |
| 350 | } |
| 351 | protected function getView() { |
| 352 | return ($this->getbasicView() ? 'basic' : 'agenda'); |
| 353 | } |
| 354 | |
| 355 | /** |
| 356 | * @param boolean $boolShowWeekends Informa se deve exibir fins de semana no calendário (sábado e domingo). |
| 357 | * @return TCalendar |
| 358 | */ |
| 359 | public function setShowWeekends($boolShowWeekends=null) |
| 360 | { |
| 361 | $this->showWeekends = $boolShowWeekends; |
| 362 | return $this; |
| 363 | } |
| 364 | public function getShowWeekends() |
| 365 | { |
| 366 | return ( $this->showWeekends === false) ? false : true; |
| 367 | } |
| 368 | /** |
| 369 | * str $strNewvalue Define a url onde os eventos serão carregados |
| 370 | * Ex. array(array("title"=>'Titulo do evento', "start"=>'2011-12-03', "end"=>'2011-12-04') |
| 371 | * Evento deve ser retornado pelo: echo json_encode($retorno); |
| 372 | * @param $strNewvalue |
| 373 | */ |
| 374 | public function setUrl( $strNewvalue = null) |
| 375 | { |
| 376 | $this->url = $strNewvalue; |
| 377 | } |
| 378 | public function getUrl() |
| 379 | { |
| 380 | return $this->url; |
| 381 | } |
| 382 | /** |
| 383 | * |
| 384 | * @param string $jsOnResize |
| 385 | */ |
| 386 | public function setJsOnResize($jsOnResize=null) |
| 387 | { |
| 388 | $this->jsOnResize = $jsOnResize; |
| 389 | } |
| 390 | public function getJsOnResize() |
| 391 | { |
| 392 | return $this->jsOnResize; |
| 393 | } |
| 394 | /** |
| 395 | * |
| 396 | * @param string $jsOnDrag |
| 397 | */ |
| 398 | public function setJsOnDrag($jsOnDrag=null) |
| 399 | { |
| 400 | $this->jsOnDrag = $jsOnDrag; |
| 401 | } |
| 402 | public function getJsOnDrag() |
| 403 | { |
| 404 | return $this->jsOnDrag; |
| 405 | } |
| 406 | /** |
| 407 | * |
| 408 | * @param string $jsOnDrop |
| 409 | */ |
| 410 | public function setJsOnDrop($jsOnDrop=null) |
| 411 | { |
| 412 | $this->jsOnDrop = $jsOnDrop; |
| 413 | } |
| 414 | public function getJsOnDrop() |
| 415 | { |
| 416 | return $this->jsOnDrop; |
| 417 | } |
| 418 | |
| 419 | /** |
| 420 | * @param string $jsOnEventClick Informa qual metodo javascript tratara o evento de clicar sobre um evento |
| 421 | * |
| 422 | * Deve possuir a assinatura(calEvent, jsEvent, view) |
| 423 | * calEvent -> possui os dados do evento. (Padrão: calEvent.title, calEvent.start, calEvent.end) ou os que definiu ex. calEvent.descricao |
| 424 | * jsEvent -> mostrara as coordenadas |
| 425 | * view -> a visão ativa do calendario |
| 426 | * |
| 427 | * @return TCalendar |
| 428 | */ |
| 429 | public function setJsOnEventClick($jsOnEventClick=null) |
| 430 | { |
| 431 | $this->jsOnEventClick = $jsOnEventClick; |
| 432 | } |
| 433 | public function getJsOnEventClick() |
| 434 | { |
| 435 | return $this->jsOnEventClick; |
| 436 | } |
| 437 | |
| 438 | /** |
| 439 | * @param string $jsMouseOver Informa qual metodo javascript tratara o evento mouseover |
| 440 | * |
| 441 | * Deve possuir a assinatura ( event, jsEvent, view ) |
| 442 | * @return TCalendar |
| 443 | */ |
| 444 | public function setJsMouseOver($jsMouseOver=null) |
| 445 | { |
| 446 | $this->jsMouseOver = $jsMouseOver; |
| 447 | } |
| 448 | public function getJsMouseOver() |
| 449 | { |
| 450 | return $this->jsMouseOver; |
| 451 | } |
| 452 | |
| 453 | /** |
| 454 | * @param string $defaultView Informa qual deve ser a visualização padrão do calendário, padrão month. ex:(basicWeek, basicDay, agendaWeek, agendaDay). |
| 455 | * @return TCalendar |
| 456 | */ |
| 457 | public function setDefaultView($defaultView=null) |
| 458 | { |
| 459 | $this->defaultView = $defaultView; |
| 460 | } |
| 461 | public function getDefaultView() |
| 462 | { |
| 463 | return $this->defaultView; |
| 464 | } |
| 465 | |
| 466 | |
| 467 | public function setJsEventRender($jsEventRender=null) |
| 468 | { |
| 469 | $this->jsEventRender = $jsEventRender; |
| 470 | } |
| 471 | public function getJsEventRender() |
| 472 | { |
| 473 | return $this->jsEventRender; |
| 474 | } |
| 475 | |
| 476 | public function setJsOnSelectDay($jsOnSelectDay=null) |
| 477 | { |
| 478 | $this->jsOnSelectDay = $jsOnSelectDay; |
| 479 | } |
| 480 | public function getJsOnSelectDay() |
| 481 | { |
| 482 | return $this->jsOnSelectDay; |
| 483 | } |
| 484 | |
| 485 | public function setJsViewDisplay($jsViewDisplay=null) |
| 486 | { |
| 487 | $this->jsViewDisplay = $jsViewDisplay; |
| 488 | } |
| 489 | public function getJsViewDisplay() |
| 490 | { |
| 491 | return $this->jsViewDisplay; |
| 492 | } |
| 493 | } |
| 494 | ?> |