element['onchange']; //$size = ($v = $this->element['size']) ? ' size="' . $v . '"' : ''; //$class = ($v = $this->element['class']) ? ' class="' . $v . '"' : 'class="form-control"'; $required = ($v = $this->element['required']) ? ' required="required"' : ''; // Initialize some field attributes. $attr = $this->element['class'] ? ' class="'.(string) $this->element['class'].'"' : 'form-control'; $attr .= $this->element['size'] ? ' size="'.(int) $this->element['size'].'"' : ''; // Manager $manager = $this->element['manager'] ? $this->element['manager'] : ''; $managerOutput = $this->element['manager'] ? '&manager='.(string) $this->element['manager'] : ''; $idA .= 'mo' . $manager; $group = PhocaDownloadSettings::getManagerGroup((string) $this->element['manager']); $textButton = 'COM_PHOCADOWNLOAD_FORM_SELECT_'.strtoupper($group['t']); $link = 'index.php?option=com_phocadownload&view=phocadownloadmanager'.$group['c'].$managerOutput.'&field='.$this->id; HTMLHelper::_('jquery.framework'); $script = array(); $script[] = ' function phocaSelectFileName_'.$this->id.'(title) {'; $script[] = ' document.getElementById("'.$this->id.'").value = title;'; $script[] = ' '.$onchange; //$script[] = ' jModalClose();'; $script[] = ' jQuery(\'#'.$idA.'\').modal(\'toggle\');'; //$script[] = ' SqueezeBox.close();'; //$script[] = ' jQuery(\'#'.$idA.'\').modal(\'toggle\');'; $script[] = ' }'; // Add the script to the document head. Factory::getDocument()->addScriptDeclaration(implode("\n", $script)); $html[] = '
'; $html[] = ''; $html[] = '' . ' ' . Text::_($textButton) . ''; $html[] = '
'. "\n"; $html[] = HTMLHelper::_( 'bootstrap.renderModal', $idA, array( 'url' => $link, 'title' => Text::_($textButton), 'width' => '', 'height' => '', 'modalWidth' => '80', 'bodyHeight' => '80', 'footer' => '
' ) ); return implode("\n", $html); // Load the modal behavior script. //JHtml::_('behavior.modal', 'a.modal_'.$this->id); // Build the script. /* $script = array(); $script[] = ' function phocaSelectFileName_'.$this->id.'(title) {'; $script[] = ' document.getElementById("'.$this->id.'_id").value = title;'; $script[] = ' '.$onchange; $script[] = ' SqueezeBox.close();'; $script[] = ' }'; // Add the script to the document head. Factory::getDocument()->addScriptDeclaration(implode("\n", $script)); */ /*$html[] = '
'; $html[] = ' '; $html[] = '
'; // Create the user select button. $html[] = '
'; $html[] = '
'; $html[] = ' '; $html[] = ' '.Text::_($textButton).''; $html[] = '
'; $html[] = '
';*/ /* Factory::getDocument()->addScriptDeclaration(' function phocaSelectFileName_' . $this->id . '(name) { document.getElementById("' . $this->id . '").value = name; jQuery(\'#'.$idA.'\').modal(\'toggle\'); } ');*/ /*$html[] = ''; $html[] = '' . ' ' . Text::_($textButton) . ''; $html[] = HTMLHelper::_( 'bootstrap.renderModal', $idA, array( 'url' => $link, 'title' => Text::_($textButton), 'width' => '700px', 'height' => '400px', 'modalWidth' => '80', 'bodyHeight' => '70', 'footer' => '' ) );*/ } }