form->getValue('catid'); if ((int)$catid > 0) { $suffix .= '&catid='.$catid; } else { $suffix .= '&catid=0'; } $link = 'index.php?option=com_phocagallery&view=phocagalleryytb&tmpl=component&field='.$this->id.$suffix; // Initialize some field attributes. $class = $this->element['class'] ? ' class="'.(string) $this->element['class'].'"' : ''; $disabled = ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : ''; $columns = $this->element['cols'] ? ' cols="'.(int) $this->element['cols'].'"' : ''; $rows = $this->element['rows'] ? ' rows="'.(int) $this->element['rows'].'"' : ''; //$required = ($v = $this->element['required']) ? ' required="required"' : ''; // Initialize JavaScript field attributes. $onchange = (string) $this->element['onchange']; HTMLHelper::_('jquery.framework'); $idA = 'pgselectytb'; // Build the script. $script = array(); $script[] = ' function phocaSelectYtb_'.$this->id.'(link, title, desc, filename) {'; $script[] = ' document.getElementById("'.$this->id.'").value = link;'; $script[] = ' document.getElementById("jform_title").value = title;'; $script[] = ' document.getElementById("jform_description").value = desc;'; $script[] = ' document.getElementById("jform_filename").value = filename;'; $script[] = ' '.$onchange; //$script[] = ' SqueezeBox.close();'; //$script[] = ' jQuery(\'#'.$idA.'\').modal(\'toggle\');'; $script[] = ' jQuery(\'#'.$idA.'\').modal(\'hide\');'; $script[] = ' }'; // Add the script to the document head. Factory::getDocument()->addScriptDeclaration(implode("\n", $script)); /* $html[] = '