/** * define odominio, cdn, onde o JS da grid estará armazenado * * <strong>NOTA</strong>: A estrutura de pastas será sempre __DOMAIN__/component/js/grid.js<br /> * Onde: __DOMAIN__ representa o dominio informando a este metodo. * * @param string $domain * @return Grid * */ public function setUrlJS($domain) { $this->setUrlCSS($domain); $domain = ('/' == substr($domain, -1) ? $domain : $domain . '/') . 'component/js/SAFGrid.js'; $this->_grid->add(Javascript::factory($domain)); return $this; }
/** * @return AutoComplete * */ public function build() { $input = $this->createInputFilter(); $inputInfo = Input::factory($this->_ident . '-info', 'hidden', str_replace('"', "'", json_encode($this->infoToJS()))); $this->_autoComplete->add($input)->add($this->_curtain)->add($inputInfo)->add(Style::factory($this->getUrlCSS(), 'screen'))->add(Javascript::factory($this->getUrlJS())); return $this->_autoComplete; }