element['class'] ? ' class="'.(string) $this->element['class'].'"' : ''; $attr .= $this->element['size'] ? ' size="'.(int) $this->element['size'].'"' : ''; $uid = $this->form->getValue('extfbuid'); $suffix = ''; if ($uid != '') { $suffix .= '&uid='.$uid;} $link = 'index.php?option=com_phocagallery&view=phocagalleryfba&tmpl=component&field='.$this->id. $suffix; // Initialize JavaScript field attributes. $onchange = (string) $this->element['onchange']; // Build the script. /* $script = array(); $script[] = ' function phocaSelectFbAlbum_'.$this->id.'(title) {'; $script[] = ' document.getElementById("'.$this->id.'_id").value = title;'; $script[] = ' '.$onchange; $script[] = ' SqueezeBox.close();'; $script[] = ' }';*/ HTMLHelper::_('jquery.framework'); $idA = 'pgselectfbalbum'; // Build the script. $script = array(); $script[] = ' function phocaSelectFBAlbum_'.$this->id.'(title) {'; $script[] = ' document.getElementById("'.$this->id.'").value = title;'; $script[] = ' '.$onchange; //$script[] = ' SqueezeBox.close();'; $script[] = ' jQuery(\'#'.$idA.'\').modal(\'toggle\');'; $script[] = ' }'; $script[] = 'window.closeModal = function(){'; $script[] = ' jQuery(\'#'.$idA.'\').modal(\'hide\');'; $script[] = '}'; // Add the script to the document head. Factory::getDocument()->addScriptDeclaration(implode("\n", $script)); /* $html[] = '