element['class'] ? ' class="'.(string) $this->element['class'].'"' : ''; $attr .= $this->element['size'] ? ' size="'.(int) $this->element['size'].'"' : ''; if ($this->id == 'jform_latitude') { // One link for latitude, longitude, zoom $lat = $this->form->getValue('latitude'); $lng = $this->form->getValue('longitude'); $zoom = $this->form->getValue('zoom'); $suffix = ''; if ($lat != '') { $suffix .= '&lat='.$lat;} if ($lng != '') { $suffix .= '&lng='.$lng;} if ($zoom != '') { $suffix .= '&zoom='.$zoom;} $link = 'index.php?option=com_phocagallery&view=phocagalleryg&tmpl=component&field='.$this->id. $suffix; HTMLHelper::_('jquery.framework'); } $idA = 'pgselectmap'; // Initialize JavaScript field attributes. $onchange = (string) $this->element['onchange']; /* // Build the script. $script = array(); $script[] = ' function phocaSelectMap_'.$this->id.'(title) {'; $script[] = ' document.getElementById("'.$this->id.'_id").value = title;'; $script[] = ' '.$onchange; //$script[] = ' SqueezeBox.close();'; $script[] = ' }';*/ // Build the script. $script = array(); $script[] = ' function phocaSelectMap_'.$this->id.'(title) {'; $script[] = ' document.getElementById("'.$this->id.'").value = title;'; $script[] = ' '.$onchange; $script[] = ' jModalClose();'; //$script[] = ' SqueezeBox.close();'; //$script[] = ' jQuery(\'#'.$idA.'\').modal(\'toggle\');'; $script[] = ' }'; // Hide Info box on start if ($this->id == 'jform_latitude') { $script[] = ' jQuery(document).ready(function() {'; $script[] = ' jQuery(\'#'.$idA.'\').on(\'shown.bs.modal\', function () {'; $script[] = ' jQuery(\'#phmPopupInfo\').html(\'\');'; $script[] = ' })'; $script[] = ' })'; } // Add the script to the document head. Factory::getDocument()->addScriptDeclaration(implode("\n", $script)); if ($this->id == 'jform_latitude') { /*$html[] = '