Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 11 |
| TGridDateColumn | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
12 | |
0.00% |
0 / 11 |
| __construct | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getEdit | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 9 |
|||
| 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 | class TGridDateColumn extends TGridEditColumn |
| 42 | { |
| 43 | /** |
| 44 | * Implementa coluna para entrada datas no gride |
| 45 | * |
| 46 | * @param string $strEditName |
| 47 | * @param string $strTitle |
| 48 | * @param string $strFieldName |
| 49 | * @param string $strMaskType |
| 50 | * @param string $strWidth |
| 51 | * @param string $strAlign |
| 52 | * @param boolean $boolReadOnly |
| 53 | * @return TGridDateColumn |
| 54 | */ |
| 55 | |
| 56 | public function __construct($strEditName,$strTitle=null,$strFieldName=null,$strMaskType=null,$strWidth=null,$strAlign=null,$boolReadOnly=null) |
| 57 | { |
| 58 | parent::__construct($strEditName,$strTitle,$strFieldName,'date',10,10,$strMaskType,$strWidth,$strAlign,$boolReadOnly); |
| 59 | } |
| 60 | ///--------------------------------------------------------------------------------------------------- |
| 61 | public function getEdit() |
| 62 | { |
| 63 | $edit = new TDate(strtolower($this->getEditName()).'['.$this->getKeyValue().']',$this->getValue(),false,null,null,$this->getMask()); |
| 64 | $edit->setId(strtolower($this->getEditName()).'_'.$this->getRowNum()); |
| 65 | $edit->setExampleText(''); // não exibir o texto exemplo na frente do campo |
| 66 | $edit->setButtonVisible(false); // não exibir o botão calendário |
| 67 | $edit->setCss($this->getCss()); |
| 68 | if( is_null( $edit->getCss('border') ) ) |
| 69 | { |
| 70 | $edit->setCss('border','1px solid silver'); |
| 71 | } |
| 72 | $edit->setEvents($this->getEvents()); |
| 73 | return $edit; |
| 74 | } |
| 75 | } |
| 76 | ?> |