load('mod_roknavmenu', JPATH_BASE, null, false, false) || $lang->load('mod_roknavmenu', JPATH_SITE.'/modules/mod_roknavmenu', null, false, false) || $lang->load('mod_roknavmenu', JPATH_BASE, $lang->getDefault(), false, false) || $lang->load('mod_roknavmenu', JPATH_SITE.'/modules/mod_roknavmenu', $lang->getDefault(), false, false); // Get the client id. $clientId = $this->element['client_id']; if (!isset($clientId)) { $clientName = $this->element['client']; if (isset($clientName)) { $client = JApplicationHelper::getClientInfo($clientName, true); $clientId = $client->id; } } if (!isset($clientId) && $this->form instanceof JForm) { $clientId = $this->form->getValue('client_id'); } $clientId = (int) $clientId; // Load the modal behavior script. JHtml::_('behavior.modal', 'a.modal'); // Build the script. $script = array(); $script[] = ' function jSelectPosition_'.$this->id.'(name) {'; $script[] = ' document.id("'.$this->id.'").value = name;'; $script[] = ' SqueezeBox.close();'; $script[] = ' }'; // Add the script to the document head. JFactory::getDocument()->addScriptDeclaration(implode("\n", $script)); // Setup variables for display. $html = array(); $link = 'index.php?option=com_modules&view=positions&layout=modal&tmpl=component&function=jSelectPosition_'.$this->id.'&client_id='.$clientId; // The current user display field. $html[] = '
'; $html[] = parent::getInput(); $html[] = '
'; // The user select button. $html[] = '
'; $html[] = '
'; $html[] = ' '.JText::_('MOD_ROKNAVMENU_SELECT_MODULE_POSITION').''; $html[] = '
'; $html[] = '
'; return implode("\n", $html); } }