/** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise a JError object. */ function display($tpl = null) { // Get config parameters $this->_document = JFactory::getDocument(); $this->_config = JSNConfigHelper::get(); // Initialize toolbar JSNMobilizeHelper::initToolbar('JSN_MOBILIZE_PAGE_CONFIGURATION_TITLE', 'mobilize-config', false); // Get messages $msgs = ''; if (!$this->_config->get('disable_all_messages')) { $msgs = JSNUtilsMessage::getList('CONFIGURATION'); $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : ''; } // Assign variables for rendering $this->assignRef('msgs', $msgs); // Load the submenu. $input = JFactory::getApplication()->input; JSNMobilizeHelper::addSubmenu($input->get('view', 'configuration')); if (!empty($_GET['g']) && $_GET['g'] == 'data') { echo JSNHtmlAsset::loadScript('jsn/data', array('language' => array('JSN_EXTFW_GENERAL_CLOSE' => JText::_('JSN_EXTFW_GENERAL_CLOSE'))), true); } // Load assets JSNMobilizeHelper::loadAssets(); // Display the template parent::display($tpl); }
/** * Display method * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void */ public function display($tpl = null) { // Get config parameters $config = JSNConfigHelper::get(); // Set the toolbar JToolbarHelper::title(JText::_('JSN_EASYSLIDER_CONFIGURATION_SETTING')); // Add toolbar menu JSNEasySliderHelper::addToolbarMenu(); // Set the submenu JSNEasySliderHelper::addSubmenu('maintenance'); // Get messages $msgs = ''; if (!$config->get('disable_all_messages')) { $msgs = JSNUtilsMessage::getList('CONFIGURATION'); $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : ''; } // Assign variables for rendering $this->msgs = $msgs; if (!empty($_GET['g']) && $_GET['g'] == 'data') { echo JSNHtmlAsset::loadScript('jsn/data', array('language' => array('JSN_EXTFW_GENERAL_CLOSE' => JText::_('JSN_EXTFW_GENERAL_CLOSE'))), true); } // Add assets JSNEasySliderHelper::addAssets(); $this->_addAssets(); // Display the template parent::display($tpl); }
/** * Method for display page. * * @param boolean $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise a JError object. */ public function display($tpl = null) { // Load assets JSNUniformHelper::addAssets(); parent::display($tpl); echo JSNHtmlAsset::loadScript('uniform/emailuser', array(), true); }
/** * Add the libraries css and javascript * * @return void * * @since 1.6 */ protected function addAssets() { JSNHtmlAsset::registerDepends('uniform/libs/googlemaps/jquery.ui.map', array('jquery', 'jquery.ui')); JSNHtmlAsset::registerDepends('uniform/libs/googlemaps/jquery.ui.map.services', array('jquery', 'jquery.ui', 'uniform/libs/googlemaps/jquery.ui.map')); JSNHtmlAsset::registerDepends('uniform/libs/googlemaps/jquery.ui.map.extensions', array('jquery', 'jquery.ui', 'uniform/libs/googlemaps/jquery.ui.map')); JSNHtmlAsset::addScript('http://maps.google.com/maps/api/js?sensor=false&libraries=places'); echo JSNHtmlAsset::loadScript('uniform/submission', array('nextAndPreviousForm' => $this->nextAndPreviousForm), true); }
/** * Method for display page. * * @param boolean $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Exception object. */ public function display($tpl = null) { // Add assets $document = JFactory::getDocument(); JSNHtmlAsset::loadScript('mobilize/menus'); $document->addStyleSheet(JURI::base(true) . '/components/com_mobilize/assets/css/mobilize.css'); parent::display($tpl); }
/** * Method for display page. * * @param boolean $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise a JError object. */ public function display($tpl = null) { $baseUrl = JURI::base(true); $document = JFactory::getDocument(); JSNHtmlAsset::addScriptPath('mobilize', $baseUrl . '/components/com_mobilize/assets/js'); JSNHtmlAsset::loadScript('mobilize/modules'); $document->addStyleSheet(JURI::base(true) . '/components/com_mobilize/assets/css/mobilize.css'); parent::display($tpl); }
/** * Method to get the field input markup. * * @return string The field input markup. * * @since 11.1 */ protected function getInput() { $columnTableFormData = JSNUniformHelper::getFormData(); $arrayTranslated = array(); $html = "<div class=\"jsn-master\"><div id=\"page-loading\" class=\"jsn-bgloading\"><i class=\"jsn-icon32 jsn-icon-loading\"></i></div><div class=\"jsn-bootstrap menu-items\"><input type='hidden' id='uniform_field' name='" . $this->name . "' value='" . $this->value . "' /><ul class=\"jsn-items-list ui-sortable hide\" id=\"form_field\">"; $html .= "</ul></div></div>"; JSNHtmlAsset::loadScript('uniform/menusubmissions', array('value' => $this->value, 'name' => 'uniform_listField', 'columnTableFormData' => $columnTableFormData, 'language' => JSNUtilsLanguage::getTranslated($arrayTranslated))); return $html; }
/** * Add the libraries css and javascript * * @return void * * @since 1.6 */ protected function addAssets() { JSNHtmlAsset::registerDepends('uniform/libs/googlemaps/jquery.ui.map', array('jquery', 'jquery.ui')); JSNHtmlAsset::registerDepends('uniform/libs/googlemaps/jquery.ui.map.services', array('jquery', 'jquery.ui', 'uniform/libs/googlemaps/jquery.ui.map')); JSNHtmlAsset::registerDepends('uniform/libs/googlemaps/jquery.ui.map.extensions', array('jquery', 'jquery.ui', 'uniform/libs/googlemaps/jquery.ui.map')); $uri = JUri::getInstance(); JSNHtmlAsset::addScript($uri->getScheme() . '://maps.google.com/maps/api/js?sensor=false&libraries=places'); echo JSNHtmlAsset::loadScript('uniform/submission', array('nextAndPreviousForm' => $this->nextAndPreviousForm), true); JSNHtmlAsset::addScript(JSN_UNIFORM_ASSETS_URI . '/js/jsn.jquery.noconflict.js'); }
/** * Display the view * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void */ public function display($tpl = null) { // Include the component HTML helpers. $this->_path['template'] = array(JPATH_ROOT . '/plugins/system/jsnframework/libraries/joomlashine/menuitems/tmpl'); JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); // Load assets JSNBaseHelper::loadAssets(); parent::display($tpl); echo JSNHtmlAsset::loadScript('jsn/selectorFilter', array(), true); }
/** * Method to render HTML markup for a form as declared in an JForm object. * * @param object $form JForm object. * @param string $nameSpace Prefix field name with the given name-space, e.g. jform[params] * * @return string Generated HTML markup. */ public static function render($form, $nameSpace = '') { $html = array(); // Get fieldsets foreach ($form->getFieldsets() as $fieldset) { if (isset($fieldset->skipRender) and (int) $fieldset->skipRender) { continue; } // Get fieldset attributes $tag = isset($fieldset->markupTag) ? strtolower($fieldset->markupTag) : 'fieldset'; $label = $tag == 'fieldset' ? 'legend' : 'h4'; $class = isset($fieldset->class) ? ' class="' . $fieldset->class . '"' : ''; // Generate open tag $html[] = "<{$tag}{$class}>"; // Generate form legend if declared if ($fieldset->label) { $html[] = "\t<{$label}" . ($label == 'h4' ? ' class="jsn-section-header"' : '') . '>' . JText::_($fieldset->label) . "</{$label}>"; } foreach ($form->getFieldset($fieldset->name) as $field) { // Generate field container ID $id = ' id="' . $field->id . '-container' . '"'; if ($field->label) { // Initialize field label markup if (strpos($field->label, 'class=') === false) { $label = str_replace('<label', '<label class="control-label"', $field->label); } else { $label = strpos($field->label, 'control-label') === false ? preg_replace('/<label(\\s+[^>]*)class="([^"]*)"([^>]*)>/', '<label\\1class="control-label \\2"\\3>', $field->label) : $field->label; } // Initialize field label tooltips if (strpos($label, ' hasTip')) { $label = preg_replace(array('/ hasTip/', '/title="[^:]*::/'), array('', 'original-title="'), $label); } // Generate markup for input field with field label $html[] = "\t" . '<div' . $id . ' class="control-group">' . $label . '<div class="controls">' . $field->input . '</div></div>'; } else { // Generate markup for input field without field label $html[] = "\t" . "<div{$id}>{$field->input}</div>"; } } // Generate close tag $html[] = "</{$tag}>"; } // Finalize form markup $html = implode("\n", $html); // Set name-space prefix if (!empty($nameSpace)) { $html = str_replace('name="jform[', 'name="' . $nameSpace . '[', $html); } // Setup tooltips JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-tipsy/tipsy.css'); JSNHtmlAsset::loadScript('jsn/tooltips'); // Setup form validation JSNHtmlAsset::loadScript('jsn/validate', array('id' => 'jsn-config-form', 'lang' => JSNUtilsLanguage::getTranslated(array('JSN_EXTFW_INVALID_VALUE_TYPE', 'JSN_EXTFW_ERROR_FORM_VALIDATION_FAILED', 'JSN_EXTFW_SYSTEM_CUSTOM_ASSETS_INVALID')))); return $html; }
/** * Add nesscessary JS & CSS files * * @return void */ private function _addAssets() { $objJSNMedia = JSNISFactory::getObj('classes.jsn_is_media'); JSNHtmlAsset::addScript(JURI::root(true) . '/media/jui/js/jquery.min.js'); $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/conflict.js'); JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery-ck/jquery.ck.js'); JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery-jwysiwyg/jquery.wysiwyg.js'); JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-jwysiwyg/jquery.wysiwyg.css'); JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery-ui/js/jquery-ui-1.9.0.custom.min.js'); !class_exists('JSNBaseHelper') or JSNBaseHelper::loadAssets(); $objJSNMedia->addStyleSheet(JURI::root(true) . '/administrator/components/com_imageshow/assets/css/imageshow.css'); $objJSNMedia->addStyleSheet(JURI::root(true) . '/administrator/components/com_imageshow/assets/css/image_selector.css'); JSNHtmlAsset::loadScript('imageshow/joomlashine/showlist', array('pathRoot' => JURI::root(), 'language' => JSNUtilsLanguage::getTranslated(array('JSN_IMAGESHOW_OK', 'JSN_IMAGESHOW_CLOSE')))); }
/** * Display method. * * @param string $tpl The name of the template file to parse. * * @return void */ public function display($tpl = null) { // Get config declaration $configDeclaration = $this->get('Form'); // Pass data to view $this->assignRef('config', $configDeclaration); // Load assets JSNBaseHelper::loadAssets(); JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-tipsy/tipsy.css'); JSNHtmlAsset::loadScript('jsn/core', array('lang' => JSNUtilsLanguage::getTranslated(array('JSN_EXTFW_GENERAL_LOADING', 'JSN_EXTFW_GENERAL_CLOSE')))); JSNHtmlAsset::loadScript('jsn/config'); // Display the template parent::display($tpl); }
/** * Display the view * * @param string $tpl The name of the template file to parse. * * @return void */ public function display($tpl = null) { // Include the component HTML helpers. if (!JFactory::getUser()->authorise('core.manage', 'com_users')) { return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); } // Include the component HTML helpers. $this->_path['template'] = array(JPATH_ROOT . '/plugins/system/jsnframework/libraries/joomlashine/users/tmpl'); JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); // Load assets JSNBaseHelper::loadAssets(); parent::display($tpl); echo JSNHtmlAsset::loadScript('jsn/selectorFilter', array(), true); }
/** * Constructor * * @param array $config A named configuration array for object construction. */ public function __construct($config = array()) { // Display only the component output JFactory::getApplication()->input->def('tmpl', 'component'); parent::__construct($config); // Load category model $model = JSNBaseModel::getInstance('Categories', 'CategoriesModel'); $this->setModel($model, true); // Include the component HTML helpers $this->addTemplatePath(dirname(__FILE__) . '/tmpl'); JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); // Load assets JSNBaseHelper::loadAssets(); echo JSNHtmlAsset::loadScript('jsn/selectorFilter', array(), true); }
/** * Fetches the button HTML code. * * @param string $type Unused string. * @param string $ref The name of the help screen (its key reference). * @param boolean $com Use the help file in the component directory. * @param string $override Use this URL instead of any other. * @param string $component Name of component to get Help (null for current component) * * @return string * * @since 2.5 */ public function fetchButton($type = 'JSNHelpButton', $name = '', $text = '', $url = '', $width = 640, $height = 480, $top = 0, $left = 0, $onClose = '') { //JHTML::_('behavior.modal', 'a.jsn-is-helper-modal'); JSNHtmlAsset::loadScript('imageshow/joomlashine/help', array('pathRoot' => JURI::root(), 'language' => JSNUtilsLanguage::getTranslated(array('JSN_IMAGESHOW_OK', 'JSN_IMAGESHOW_CLOSE', 'JSN_IMAGESHOW_SAVE', 'JSN_IMAGESHOW_CANCEL')))); $text = JText::_('JTOOLBAR_HELP'); $class = $this->fetchIconClass('help'); $doTask = $this->_getCommand($name, $url, $width, $height, $top, $left); //$html = "<a href=\"#\" rel='{\"size\": {\"x\": 500, \"y\": 350}}' class=\"toolbar jsn-is-modal\">\n"; $html = "<a class=\"jsn-is-helper-modal\" href=\"javascript: void(0);\">\n"; $html .= "<span class=\"{$class}\">\n"; $html .= "</span>\n"; $html .= "{$text}\n"; $html .= "</a>\n"; return $html; }
/** * Add the libraries css and javascript * * @return void */ private function _addAssets() { JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-tipsy/tipsy.css'); JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-jwysiwyg/jquery.wysiwyg-0.9.css'); $formAction = $this->_config->get('form_action'); $this->_document->addScriptDeclaration(" var currentAction = {$formAction}; "); $arrayTranslated = array('JSN_UNIFORM_BUTTON_SAVE', 'JSN_UNIFORM_BUTTON_CANCEL', 'JSN_UNIFORM_EMAIL_SUBMITTER_TITLE', 'JSN_UNIFORM_EMAIL_ADDRESS_TITLE', 'JSN_UNIFORM_YOU_CAN_NOT_HIDE_THE_COPYLINK', 'JSN_UNIFORM_UPGRADE_EDITION_TITLE', 'JSN_UNIFORM_UPGRADE_EDITION', 'JSN_UNIFORM_SELECT_THE_ACTION_TO_TAKE_AFTER', 'JSN_UNIFORM_SET_THE_FOLDER_TO_STORE', 'JSN_SAMPLE_DISABLE_SHOW_COPYRIGHT_DES'); JSNHtmlAsset::registerDepends('uniform/libs/googlemaps/jquery.ui.map', array('jquery', 'jquery.ui')); JSNHtmlAsset::registerDepends('uniform/libs/googlemaps/jquery.ui.map.services', array('jquery', 'jquery.ui', 'uniform/libs/googlemaps/jquery.ui.map')); JSNHtmlAsset::registerDepends('uniform/libs/googlemaps/jquery.ui.map.extensions', array('jquery', 'jquery.ui', 'uniform/libs/googlemaps/jquery.ui.map')); JSNHtmlAsset::addScript('http://maps.google.com/maps/api/js?sensor=false&libraries=places'); $edition = defined('JSN_UNIFORM_EDITION') ? strtolower(JSN_UNIFORM_EDITION) : "free"; echo JSNHtmlAsset::loadScript('jsn/core', array('lang' => JSNUtilsLanguage::getTranslated(array('JSN_EXTFW_GENERAL_LOADING', 'JSN_EXTFW_GENERAL_CLOSE'))), true); echo JSNHtmlAsset::loadScript('jsn/config', array('language' => array('JSN_EXTFW_GENERAL_CLOSE' => JText::_('JSN_EXTFW_GENERAL_CLOSE'))), true); echo JSNHtmlAsset::loadScript('uniform/configuration', array('language' => JSNUtilsLanguage::getTranslated($arrayTranslated), 'edition' => $edition), true); }
/** * Add the libraries css and javascript * * @return void * * @since 1.6 */ private function _addAssets() { JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-ui/css/ui-bootstrap/jquery-ui-1.9.0.custom.css'); JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/bootstrap/css/bootstrap.min.css'); JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/joomlashine/css/jsn-gui.css'); JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/joomlashine/css/jsn-view-launchpad.css'); JSNHtmlAsset::addStyle(JURI::base(true) . '/components/com_uniform/assets/css/uniform.css'); if (preg_match('/msie/i', $_SERVER['HTTP_USER_AGENT'])) { JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-ui/css/ui-bootstrap/jquery-ui-1.8.16.ie.css'); } JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-ui/css/ui-bootstrap/jquery-ui-1.9.0.custom.css'); $arrayTranslated = array('JSN_UNIFORM_UPGRADE_EDITION_TITLE', 'JSN_UNIFORM_LAUNCHPAD_PLUGIN_SYNTAX', 'JSN_UNIFORM_YOU_MUST_SELECT_SOME_FORM', 'JSN_UNIFORM_EDIT_SELECTED_FORM', 'JSN_UNIFORM_LAUNCHPAD_PLUGIN_SYNTAX_DES', 'JSN_UNIFORM_YOU_HAVE_REACHED_THE_LIMITATION_OF_3_FORM_IN_FREE_EDITION', 'JSN_UNIFORM_UPGRADE_EDITION'); $edition = defined('JSN_UNIFORM_EDITION') ? JSN_UNIFORM_EDITION : "free"; JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery/jquery-1.8.2.js'); JSNHtmlAsset::addScriptLibrary('jquery.ui', '3rd-party/jquery-ui/js/jquery-ui-1.9.0.custom.min', array('jquery')); echo JSNHtmlAsset::loadScript('uniform/launchpad', array('baseZeroClipBoard' => JSN_URL_ASSETS . '/3rd-party/jquery-zeroclipboard/ZeroClipboard.swf', 'edition' => $edition, 'language' => JSNUtilsLanguage::getTranslated($arrayTranslated)), true); }
/** * Load extra assets. * * @return void */ private function _addAssets() { JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-tipsy/tipsy.css'); $templateReplyTo = isset($this->_item->template_reply_to) ? $this->_item->template_reply_to : ''; $this->_document->addScriptDeclaration(" var templateRelyTo = '{$templateReplyTo}'"); $viewLayout = JFactory::getApplication()->input->getWord('layout', 'default'); $session = JFactory::getSession(); $seesionQueue = $session->get('application.queue'); JSNHtmlAsset::registerDepends('uniform/libs/jquery.placeholder', array('jquery')); JSNHtmlAsset::addScript(JSN_UNIFORM_ASSETS_URI . '/js/jsn.jquery.noconflict.js'); $language = array('JSN_UNIFORM_NO_FIELD_DES', 'JSN_UNIFORM_NO_FIELD', 'JSN_UNIFORM_NO_EMAIL_DES', 'JSN_UNIFORM_SELECTED', 'JSN_UNIFORM_NO_EMAIL', 'JSN_UNIFORM_SELECT_FIELD', 'JSN_UNIFORM_SELECT_FIELDS', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_FROM_0', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_REPLY_TO_0', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_SUBJECT_0', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_FROM_1', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_REPLY_TO_1', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_SUBJECT_1'); if ($viewLayout == "default") { echo JSNHtmlAsset::loadScript('uniform/emailsettings', array('language' => JSNUtilsLanguage::getTranslated($language), 'editor' => JFactory::getConfig()->get('editor')), true); } else { echo JSNHtmlAsset::loadScript('uniform/configemailsettings', array('language' => JSNUtilsLanguage::getTranslated($language)), true); } if (!empty($seesionQueue[0]['message'])) { $this->_document->addScriptDeclaration(' window.parent.jQuery.closeModalBox(); '); } }
/** * Get the messages list markup. * * @return string */ protected function getInput() { // Preset output $html[] = ' <div class="jsn-page-list"> '; // Add assets $input = JFactory::getApplication()->input; if ($input->getInt('ajax') == 1) { $html[] = JSNHtmlAsset::loadScript('jsn/message', array('option' => $input->getCmd('option')), true); } else { JSNHtmlAsset::loadScript('jsn/message', array('option' => $input->getCmd('option'))); } // Get screen filter $screen = JFactory::getApplication()->input->getCmd('msg_screen'); // Create screen filter $screens = $this->getOptions(); array_unshift($screens, JHtml::_('select.option', '', JText::_('JSN_EXTFW_MESSAGE_FILTER_LIST'))); $screens = JHtml::_('select.genericlist', $screens, 'msg_screen', ' ', 'value', 'text', $screen); // Create refresh button and screen filter $html[] = ' <div class="jsn-fieldset-filter"> <fieldset> <div class="pull-left jsn-fieldset-search"> <a class="btn" title="' . JText::_('JSN_EXTFW_MESSAGE_REFRESH_LIST') . '" id="jsn-button-refresh" ajax-request="yes" ajax-target="#jsn-config-form > div" href="javascript:void(0)"><i class="icon-refresh"></i> ' . JText::_('JSN_EXTFW_MESSAGE_REFRESH_LIST') . '</a> </div> <div class="pull-right jsn-fieldset-select"> ' . $screens . ' </div> <div class="clearbreak"></div> </fieldset> </div> '; // Get message list $msgs = JSNUtilsMessage::getList($screen, true); // Render message list $html[] = JSNUtilsMessage::showConfig($msgs); $html[] = '<input type="hidden" name="' . $this->name . '" value="JSN_CONFIG_SKIP_SAVING" /></div>'; return implode($html); }
/** * Get the messages list markup. * * @return string */ protected function getInput() { $token = JFactory::getSession()->getFormToken(); // Preset output $model = JModelLegacy::getInstance('plugins', 'imageshowmodel'); $items = $model->getData(); $html[] = '<table class="table table-bordered">'; $html[] = '<thead> <tr> <th width="20" nowrap="nowrap" class="center">#</th> <th class="title" nowrap="nowrap">' . JText::_('MAINTENANCE_THEME_THEME_NAME') . '</th> <th width="80" nowrap="nowrap" class="center">' . JText::_('MAINTENANCE_THEME_THEME_VERSION') . '</th> <th width="80" nowrap="nowrap" class="center">' . JText::_('MAINTENANCE_THEME_ACTIONS') . '</th> </tr> </thead><tbody>'; if (count($items)) { for ($i = 0, $count = count($items); $i < $count; $i++) { $row = $items[$i]; $html[] = '<tr>'; $html[] = '<td class="center">' . ($i + 1) . '</td>'; $html[] = '<td>' . $row->name . '</td>'; $html[] = '<td class="center">' . $row->version . '</td>'; $html[] = '<td class="actionprofile center">'; if (JFile::exists(JPATH_PLUGINS . DS . 'jsnimageshow' . DS . $row->element . DS . 'views' . DS . 'maintenance' . DS . 'tmpl' . DS . 'default_theme_parameters.php')) { $html[] = '<a rel=\'{"size": {"x": 400, "y": 500}}\' href="index.php?option=com_imageshow&controller=maintenance&type=themeparameters&theme_name=' . $row->element . '&tmpl=component" class="jsn-icon16 jsn-icon-pencil jsn-is-form-modal" name="' . JText::_('MAINTENANCE_THEME_PARAMETER_SETTINGS') . '" title="' . JText::_('MAINTENANCE_THEME_EDIT_SETTINGS') . '"></a> '; } if ($count) { $html[] = '<a href="javascript: void(0);" rel=\'' . json_encode(array('theme_id' => $row->extension_id, 'theme_name' => $row->element, 'token' => $token)) . '\' class="jsn-icon16 jsn-icon-trash jsn-is-delete-theme"> </a>'; } else { $html[] = '<a class="jsn-icon16 jsn-icon-trash disabled" title="' . JText::_('MAINTENANCE_THEME_YOU_CAN_NOT_DELETE_THE_ONLY_THEME_IN_THE_LIST') . '"> </a>'; } $html[] = '</td>'; $html[] = '</tr>'; } } $html[] = '</tbody></table>'; $html[] = JSNHtmlAsset::loadScript('imageshow/joomlashine/maintenance', array('pathRoot' => JURI::root(), 'language' => JSNUtilsLanguage::getTranslated(array('JSN_IMAGESHOW_SAVE', 'JSN_IMAGESHOW_CLOSE', 'JSN_IMAGESHOW_CONFIRM'))), true); return implode($html); }
public static function about($products = array()) { // Get extension manifest cache $info = JSNUtilsXml::loadManifestCache(); // Add assets JSNHtmlAsset::loadScript('jsn/about', array('language' => JSNUtilsLanguage::getTranslated(array('JSN_EXTFW_ABOUT_SEE_OTHERS_MODAL_TITLE', 'JSN_EXTFW_GENERAL_CLOSE')))); // Generate markup $html[] = ' <div id="jsn-about" class="jsn-page-about"> <div class="jsn-bootstrap">'; $html[] = self::aboutInfo($info, $products); $html[] = ' <div class="jsn-product-support">'; $html[] = self::aboutHelp(); $html[] = self::aboutFeedback(); $html[] = ' </div> </div> </div> <div class="clr"></div>'; echo implode($html); }
/** * Display the view * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void */ public function display($tpl = null) { try { $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); } catch (Exception $e) { throw $e; } // Include the component HTML helpers. $this->_path['template'] = array(JPATH_ROOT . '/plugins/system/jsnframework/libraries/joomlashine/modules/tmpl'); JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); // Load assets JSNBaseHelper::loadAssets(); // Do not call parent method to skip showing warning message when there is no any module to list $result = $this->loadTemplate($tpl); if ($result instanceof Exception) { return $result; } echo $result; echo JSNHtmlAsset::loadScript('jsn/selectorFilter', array(), true); }
/** * Method to get the field input markup for a media selector. * * @return string The field input markup. */ protected function getInput() { // Preset output $html = array(); // Initialize variables $editable = isset($this->element['editable']) ? (string) $this->element['editable'] : ''; $clearButton = isset($this->element['clearButton']) ? (string) $this->element['clearButton'] : ''; $mediaRoot = isset($this->element['directory']) ? (string) $this->element['directory'] : ''; $selectorLink = JURI::root() . 'plugins/system/jsnframework/libraries/joomlashine/choosers/media/index.php' . '?component=' . JFactory::getApplication()->input->getCmd('option') . '&root=' . trim($mediaRoot, '/') . '¤t=' . $this->value . '&element=' . $this->id . '&handler=JSNMediaUpdateField'; // Load script to handle selection update $html[] = JSNHtmlAsset::loadScript('jsn/media', array('url' => $selectorLink, 'field' => "#{$this->id}", 'language' => JSNUtilsLanguage::getTranslated(array('JSN_EXTFW_CONFIG_CLICK_TO_SELECT'))), true); // Initialize attributes $class = ' class="' . (isset($this->element['class']) ? (string) $this->element['class'] : 'jsn-input-large-fluid') . '"'; $disabled = $editable ? '' : ' disabled="disabled"'; // Generate clear button $clear = ''; if ($clearButton) { $clear = '<button class="btn inline" type="button">' . JText::_('JSN_EXTFW_GENERAL_CLEAR') . '</button>'; } // Generate markup $html[] = '<div class="input-append row-fluid">' . '<input type="text" id="' . $this->id . '" name="' . $this->name . '" value="' . $this->value . '"' . $class . $disabled . ' />' . '<button class="btn" type="button">...</button>' . $clear . '</div>'; return implode($html); }
/** * Add nesscessary JS & CSS files * * @return void */ private function _addAssets() { $objJSNMedia = JSNISFactory::getObj('classes.jsn_is_media'); !class_exists('JSNBaseHelper') or JSNBaseHelper::loadAssets(); JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/joomlashine/css/jsn-view-launchpad.css'); $objJSNMedia->addStyleSheet(JURI::root(true) . '/administrator/components/com_imageshow/assets/css/imageshow.css'); $objJSNMedia->addStyleSheet(JURI::root(true) . '/administrator/components/com_imageshow/assets/css/showlist.css'); $objJSNMedia->addStyleSheet(JURI::root(true) . '/administrator/components/com_imageshow/assets/css/cpanel.css'); $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/imageshow.js'); //$objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/zeroclipboard/ZeroClipboard.js'); JSNHtmlAsset::addScript(JURI::root(true) . '/media/jui/js/jquery.min.js'); $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/conflict.js'); JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery-ui/js/jquery-ui-1.9.0.custom.min.js'); $objJSNMedia->addScript(JURI::root(true) . '/administrator/components/com_imageshow/assets/js/joomlashine/window.js'); JSNHtmlAsset::loadScript('imageshow/joomlashine/launchpad', array('pathRoot' => JURI::root(), 'language' => JSNUtilsLanguage::getTranslated(array('JSN_IMAGESHOW_OK', 'JSN_IMAGESHOW_CLOSE', 'CPANEL_PLUGIN_SYNTAX_DETAILS', 'CPANEL_GO', 'CPANEL_EDIT_SELECTED_SHOWCASE', 'CPANEL_YOU_MUST_SELECT_SOME_SHOWCASE_TO_EDIT', 'CPANEL_EDIT_SELECTED_SHOWLIST', 'CPANEL_YOU_MUST_SELECT_SOME_SHOWLIST_TO_EDIT', 'JSN_IMAGESHOW_SAVE')))); }
/** * Add the libraries css and javascript * * @return void * * @since 1.6 */ protected function addAssets() { // Initialize variables $config = JSNConfigHelper::get(); $jUri = JURI::getInstance(); JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-colorpicker/css/colorpicker.css'); JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-gradientpicker/jquery.gradientPicker.css'); JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/joomlashine/css/jsn-advanced-parameters.css'); JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/jquery-select2/select2.css'); JSNHtmlAsset::addStyle(JSN_URL_ASSETS . '/3rd-party/codemirror/lib/codemirror.css'); $device = "mobilize"; $links = ($links = $jUri->getScheme()) . (empty($links) ? '' : '://'); if (substr($config->get("link_{$device}"), 0, 1) == '/') { $links .= $jUri->getHost() . $config->get("link_{$device}"); } else { $links .= $config->get("link_{$device}") . JURI::root(true); } // Setup text translation $arrayTranslated = array('JSN_MOBILIZE_SWITCHER_TITLE', 'JSN_MOBILIZE_YOU_CAN_NOT_HIDE_THE_COPYLINK', 'JSN_MOBILIZE_SWITCHER_SETTINGS', 'JSN_MOBILIZE_CANCEL', 'JSN_MOBILIZE_SAVE', 'JSN_MOBILIZE_ALIGNMENT', 'JSN_MOBILIZE_SELECT_THEME', 'JSN_MOBILIZE_SELECT', 'JSN_MOBILIZE_CLEAR', 'JSN_MOBILIZE_IMAGE_ALT', 'JSN_MOBILIZE_IMAGE_URL', 'JSN_MOBILIZE_ENABLE_MOBILIZE_MENU_LINK', 'JSN_MOBILIZE_ENABLE_MOBILIZE_SEARCH_LINK', 'JSN_MOBILIZE_ENABLE_MOBILIZE_LOGIN_LINK', 'JSN_MOBILIZE_CHANGE', 'JSN_MOBILIZE_CLICK_SELECT', 'JSN_MOBILIZE_TITLE_SMARTPHONE', 'JSN_MOBILIZE_TITLE_TABLET', 'JSN_MOBILIZE_TYPE_POSITION', 'JSN_MOBILIZE_TYPE_MODULE', 'JSN_MOBILIZE_SELECT_MENU', 'JSN_MOBILIZE_SELECT_MODULE', 'JSN_MOBILIZE_SELECTED_MODULE', 'JSN_MOBILIZE_CLOSE', 'JSN_MOBILIZE_SELECT_LOGO', 'JSN_MOBILIZE_SELECT_STYLE', 'JSN_MOBILIZE_SELECT_POSITION', 'JSN_MOBILIZE_SELECT_MODULE', 'JSN_MOBILIZE_ENABLE_MOBILIZE_SWITCHER_LINK', 'JSN_MOBILIZE_ADD_ELEMENT', 'JSN_MOBILIZE_ADD_MODULE', 'JSN_MOBILIZE_ADD_POSITION', 'JSN_MOBILIZE_IMAGE_FILE', 'JSN_MOBILIZE_YES', 'JSN_MOBILIZE_NO', 'JSN_MOBILIZE_CONFIRM_LOAD_STYLE', 'JSN_MOBILIZE_SWITCH_TO_WEB_UI_FOR_MOBILIZE', 'JSN_MOBILIZE_STYLE_SETTINGS_IS_AVAILABLE_ONLY_IN_PRO_EDITION', 'JSN_MOBILIZE_UPGRADE_NOW', 'JSN_MOBILIZE_LINK_SOCIAL', 'JSN_MOBILIZE_DELETE', 'JSN_MOBILIZE_BROWSER', 'JSN_MOBILIZE_UPLOAD', 'JSN_MOBILIZE_UPGRADE_EDITION_TITLE', 'JSN_MOBILIZE_UPGRADE_EDITION', 'JSN_MOBILIZE_ADD_ELEMENT_IS_AVAILABLE_ONLY_IN_PRO_EDITION'); // Initialize Javascript $edition = defined('JSN_MOBILIZE_EDITION') ? JSN_MOBILIZE_EDITION : "free"; echo JSNHtmlAsset::loadScript('mobilize/profile', array('editions' => $edition, 'pathRoot' => JURI::root(), 'defaultTemplate' => $this->_defaultTempateSite, 'language' => JSNUtilsLanguage::getTranslated($arrayTranslated), 'listMenu' => $this->_menuType, 'listModule' => $this->_Modules, 'mobilizeLink' => $links, 'configuration' => isset($this->_items['configuration']) ? $this->_items['configuration'] : ''), true); JSNMobilizeHelper::loadAssets(); }
/** * Show messages. * * @param array $msgs Messages to show. * * @return string */ public static function showMessages($msgs) { $html = array(); // Add asset $html[] = JSNHtmlAsset::loadScript('jsn/message', array('option' => JFactory::getApplication()->input->getCmd('option')), true); // Generate markup $html[] = ' <div class="jsn-bootstrap">'; foreach ($msgs as $msg) { // Initialize variables if (is_object($msg)) { $message = JText::_('MESSAGE_' . $msg->msg_screen . '_' . $msg->ordering . '_PRIMARY'); } else { $onclick = ''; $message = JText::_($msg); } $html[] = ' <div class="alert alert-block fade in"> <a href="javascript:void(0);" title="' . JText::_('JSN_EXTFW_GENERAL_CLOSE') . '" class="jsn-close-message close" data-message-id="' . $msg->msg_id . '" data-dismiss="alert">×</a> ' . $message . ' </div>'; } $html[] = ' </div> '; return implode($html); }
<?php } } if (isset($fieldset->form->actions)) { ?> <div class="form-actions"> <div class="jsn-bootstrap"></div> <?php foreach ($fieldset->form->actions as $action) { ?> <button class="btn btn-primary" <?php echo 'value="' . $action->task . '"' . ($action->track ? ' track-change="yes"' : '') . ($action->ajax ? ' ajax-request="yes"' : ''); ?> > <?php echo JText::_($action->label); ?> </button> <?php } ?> </div> <?php } ?> </fieldset> <?php } // Setup form validation echo JSNHtmlAsset::loadScript('jsn/validate', array('id' => 'jsn-config-form', 'lang' => JSNUtilsLanguage::getTranslated(array('JSN_EXTFW_INVALID_VALUE_TYPE', 'JSN_EXTFW_ERROR_FORM_VALIDATION_FAILED', 'JSN_EXTFW_SYSTEM_CUSTOM_ASSETS_INVALID'))), true);
/** * Get the markup for data restore form. * * @return string */ protected function getInput() { // Get session $session = JFactory::getSession(); $restoreResult = $session->get('JSNISRestore'); // Preset output $html = array(); // Generate data backup form $html[] = '<form name="JSNDataRestoreForm" action="' . JRoute::_('index.php') . '" method="POST" enctype="multipart/form-data" onsubmit="return false;">'; $html[] = '<fieldset>'; $html[] = '<legend>' . JText::_('JSN_EXTFW_DATA_RESTORE') . '</legend>'; if (!is_array($restoreResult)) { $html[] = '<div class="control-group"> <label class="control-label">' . JText::_('JSN_EXTFW_DATA_RESTORE_FILE') . ':</label> <div class="controls"> <input name="datarestore" type="file" size="70" class="input-file" /> </div> </div> <div class="form-actions"> <div class="jsn-bootstrap"></div> <button class="btn btn-primary" value="' . ($this->element['task'] ? (string) $this->element['task'] : 'data.restore') . '" disabled="disabled" track-change="yes" ajax-request="disabled">' . JText::_('JSN_EXTFW_DATA_RESTORE_BUTTON') . '</button> </div>'; } else { $html[] = '<div>'; $html[] = '<p id="jsn-restore-result">' . JText::_('MAINTENANCE_RESTORE_RESULT_HEADER') . '</p><ul>'; if (is_array($restoreResult) && !$restoreResult['extractFile']) { $html[] = '<li>'; $html[] = JText::_('MAINTENANCE_RESTORE_EXTRACT_BACKUP_FILE') . '<span class="jsn-icon16 jsn-icon-remove"> </span><p id="jsn-restore-extract-failure">' . $restoreResult['message'] . '</p>'; $html[] = '</li>'; } else { $html[] = '<li>'; $html[] = JText::_('MAINTENANCE_RESTORE_EXTRACT_BACKUP_FILE') . '<span class="jsn-icon16 jsn-icon-ok"> </span>'; $html[] = '</li>'; $html[] = '<li id="jsn-restore-data-wrap">'; $html[] = JText::_('MAINTENANCE_RESTORE_RESTORE_DATA'); if ($restoreResult['requiredSourcesNeedInstall'] || $restoreResult['requiredThemesNeedInstall']) { $html[] = '<span class="jsn-restore-icon-failure jsn-icon16 jsn-icon-remove"> </span>'; $html[] = '<div id="jsn-restore-data" class="jsn-restore-icon-process">'; $html[] = '<img src="components/com_imageshow/assets/images/icons-16/icon-16-loading-circle.gif"/>'; $html[] = '</div>'; $html[] = '<div class="jsn-restore-warning">'; $html[] = '<div id="jsn-restore-install-required-warning">'; $html[] = '<p>' . JText::_('MAINTENANCE_RESTORE_IMAGESOURCES_AND_THEMES_REQUIRED') . '</p>'; $html[] = '<ul id="jsn-restore-list-required-install">'; foreach ($restoreResult['requiredSourcesNeedInstall'] as $source) { $html[] = '<li>' . $source->name . ' </li>'; } foreach ($restoreResult['requiredThemesNeedInstall'] as $theme) { $html[] = '<li>' . $theme->name . ' </li>'; } $html[] = '</ul>'; if (isset($restoreResult['requiredInstallData']['commercial']) && $restoreResult['requiredInstallData']['commercial']) { } else { $html[] = '<p>'; $html[] = '<a class="jsn-link-action" href="javascript: void(0);" onclick="JSNISInstallDefault.restoreInstall(' . htmlspecialchars(json_encode($restoreResult['requiredInstallData']), ENT_COMPAT, 'UTF-8') . ');">' . JText::_('MAINTENANCE_RESTORE_INSTALL_ALL_REQUIRED_PLUGINS') . '</a>'; $html[] = '</p>'; } $html[] = '</div>'; $html[] = '<ul class="jsn-restore-install-required">'; if (count($restoreResult['requiredSourcesNeedInstall'])) { $html[] = '<li id="jsn-restore-required-sources">'; $html[] = JText::_('MAINTENANCE_RESTORE_INSTALL_REQUIRED_IMAGE_SOURCES') . '.'; $html[] = '<div class="jsn-restore-icon-process">'; $html[] = '<img src="components/com_imageshow/assets/images/icons-16/icon-16-loading-circle.gif"/>'; $html[] = '</div>'; $html[] = '<span class="jsn-restore-change-text" id="jsn-restore-source-change-text"></span>'; $html[] = '<span class="jsn-icon16 jsn-icon-ok"> </span>'; $html[] = '</li>'; } if (count($restoreResult['requiredThemesNeedInstall'])) { $html[] = '<li id="jsn-restore-required-themes">'; $html[] = JText::_('MAINTENANCE_RESTORE_INSTALL_REQUIRED_IMAGE_THEMES') . '.'; $html[] = '<div class="jsn-restore-icon-process">'; $html[] = '<img src="components/com_imageshow/assets/images/icons-16/icon-16-loading-circle.gif"/>'; $html[] = '</div>'; $html[] = '<span class="jsn-restore-change-text" id="jsn-restore-theme-change-text"></span>'; $html[] = '<span class="jsn-icon16 jsn-icon-ok"> </span>'; $html[] = '</li>'; } $html[] = '</div>'; $html[] = '</ul>'; } else { $html[] = '<span class="jsn-icon16 jsn-icon-ok"> </span>'; } $html[] = '</li>'; $html[] = '</ul>'; $html[] = '<div id="jsn-restore-database-success"' . ($restoreResult['error'] == false ? ' style="display:block;"' : '') . '>'; $html[] = '<hr />'; $html[] = '<h3 class="jsn-text-success">' . JText::_('MAINTENANCE_RESTORE_RESTORE_DATABASE_SUCCESS') . '</h3>'; $html[] = '<p>' . JText::_('MAINTENANCE_RESTORE_OPERATE_ON_DATA') . '</p>'; $html[] = '</div>'; $html[] = '<div id="jsn-restore-buttons" class="form-actions' . (!$restoreResult['error'] ? ' jsn-restore-installing-success' : '') . '">'; $html[] = '<a href="javascript: void(0);" class="btn btn-primary" id="jsn-restore-finish-button" type="button" value="' . JText::_('MAINTENANCE_RESTORE_FINISH') . '" name="button_backup_restore">' . JText::_('MAINTENANCE_RESTORE_FINISH') . '</a>'; $html[] = '<a href="javascript: void(0);" class="btn btn-primary" id="jsn-restore-button-cancel" type="button" value="' . JText::_('MAINTENANCE_RESTORE_CANCEL') . '" name="button_backup_restore">' . JText::_('MAINTENANCE_RESTORE_CANCEL') . '</a>'; $html[] = '</div>'; $html[] = '</div>'; } } $html[] = '<input type="hidden" name="' . $this->name . '" value="JSN_CONFIG_SKIP_SAVING" />'; $html[] = '</fieldset>'; $html[] = '</form>'; $html[] = JSNHtmlAsset::loadScript('imageshow/joomlashine/maintenance', array('pathRoot' => JURI::root(), 'language' => JSNUtilsLanguage::getTranslated(array('JSN_IMAGESHOW_SAVE', 'JSN_IMAGESHOW_CLOSE', 'JSN_IMAGESHOW_CONFIRM', 'MAINTENANCE_SOURCE_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_IMAGE_SOURCE_PROFILE'))), true); return implode($html); }
/** * Add the libraries css and javascript * * @return void * * @since 1.6 */ protected function addAssets() { JSNHtmlAsset::addStyle(array(JURI::base(true) . '/components/com_uniform/assets/js/libs/colorpicker/css/colorpicker.css', JSN_URL_ASSETS . '/3rd-party/jquery-jwysiwyg/jquery.wysiwyg-0.9.css', JURI::base(true) . '/components/com_uniform/assets/js/libs/select2/select2.css', JSN_URL_ASSETS . '/3rd-party/codemirror/lib/codemirror.css', JSN_URL_ASSETS . '/3rd-party/jquery-tipsy/tipsy.css')); if (JPluginHelper::isEnabled('editors', 'tinymce') == true) { JSNHtmlAsset::addScript(JUri::root(true) . '/media/editors/tinymce/tinymce.min.js'); JSNHtmlAsset::addScript(JUri::root(true) . '/media/editors/tinymce/plugins/table/plugin.min.js'); JSNHtmlAsset::addScript(JUri::root(true) . '/media/editors/tinymce/plugins/link/plugin.min.js'); JSNHtmlAsset::addScript(JUri::root(true) . '/media/editors/tinymce/plugins/image/plugin.min.js'); JSNHtmlAsset::addScript(JUri::root(true) . '/media/editors/tinymce/plugins/code/plugin.min.js'); JSNHtmlAsset::addScript(JUri::root(true) . '/media/editors/tinymce/plugins/hr/plugin.min.js'); JSNHtmlAsset::addScript(JUri::root(true) . '/media/editors/tinymce/plugins/charmap/plugin.min.js'); JSNHtmlAsset::addScript(JUri::root(true) . '/media/editors/tinymce/plugins/autolink/plugin.min.js'); JSNHtmlAsset::addScript(JUri::root(true) . '/media/editors/tinymce/plugins/lists/plugin.min.js'); JSNHtmlAsset::addStyle(JUri::root(true) . '/media/editors/tinymce/plugins/importcss/plugin.min.js'); JSNHtmlAsset::addScript(JUri::root(true) . '/media/editors/tinymce/themes/modern/theme.min.js'); JSNHtmlAsset::addStyle(JUri::root(true) . '/media/editors/tinymce/skins/lightgray/content.inline.min.css'); JSNHtmlAsset::addStyle(JUri::root(true) . '/media/editors/tinymce/skins/lightgray/content.min.css'); JSNHtmlAsset::addStyle(JUri::root(true) . '/media/editors/tinymce/skins/lightgray/skin.min.css'); JSNHtmlAsset::addStyle(JUri::root(true) . '/media/editors/tinymce/skins/lightgray/skin.ie7.min.css'); } $formSubmitter = isset($this->_item->form_submitter) ? json_decode($this->_item->form_submitter) : ""; $formAction = 0; $formActionData = ''; if (!empty($this->formAction)) { $formAction = $this->formAction; $formActionData = isset($this->formActionData) ? $this->formActionData : ''; } $arrayTranslated = array('JSN_UNIFORM_MOVE_UP_CONTAINER', 'JSN_UNIFORM_MOVE_DOWN_CONTAINER', 'JSN_UNIFORM_ADD_CONTAINER_COLUMN', 'JSN_UNIFORM_DELETE_CONTAINER', 'JSN_UNIFORM_DELETE_CONTAINER_COLUMN', 'JSN_UNIFORM_CONFIRM_DELETE_CONTAINER', 'JSN_UNIFORM_CONFIRM_DELETE_CONTAINER_COLUMN', 'JSN_UNIFORM_COLOR_CONFIRM_RESET', 'JSN_UNIFORM_COLOR_CONFIRM_DELETE', 'JSN_UNIFORM_COLOR_CONFIRM_EXISTS', 'JSN_UNIFORM_ALL_FORM_FIELD_ARE_HIDDEN', 'JSN_UNIFORM_ALL_FORM_FIELD_ARE_DISPLAYED', 'TITLES', 'JSN_UNIFORM_DATE_HOUR_TEXT', 'JSN_UNIFORM_DATE_MINUTE_TEXT', 'JSN_UNIFORM_DATE_CLOSE_TEXT', 'JSN_UNIFORM_DATE_PREV_TEXT', 'JSN_UNIFORM_DATE_NEXT_TEXT', 'JSN_UNIFORM_DATE_CURRENT_TEXT', 'JSN_UNIFORM_DATE_MONTH_JANUARY', 'JSN_UNIFORM_DATE_MONTH_FEBRUARY', 'JSN_UNIFORM_DATE_MONTH_MARCH', 'JSN_UNIFORM_DATE_MONTH_APRIL', 'JSN_UNIFORM_DATE_MONTH_MAY', 'JSN_UNIFORM_DATE_MONTH_JUNE', 'JSN_UNIFORM_DATE_MONTH_JULY', 'JSN_UNIFORM_DATE_MONTH_AUGUST', 'JSN_UNIFORM_DATE_MONTH_SEPTEMBER', 'JSN_UNIFORM_DATE_MONTH_OCTOBER', 'JSN_UNIFORM_DATE_MONTH_NOVEMBER', 'JSN_UNIFORM_DATE_MONTH_DECEMBER', 'JSN_UNIFORM_DATE_MONTH_JANUARY_SHORT', 'JSN_UNIFORM_DATE_MONTH_FEBRUARY_SHORT', 'JSN_UNIFORM_DATE_MONTH_MARCH_SHORT', 'JSN_UNIFORM_DATE_MONTH_APRIL_SHORT', 'JSN_UNIFORM_DATE_MONTH_MAY_SHORT', 'JSN_UNIFORM_DATE_MONTH_JUNE_SHORT', 'JSN_UNIFORM_DATE_MONTH_JULY_SHORT', 'JSN_UNIFORM_DATE_MONTH_AUGUST_SHORT', 'JSN_UNIFORM_DATE_MONTH_SEPTEMBER_SHORT', 'JSN_UNIFORM_DATE_MONTH_OCTOBER_SHORT', 'JSN_UNIFORM_DATE_MONTH_NOVEMBER_SHORT', 'JSN_UNIFORM_DATE_MONTH_DECEMBER_SHORT', 'JSN_UNIFORM_DATE_DAY_SUNDAY', 'JSN_UNIFORM_DATE_DAY_MONDAY', 'JSN_UNIFORM_DATE_DAY_TUESDAY', 'JSN_UNIFORM_DATE_DAY_WEDNESDAY', 'JSN_UNIFORM_DATE_DAY_THURSDAY', 'JSN_UNIFORM_DATE_DAY_FRIDAY', 'JSN_UNIFORM_DATE_DAY_SATURDAY', 'JSN_UNIFORM_DATE_DAY_SUNDAY_SHORT', 'JSN_UNIFORM_DATE_DAY_MONDAY_SHORT', 'JSN_UNIFORM_DATE_DAY_TUESDAY_SHORT', 'JSN_UNIFORM_DATE_DAY_WEDNESDAY_SHORT', 'JSN_UNIFORM_DATE_DAY_THURSDAY_SHORT', 'JSN_UNIFORM_DATE_DAY_FRIDAY_SHORT', 'JSN_UNIFORM_DATE_DAY_SATURDAY_SHORT', 'JSN_UNIFORM_DATE_DAY_SUNDAY_MIN', 'JSN_UNIFORM_DATE_DAY_MONDAY_MIN', 'JSN_UNIFORM_DATE_DAY_TUESDAY_MIN', 'JSN_UNIFORM_DATE_DAY_WEDNESDAY_MIN', 'JSN_UNIFORM_DATE_DAY_THURSDAY_MIN', 'JSN_UNIFORM_DATE_DAY_FRIDAY_MIN', 'JSN_UNIFORM_DATE_DAY_SATURDAY_MIN', 'JSN_UNIFORM_DATE_DAY_WEEK_HEADER', 'JSN_UNIFORM_EMAIL_SETTINGS', 'JSN_UNIFORM_SELECT_MENU_ITEM', 'JSN_UNIFORM_SELECT_ARTICLE', 'JSN_UNIFORM_FORM_APPEARANCE', 'JSN_UNIFORM_SELECT', 'JSN_UNIFORM_SAVE', 'JSN_UNIFORM_CANCEL', 'JSN_UNIFORM_ADD_FIELD', 'JSN_UNIFORM_BUTTON_SAVE', 'JSN_UNIFORM_BUTTON_CANCEL', 'JSN_UNIFORM_CONFIRM_CONVERTING_FORM', 'JSN_UNIFORM_UPGRADE_EDITION_TITLE', 'JSN_UNIFORM_YOU_HAVE_REACHED_THE_LIMITATION_OF_10_FIELD_IN_FREE_EDITION', 'JSN_UNIFORM_YOU_HAVE_REACHED_THE_LIMITATION_OF_1_PAGE_IN_FREE_EDITION', 'JSN_UNIFORM_UPGRADE_EDITION', 'JSN_UNIFORM_CONFIRM_SAVE_FORM', 'JSN_UNIFORM_NO_EMAIL', 'JSN_UNIFORM_NO_EMAIL_DES', 'JSN_UNIFORM_CONFIRM_DELETING_A_FIELD', 'JSN_UNIFORM_CONFIRM_DELETING_A_FIELD_DES', 'JSN_UNIFORM_BTN_BACKUP', 'JSN_UNIFORM_IF_CHECKED_VALUE_DUPLICATION', 'JSN_UNIFORM_EMAIL_SUBMITTER_TITLE', 'JSN_UNIFORM_EMAIL_ADDRESS_TITLE', 'JSN_UNIFORM_LAUNCHPAD_PLUGIN_SYNTAX', 'JSN_UNIFORM_LAUNCHPAD_PLUGIN_SYNTAX_DES', 'JSN_UNIFORM_FORM_LIMIT_FILE_EXTENSIONS', 'JSN_UNIFORM_FOR_SECURITY_REASONS_FOLLOWING_FILE_EXTENSIONS', 'JSN_UNIFORM_FORM_LIMIT_FILE_SIZE', 'STREET_ADDRESS', 'ADDRESS_LINE_2', 'CITY', 'POSTAL_ZIP_CODE', 'STATE_PROVINCE_REGION', 'FIRST', 'MIDDLE', 'LAST', 'COUNTRY', 'JSN_UNIFORM_ALLOW_USER_CHOICE', 'JSN_UNIFORM_SET_ITEM_PLACEHOLDER', 'JSN_UNIFORM_SET_ITEM_PLACEHOLDER_DES', 'JSN_UNIFORM_SHOW_DATE_FORMAT', 'JSN_UNIFORM_SHOW_TIME_FORMAT', 'JSN_UNIFORM_ENABLE_RANGE_SELECTION', 'JSN_UNIFORM_YOU_CAN_NOT_HIDE_THE_COPYLINK', 'JSN_UNIFORM_CUSTOM_DATE_FORMAT', 'JSN_UNIFORM_LIST_ELEMENT_DESCRIPTION_LABEL', 'JSN_UNIFORM_MULTIPLE_CHOICE_ELEMENT_DESCRIPTION_LABEL', 'JSN_UNIFORM_IDENTIFICATION_CODE_ELEMENT_DESCRIPTION_LABEL', 'JSN_UNIFORM_NO_FIELD_DES', 'JSN_UNIFORM_NO_FIELD', 'JSN_UNIFORM_NO_EMAIL_DES', 'JSN_UNIFORM_SELECTED', 'JSN_UNIFORM_NO_EMAIL', 'JSN_UNIFORM_SELECT_FIELD', 'JSN_UNIFORM_SELECT_FIELDS', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_FROM_0', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_REPLY_TO_0', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_SUBJECT_0', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_FROM_1', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_REPLY_TO_1', 'JSN_UNIFORM_PLACEHOLDER_EMAIL_SUBJECT_1'); $params = JComponentHelper::getParams('com_media'); $listEx = ''; $extensions = $params->get('upload_extensions'); if ($extensions) { $extensions = explode(",", $extensions); $exs = array(); foreach ($extensions as $ex) { $exs[] = strtolower($ex); } $listEx = implode(", ", array_unique($exs)); } $extensions = str_replace(",", ", ", $extensions); $limitSize = $params->get('upload_maxsize'); $configSizeSever = (int) ini_get('post_max_size'); if ($limitSize > $configSizeSever) { $limitSize = $configSizeSever; } if ($limitSize > (int) ini_get('upload_max_filesize')) { $limitSize = (int) ini_get('upload_max_filesize'); } $session = JFactory::getSession(); $openArticle = JRequest::getVar('opentarticle', ''); $this->pageContent = $session->get('page_content', '', 'form-design-' . $this->_item->form_id); $this->edition = defined('JSN_UNIFORM_EDITION') ? strtolower(JSN_UNIFORM_EDITION) : "free"; JSNHtmlAsset::registerDepends('uniform/libs/googlemaps/jquery.ui.map', array('jquery', 'jquery.ui')); JSNHtmlAsset::registerDepends('uniform/libs/googlemaps/jquery.ui.map.services', array('jquery', 'jquery.ui', 'uniform/libs/googlemaps/jquery.ui.map')); JSNHtmlAsset::registerDepends('uniform/libs/googlemaps/jquery.ui.map.extensions', array('jquery', 'jquery.ui', 'uniform/libs/googlemaps/jquery.ui.map')); $uri = JUri::getInstance(); JSNHtmlAsset::addScript($uri->getScheme() . '://maps.google.com/maps/api/js?sensor=false&libraries=places'); JSNHtmlAsset::registerDepends('uniform/libs/jquery.tmpl', array('jquery')); JSNHtmlAsset::registerDepends('uniform/libs/jquery-ui-timepicker-addon', array('jquery', 'jquery.ui')); JSNHtmlAsset::registerDepends('uniform/libs/jquery.placeholder', array('jquery')); JSNHtmlAsset::registerDepends('uniform/libs/colorpicker/js/colorpicker', array('jquery')); JSNHtmlAsset::registerDepends('uniform/libs/select2/select2', array('jquery')); JSNHtmlAsset::registerDepends('uniform/layout', array('jquery', 'jquery.ui')); JSNHtmlAsset::addScript(JSN_UNIFORM_ASSETS_URI . '/js/jsn.jquery.noconflict.js'); $titleForm = isset($_GET['form']) ? $_GET['form'] : ''; echo JSNHtmlAsset::loadScript('uniform/form', array('urlBase' => JURI::base(), 'pathRoot' => JURI::root(), 'opentArticle' => $openArticle, 'baseZeroClipBoard' => JSN_URL_ASSETS . '/3rd-party/jquery-zeroclipboard/ZeroClipboard.swf', 'pageContent' => $this->pageContent, 'edition' => $this->edition, 'checkSubmitModal' => $this->checkSubmitModal, 'urlAction' => $this->urlAction, 'form_style' => $this->_item->form_style, 'dataEmailSubmitter' => $formSubmitter, 'language' => JSNUtilsLanguage::getTranslated($arrayTranslated), 'formActionData' => $formActionData, 'formAction' => $formAction, 'limitEx' => $listEx, 'limitSize' => $limitSize, 'titleForm' => $titleForm), true); }
/** * Get the markup for sample data installation form. * * @return string */ protected function getInput() { // Preset output $html = array(); // Get input object $input = JFactory::getApplication()->input; // Generate data backup form $html[] = ' <form name="JSNDataInstallSample" action="' . JRoute::_('index.php') . '" method="POST" onsubmit="return false;"> <div id="jsn-data-install-sample-action"> <div class="alert alert-warning"> <p><span class="label label-important">' . JText::_('JSN_EXTFW_GENERAL_WARNING') . '</span></p> ' . JText::_((string) $this->element['warning-message']) . ' </div> <div class="control-group"> <label for="jsn-data-install-sample-agreement" class="checkbox"> <input id="jsn-data-install-sample-agreement" name="installsample[agree]" value="1" type="checkbox" /> <strong>' . JText::_((string) $this->element['confirm-message']) . '</strong> </label> </div> <div class="form-actions"> <button id="jsn-data-install-sample-button" class="btn btn-primary" value="' . ($this->element['task'] ? (string) $this->element['task'] : 'data.installSample') . '" track-change="yes" ajax-request="yes" disabled="disabled">' . JText::_('JSN_EXTFW_DATA_INSTALL_SAMPLE_BUTTON') . '</button> </div> </div> <div id="jsn-data-install-sample-indicator" style="display: none;"> <p>' . JText::_('JSN_EXTFW_DATA_INSTALL_SAMPLE_START') . '</p> <ul> <li id="jsn-data-install-sample-downloading"> ' . JText::_('JSN_EXTFW_DATA_INSTALL_SAMPLE_START_DOWNLOADING') . ' <span id="jsn-data-install-sample-downloading-indicator" class="jsn-icon16 jsn-icon-loading"></span> <span id="jsn-data-install-sample-downloading-notice" class="jsn-processing-message"></span> <br /> <p id="jsn-data-install-sample-downloading-unsuccessful-message" class="jsn-text-important"> ' . JText::_('JSN_EXTFW_DATA_INSTALL_SAMPLE_DOWNLOAD_FAIL') . ' </p> </li> <li id="jsn-data-install-sample-installing" style="display: none;"> ' . JText::_('JSN_EXTFW_DATA_INSTALL_SAMPLE_START_INSTALLING') . ' <span id="jsn-data-install-sample-installing-indicator" class="jsn-icon16 jsn-icon-loading"></span> <span id="jsn-data-install-sample-installing-notice" class="jsn-processing-message"></span> <br /> <p id="jsn-data-install-sample-installing-unsuccessful-message" class="jsn-text-important"></p> <div id="jsn-data-install-sample-installing-warnings" class="alert alert-warning"> <p><span class="label label-important">' . JText::_('JSN_EXTFW_GENERAL_WARNING') . '</span></p> </div> </li> </ul> </div> <div id="jsn-data-install-sample-manual-installation" style="display: none;"> <ol> <li>1. ' . JText::_('JSN_EXTFW_DATA_MANUAL_DOWNLOAD') . ': <a href="' . (string) $this->element['download-url'] . '" class="btn"><span>' . JText::_('JSN_EXTFW_GENERAL_DOWNLOAD') . '</span></a></li> <li>2. ' . JText::_('JSN_EXTFW_DATA_MANUAL_INSTALL') . ': <input type="file" name="sampleDataPackage" size="40" /></li> </ol> <div class="form-actions"> <button class="btn btn-primary">' . JText::_('JSN_EXTFW_DATA_INSTALL_SAMPLE_BUTTON') . '</button> </div> </div> <div id="jsn-data-install-sample-successfully" style="display: none;"> <hr> <h3 class="jsn-text-success">' . JText::_('JSN_EXTFW_DATA_INSTALL_SAMPLE_SUCCESS') . '</h3> <p>' . JText::_('JSN_EXTFW_DATA_INSTALL_SAMPLE_SUCCESS_MESSAGE') . '</p> </div> <input type="hidden" name="installSampleStep" value="" /> <input type="hidden" name="sampleDownloadUrl" value="' . (string) $this->element['download-url'] . '" /> <input type="hidden" name="' . $this->name . '" value="JSN_CONFIG_SKIP_SAVING" /> </form> '; // Load script to handle remote sample data installation $html[] = JSNHtmlAsset::loadScript('jsn/data', array('language' => JSNUtilsLanguage::getTranslated(array('JSN_EXTFW_GENERAL_STILL_WORKING', 'JSN_EXTFW_GENERAL_PLEASE_WAIT'))), true); return implode($html); }