/** * Display the view */ public function display($tpl = null) { // Include the component HTML helpers. JSNFactory::import('components.com_content.helpers.content'); JSNFactory::import('components.com_content.helpers.html.contentadministrator'); $JSNMedia = JSNFactory::getMedia(); $JSNMedia->addStyleSheet(JSN_POWERADMIN_STYLE_URI . 'content.css'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.content.js'); if ($this->getLayout() == 'pagebreak') { // TODO: This is really dogy - should change this one day. $eName = JRequest::getVar('e_name'); $eName = preg_replace('#[^A-Z0-9\\-\\_\\[\\]]#i', '', $eName); $document = JFactory::getDocument(); $document->setTitle(JText::_('COM_CONTENT_PAGEBREAK_DOC_TITLE')); $this->assignRef('eName', $eName); parent::display($tpl); return; } // Initialiase variables. $this->form = $this->get('Form'); $this->item = $this->get('Item'); $this->state = $this->get('State'); $this->canDo = ContentHelper::getActions($this->state->get('filter.category_id')); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $language = JFactory::getLanguage(); $language->load('com_content'); parent::display($tpl); }
public function display($tpl = null) { $JSNMedia = JSNFactory::getMedia(); $JSNMedia->addStyleSheet(JSN_POWERADMIN_STYLE_URI . 'styles.css'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JS_URI . 'jquery.cook.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JS_URI . 'jquery.tinyscrollbar.js'); JSNHtmlAsset::addScript(JSN_FRAMEWORK_ASSETS . '/3rd-party/jquery-hotkeys/jquery.hotkeys.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jstree/jstree.override.js'); JSNHtmlAsset::addScript(JSN_FRAMEWORK_ASSETS . '/3rd-party/jquery-jstorage/jquery.jstorage.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JS_URI . 'jquery.topzindex.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.submenu.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.mousecheck.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.functions.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.assignpages.js'); $JSNMedia->addScriptDeclaration("var baseUrl = '" . JURI::root() . "';"); //require classes JSNFactory::localimport('libraries.joomlashine.modules'); JSNFactory::localimport('libraries.joomlashine.page.assignpages'); $viewHelper = JSNAssignpages::getInstance(); $menuTypes = $viewHelper->menuTypeDropDownList(false); $this->assign('menutypes', $menuTypes); $app = JFactory::getApplication(); $moduleid = $app->getUserState('com_poweradmin.assignpages.custompage.moduleid', JRequest::getVar('moduleid', array(), 'get', 'array')); if (count($moduleid) == 1) { $menuitems = $viewHelper->renderMenu($moduleid[0]); $assignType = JSNModules::checkAssign($moduleid[0]); } else { $menuitems = $viewHelper->renderMenu(0); $assignType = 3; } $this->assign('menuitems', $menuitems); $this->assign('assignType', $assignType); return parent::display(); }
public function display($tpl = null) { $app = JFactory::getApplication(); $document = JFactory::getDocument(); // Check if this view is used for module editing page. $moduleEdit = JRequest::getCmd('moduleedit', ''); $active_positions = array(); $model = $this->getModel('changeposition'); if (!$moduleEdit) { $moduleid = $app->getUserState('com_poweradmin.changeposition.moduleid'); } else { $moduleid = array(JRequest::getCmd('moduleid', '')); } for ($i = 0; $i < count($moduleid); $i++) { $active_positions[] = "\$('#" . $model->getModulePosition($moduleid[$i]) . "-jsnposition').addClass('active-position').attr('title', 'Active position');"; } JSNHtmlAsset::addScript(JURI::root(true) . '/media/jui/js/jquery.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.jquery.noconflict.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.functions.js'); //$document->addScript(JSN_POWERADMIN_LIB_JSNJS_URI. 'jsn.filter.visualmode.js'); //Enable position filter. $this->setFilterable(true); $customScript = "\n\t\t\tvar baseUrl = '" . JURI::root() . "';\n\t\t\tvar moduleid = new Array();\n\t\t\tmoduleid = [" . @implode(",", $moduleid) . "];\n\t\t\t(function (\$){\n\t\t\t\t\$(document).ready(function (){\n\t\t\t\t\t" . implode(PHP_EOL, $active_positions) . "\n\t\t\t\t});\n\t\t\t})(JoomlaShine.jQuery);\n \t\t"; $this->addCustomScripts($customScript); //Callback after position clicked. if (!$moduleEdit) { $onPostionClick = "\n \t\t\tif ( !\$(this).hasClass('active-position') ){\n\t\t\t\tJoomlaShine.jQuery.setPosition(moduleid, \$(this).attr('id').replace('-jsnposition', ''));\n \t\t\t\tparent.JoomlaShine.jQuery('.ui-dialog-content').dialog('close');\n \t\t\t}\n \t\t\t"; } else { $onPostionClick = "\n \t\t\tif ( !\$(this).hasClass('active-position') ){\n \t\t\t\tvar posName = \$(this).attr('id').replace('-jsnposition', '');\n \t\t\t\tparent.JoomlaShine.jQuery('#jform_position').val(posName);\n \t\t\t\tparent.modal.close();\n \t\t\t}\n \t\t\t"; } $this->addPositionClickCallBack($onPostionClick); parent::display($tpl); }
/** * Display the view */ public function display($tpl = null) { $JSNMedia = JSNFactory::getMedia(); $JSNMedia->addStyleSheet(JSN_POWERADMIN_STYLE_URI . 'styles.css'); JSNHtmlAsset::addScript(JSN_FRAMEWORK_ASSETS . '/3rd-party/jquery-hotkeys/jquery.hotkeys.js'); JSNHtmlAsset::addScript(JSN_FRAMEWORK_ASSETS . '/3rd-party/jquery-jstorage/jquery.jstorage.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JS_URI . 'jquery.topzindex.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.submenu.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.mousecheck.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.functions.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JS_URI . 'jquery.tinyscrollbar.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.assignpages.js'); JSNHtmlAsset::addScript(JSN_FRAMEWORK_ASSETS . '/3rd-party/jquery-jstree/jquery.jstree.js'); $JSNMedia->addScriptDeclaration("var baseUrl = '" . JURI::root() . "';"); //require helper JSNFactory::localimport('libraries.joomlashine.page.assignpages'); $viewHelper = JSNAssignpages::getInstance(); $menuTypes = $viewHelper->menuTypeDropDownList(false); $this->assign('menutypes', $menuTypes); $moduleid = JRequest::getVar('id', 0); $menuitems = $viewHelper->renderMenu($moduleid); $this->assign('menuitems', $menuitems); JSNFactory::localimport('libraries.joomlashine.modules'); $assignType = JSNModules::checkAssign($moduleid); $this->assign('assignType', $assignType); $this->form = $this->get('Form'); $this->item = $this->get('Item'); $this->state = $this->get('State'); $language = JFactory::getLanguage(); $language->load('com_modules'); parent::display($tpl); }
/** * * Add Scripts and StyleSheets for this view * @param String $currentUrl */ protected function addMedia($currentItemid, $render_url, $php_to_js) { $currentItemid = (int) $currentItemid; /** load libraries for the system rener **/ $JSNTemplate = JSNFactory::getTemplate(); $JSNMedia = JSNFactory::getMedia(); $template = JFactory::getDocument()->template; $currUri = new JURI($render_url); JSNHtmlAsset::addStyle(JSN_POWERADMIN_STYLE_URI . 'uilayout/layout-default-latest.css'); JSNHtmlAsset::addStyle(JSN_POWERADMIN_STYLE_URI . 'styles.css'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JS_URI . 'jquery.tinyscrollbar.js'); JSNHtmlAsset::addScript(JSN_FRAMEWORK_ASSETS . '/3rd-party/jquery-hotkeys/jquery.hotkeys.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JS_URI . 'jquery-baseencode64.js'); JSNHtmlAsset::addScript(JSN_FRAMEWORK_ASSETS . '/3rd-party/jquery-jstorage/jquery.jstorage.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.mousecheck.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.autodragdrop.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.rawmode.draganddrop.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.rawmode.component.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.rawmode.grid.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.functions.js'); JSNHtmlAsset::addScript(JSN_FRAMEWORK_ASSETS . '/3rd-party/jquery-layout/js/jquery.layout-latest.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jstree/jstree.override.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.jstreecontext.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.submenu.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.menuitems.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.jquery.override.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.filter.js'); //check sef on/off $sef = JFactory::getConfig()->get('sef'); /** Add Custom Scripts **/ $customScript = "\n\t\t\tvar jsnpoweradmin = true;\n\t\t\tvar baseUrl = '" . JURI::root() . "';\n\t\t\tvar sef = " . $sef . ";\n\t\t\tvar currentUrl = '" . $render_url . "';\n\t\t\tvar lang = '" . $JSNMedia->getLang() . "';\n\t\t\tvar positions = new Array();\n\t\t\tvar JSNGrid, JSNComponent;\n\n\t\t\t(function(\$){\n\t\t\t " . implode(PHP_EOL, $php_to_js) . "\n\t\t\t \$.uiBackCompat = false;\n\t\t\t\t\$(document).ready(function(){\n\t\t\t\t\t\$('#page-loading').hide();\n\t\t\t\t\t\$('#jsn-rawmode-layout').css('visibility', 'visible');\n\t\t\t\t\tif (\$('#jsn-adminbar').size() == 0) {\n\t\t\t\t\t\t\$('body').addClass('no-adminbar');\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction setFullScreen () {\n\t\t\t\t\t\t\$('body').toggleClass('jsn-fullscreen');\n\t\t\t\t\t\tif (\$('body').hasClass('jsn-fullscreen')) {\n\t\t\t\t\t\t\t\$('.header').hide();\n\t\t\t\t\t\t\t\$('.subhead-collapse').hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\$('.header').show();\n\t\t\t\t\t\t\t\$('.subhead-collapse').show();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\$(window).trigger('resize');\n\t\t\t\t\t}\n\n\t\t\t\t\t\$('a#jsn-fullscreen').click(function () {\n\t\t\t\t\t\tsetFullScreen();\n\t\t\t\t\t\t\$.cookie('jsn-fullscreen', \$('body').hasClass('jsn-fullscreen'));\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t});\n\n\t\t\t\t\tvar isFullScreen = \$.cookie('jsn-fullscreen');\n\t\t\t\t\tif (isFullScreen !== undefined && (isFullScreen == 'true' || isFullScreen == '1')) {\n\t\t\t\t\t\tsetFullScreen();\n\t\t\t\t\t}\n\n\t\t\t\t\t\$.jStorage.set('selected_node', " . $currentItemid . ");\n\t\t\t\t\t\$.ajaxSetup({\n\t\t\t\t\t timeout: 10000\n\t\t\t\t\t});\n\t\t\t\t\tJSNGrid = new \$.JSNGrid();\n\t\t\t\t\tJSNComponent = new \$.JSNComponent('" . $currUri->getVar('option') . "', '" . $currUri->getVar('view') . "', '" . $currUri->getVar('layout') . "', '" . $currentItemid . "');\n \t\t\t\t\t\$._menuitems.mode = 'rawmode';\n \t\t\t\t\t\$._menuitems.init();\n \t\t\t\t\t\$.jsnmouse.init();\n\t\t\t\t\tJSNFilter\t= new \$.JSNSpotligthModuleFilter(\$('#module_spotlight_filter'), {defaultText: '" . JText::_('JSN_RAWMODE_MODULE_FILTER_DEFAULT_TEXT', true) . "'});\n\t\t\t\t});\n\n\t\t\t})(JoomlaShine.jQuery);\n\t\t"; $JSNMedia->addScriptDeclaration($customScript); }
public function display($tpl = null) { $JSNMedia = JSNFactory::getMedia(); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.filter.js'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $language = JFactory::getLanguage(); $language->load('com_menus'); $model = $this->getModel(); $this->assign('model', $model); $menutype = ''; $menutypeid = JRequest::getVar("menutypeid", ''); if ($menutypeid) { JSNFactory::localimport('models.menuitem'); $paMenuModel = new PoweradminModelMenuitem(); $menutype = $paMenuModel->getMenuType($menutypeid); } $parentid = JRequest::getVar("parentid", ''); $customScript = "\n\t\t\tvar selectMenuType;\n (function(\$){\n\t\t\t\t\$(window).ready(function(){\n\t\t\t\t \t selectMenuType = \$.jsnFilter(\n\t\t\t\t \t {\n\t\t\t \t \t\t frameElement: \$('.jsn-menu-type'),\n\t\t\t \t \t\t category : true,\n\t\t\t\t\t \t itemClass : '.jsn-item-type',\n\t\t\t\t\t \t totalColumn : 3,\n\t\t\t\t\t \t itemWidth : 220,\n\t\t\t\t\t \t itemHeight : 30,\n\t\t\t\t\t \t mPosLeft : 0,\n\t\t\t\t\t \t mPosTop : 15,\n\t\t\t\t\t \t marginOffset: {\n\t\t\t\t\t \t \t right : 15,\n\t\t\t\t\t \t \t bottom: 20\n\t\t\t\t\t \t },\n\t\t\t\t\t \t eventClick: function(){\n\t\t\t\t\t \t \t var params = \$(this).attr('params');\n\t\t\t\t\t \t \t window.parent.JoomlaShine.jQuery.addNewMenuItem(params, '" . $menutype . "', '" . $menutypeid . "', '" . $parentid . "');\n\t\t\t\t\t \t }\n\t\t\t\t \t \t}\n\t\t\t\t \t );\n\t\t\t\t });\n\t\t\t })(JoomlaShine.jQuery);\n\t\t"; $JSNMedia->addScriptDeclaration($customScript); return parent::display(); }
/** * Load common assets. * * @param boolean $inline Whether to load assets inline or load in header? * * @return void */ public static function loadAssets($inline = false) { // Define common stylesheets $stylesheets = array(); if (JSNVersion::isJoomlaCompatible('3.0')) { $stylesheets[] = JSN_URL_ASSETS . '/3rd-party/jquery-ui/css/ui-bootstrap/jquery-ui-1.9.0.custom.css'; if (preg_match('/msie/i', $_SERVER['HTTP_USER_AGENT'])) { $stylesheets[] = JSN_URL_ASSETS . '/3rd-party/jquery-ui/css/ui-bootstrap/jquery.ui.1.9.0.ie.css'; } } else { $stylesheets[] = JSN_URL_ASSETS . '/3rd-party/bootstrap/css/bootstrap.min.css'; $stylesheets[] = JSN_URL_ASSETS . '/3rd-party/jquery-ui/css/ui-bootstrap/jquery-ui-1.8.16.custom.css'; if (preg_match('/msie/i', $_SERVER['HTTP_USER_AGENT'])) { $stylesheets[] = JSN_URL_ASSETS . '/3rd-party/jquery-ui/css/ui-bootstrap/jquery-ui-1.8.16.ie.css'; } } $stylesheets[] = JSN_URL_ASSETS . '/joomlashine/css/jsn-gui.css'; // Load stylesheets if (!$inline) { JSNHtmlAsset::addStyle($stylesheets); } else { foreach ($stylesheets as $stylesheet) { $html[] = '<link type="text/css" href="' . $stylesheet . '" rel="stylesheet" />'; } echo implode("\n", $html); } // Load scripts if (JSNVersion::isJoomlaCompatible('3.2')) { JSNHtmlAsset::addScript(JUri::root(true) . '/media/jui/js/jquery.min.js'); } }
/** * Generate html for PageBuilder layout. * * @return string */ public function html() { $helper = new JSNPagebuilderHelpersBuilder(); JSNHtmlAsset::addScript(JSNPB_ADMIN_URL . '/assets/js/elements-lang.js'); JSNHtmlAsset::addScript(JSNPB_ADMIN_URL . '/assets/js/handle.js'); JSNHtmlAsset::addScript(JSNPB_ADMIN_URL . '/assets/js/shortcodesetting/settings-handler.js'); // Genrate pagebuilder element template. $helper->generateElementColumnTemplate(); $helper->generateElementRowTemplate(); $source_content = ''; $data = array(); $source_content = $_POST['form_data']; // Remove all p tags which auto added by the editor $source_content = JSNPagebuilderHelpersShortcode::removeAutop($source_content); $source_content = html_entity_decode($source_content, ENT_COMPAT, 'UTF-8'); $html[] = '<link rel="stylesheet" href="' . JSNPB_ADMIN_URL . '/assets/css/jsn-element-font.css' . '" type="text/css" />'; $html[] = '<link rel="stylesheet" href="' . JSNPB_ADMIN_URL . '/assets/css/pb-layout-font.css' . '" type="text/css" />'; $html[] = '<div id="form-container" class="jsn-layout jsn-section-content">'; if ($source_content) { //$shortcodeTags = $helper->getShortcodeTags(); $html[] = $helper->generateShortCode($source_content); } else { $html[] = $helper->getRowStructure(); } $html[] = '<a href="javascript:void(0);" id="jsn-add-container" class="jsn-add-more jsn-add-more-row"><i class="icon-plus"></i> Add Row </a>'; /** * Show thumbnail for default layouts */ $html[] = '<div class="row-fluid pb-layout-thumbs">'; $layouts = JSNPBShortcodeRow::$layouts; foreach ($layouts as $columns) { $columns_name = implode('x', $columns); $icon_class = implode('-', $columns); $data_columns = implode(',', $columns); $icon_class = 'pb-layout-' . $icon_class; $icon = '<i class="' . $icon_class . '"></i>'; $html[] = '<div class="thumb-wrapper" data-columns="' . $data_columns . '" title="' . $columns_name . '">' . $icon . '</div>'; } $html[] = '</div>'; $html[] = JSNHtmlGenerate::footer(array(), false); $html[] = '</div>'; $html[] = $helper->getAddShortcodesPopup(); if (defined("JSN_PAGEBUILDER_EDITION")) { if (strtolower(JSN_PAGEBUILDER_EDITION) == "free") { if (file_exists(JPATH_ROOT . '/administrator/components/com_pagebuilder/helpers/articles.php')) { include_once JPATH_ROOT . '/administrator/components/com_pagebuilder/helpers/articles.php'; $pbTotal = JSNPagebuilderHelpersArticles::getCountArticleUsedPageBuilderFromPlugin(); if ($pbTotal >= 5 && !JFactory::getApplication()->input->getInt('article_id') && JFactory::getApplication()->input->getInt('is_com_modules') != 1) { $html = array(); $html[] = '<div class="jsn-bootstrap3"><div class="pb-element-container"><p class="jsn-bglabel">You have reached 5 pages limit of using JSN PageBuilder.</p><p style="font-size: 20px;text-align: center;color: #d3d3d3;">Please to upgrade <a target=\'_blank\' href=\'' . JSN_PAGEBUILDER_INFO_LINK . '\'>Pro version</a> or remove your old pages that used JSN PageBuilder.</p><div style="text-align: center"><a href="index.php?option=com_pagebuilder&view=upgrade" target="_blank" class="btn-primary btn-large btn"> Upgrade </a></div></div></div>'; } } } } print_r(implode("\n", $html)); exit; }
/** * 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); }
/** * Include admin scripts * * @return type */ public function backend_element_assets() { $document = JFactory::getDocument(); JSNHtmlAsset::addScript(JSNPB_ELEMENT_URL . '/pricingtable/assets/js/pricingtable-settings.js', 'text/javascript'); JSNPagebuilderHelpersFunctions::print_asset_tag(JSNPB_ELEMENT_URL . '/pricingtable/assets/js/item_pricingtable.js', 'js'); JSNPagebuilderHelpersFunctions::print_asset_tag(JSNPB_ELEMENT_URL . '/pricingtable/assets/css/item_pricingtable.css', 'css'); JSNPagebuilderHelpersFunctions::print_asset_tag(JSNPB_ADMIN_URL . '/assets/joomlashine/js/jsn-linktype.js', 'js'); }
protected function getInput() { $uri = JURI::root(true); $enabledCSS = ' jsn-disable'; $menuid = JRequest::getInt('id'); $app = JFactory::getApplication(); $showcaseID = $app->getUserState('com_imageshow.add.showcase_id'); if ($showcaseID != 0) { $this->value = $showcaseID; $app->setUserState('com_modules.add.showcase_id', 0); } $document = JFactory::getDocument(); $input = $app->input; $option = $input->getCmd('option', ''); $view = $input->getCmd('view', ''); if ($option == 'com_advancedmodules' && $view == 'module') { if (file_exists(JPATH_ROOT . '/media/jui/js/jquery.simplecolors.min.js')) { $document->addScript(JUri::root(true) . '/media/jui/js/jquery.simplecolors.min.js'); } } !class_exists('JSNBaseHelper') or JSNBaseHelper::loadAssets(); JHTML::stylesheet('modules/mod_imageshow/assets/css/style.css'); JHTML::stylesheet('administrator/components/com_imageshow/assets/css/imageshow.css'); JSNHtmlAsset::addScript($uri . '/media/jui/js/jquery.min.js'); JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery-ui/js/jquery-ui-1.9.0.custom.min.js'); JHTML::script('administrator/components/com_imageshow/assets/js/joomlashine/window.js'); JHTML::script('modules/mod_imageshow/assets/js/jsnis_module.js'); JSNHtmlAsset::addScript($uri . '/administrator/components/com_imageshow/assets/js/joomlashine/conflict.js'); $jsCode = "\n\t\t\tvar baseUrl = '" . JURI::root() . "';\n\t\t\tvar gIframeFunc = undefined;\n\t\t\t(function(\$){\n\t\t\t\t\$(document).ready(function () {\n\t\t\t\t\tvar wWidth = \$(window).width()*0.9;\n\t\t\t\t\tvar wHeight = \$(window).height()*0.8;\n\t\t\t\t\t\$('.jsn-is-showcase-modal').click(function(event){\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tvar link = baseUrl+'administrator/'+\$(this).attr('href')+'&tmpl=component';\n\t\t\t\t\t\tvar save_button_lable = '" . JText::_('JSN_IMAGESHOW_SAVE_AND_SELECT', true) . "';\n\t\t\t\t\t\tvar JSNISShowcaseWindow = new \$.JSNISUIWindow(link,{\n\t\t\t\t\t\t\t\twidth: wWidth,\n\t\t\t\t\t\t\t\theight: wHeight,\n\t\t\t\t\t\t\t\ttitle: '" . JText::_('JSN_IMAGESHOW_SHOWCASE_SETTINGS') . "',\n\t\t\t\t\t\t\t\tscrollContent: true,\n\t\t\t\t\t\t\t\tbuttons:\n\t\t\t\t\t\t\t\t[{\n\t\t\t\t\t\t\t\t\ttext:save_button_lable,\n\t\t\t\t\t\t\t\t\tclass: 'ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only',\n\t\t\t\t\t\t\t\t\tclick: function (){\n\t\t\t\t\t\t\t\t\t\tif(typeof gIframeFunc != 'undefined')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tgIframeFunc();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tconsole.log('Iframe function not available')\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttext: '" . JText::_('JSN_IMAGESHOW_CANCEL', true) . "',\n\t\t\t\t\t\t\t\t\tclass: 'ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only',\n\t\t\t\t\t\t\t\t\tclick: function (){\n\t\t\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t})((typeof JoomlaShine != 'undefined' && typeof JoomlaShine.jQuery != 'undefined') ? JoomlaShine.jQuery : jQuery);\n\t\t "; $document = JFactory::getDocument(); $document->addScriptDeclaration($jsCode); $db = JFactory::getDBO(); JHTML::stylesheet('modules/mod_imageshow/assets/css/style.css'); //build the list of categories $query = 'SELECT a.showcase_title AS text, a.showcase_id AS id' . ' FROM #__imageshow_showcase AS a' . ' WHERE a.published = 1' . ' ORDER BY a.ordering'; $db->setQuery($query); $data = $db->loadObjectList(); $results[] = JHTML::_('select.option', '0', '- ' . JText::_('JSN_FIELD_SELECT_SHOWCASE') . ' -', 'id', 'text'); $results = array_merge($results, $data); if ($data) { $enabledCSS = ''; if (!$menuid && is_null($showcaseID)) { $this->value = $data[0]->id; } } else { $this->value = '0'; } $html = "<div id='jsn-showcase-icon-warning'>"; $html .= JHTML::_('select.genericList', $results, $this->name, 'class="inputbox jsn-select-value' . $enabledCSS . '" style="width: 250px;"', 'id', 'text', $this->value, $this->id); if (!$data) { $html .= '<span><i>' . JText::_('JSN_DO_NOT_HAVE_ANY_SHOWCASE') . '</i></span>'; } $html .= "<span><i class=\"jsn-icon16 jsn-icon-warning-sign icon-warning" . $enabledCSS . "\" id = \"showcase-icon-warning\"><span class=\"jsn-tooltip-wrap\"><span class=\"jsn-tooltip-anchor\"></span><p class=\"jsn-tooltip-title\">" . JText::_('JSN_FIELD_TITLE_SHOWCASE_WARNING') . "</p>" . JText::_('JSN_FIELD_DES_SHOWCASE_WARNING') . "</span></i></span>"; $html .= "<a class=\"jsn-link-edit-showcase jsn-is-showcase-modal\" id=\"jsn-link-edit-showcase\" href=\"javascript: void(0);\" rel='{\"action\": \"edit\"}' title=\"" . JText::_('EDIT_SELECTED_SHOWCASE') . "\"><i class=\"jsn-icon16 jsn-icon-pencil\" id=\"showcase-icon-edit\"></i></a>"; $html .= "<a class=\"jsn-is-showcase-modal\" href=\"index.php?option=com_imageshow&controller=showcase&task=add\" rel='{\"action\": \"add\"}' title=\"" . JText::_('CREATE_NEW_SHOWCASE') . "\"><i class=\"jsn-icon16 jsn-icon-plus\" id=\"showcase-icon-add\"></i></a>"; $html .= "</div>"; 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'); }
public function display($tpl = null) { $app = JFactory::getApplication(); $JSNMedia = JSNFactory::getMedia(); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.datas.validation.js'); $JSNMedia->addScriptDeclaration("\n\t\t\tvar baseUrl = '" . JURI::root() . "';\n\t\t\t(function(\$){\n\t\t\t\t\$(window).ready(function(){\n\t\t\t\t\t\$('#jsn-component-settings').textboxDataNumberic({maxValue:500});\n\t\t\t\t\t\$('.apply-setting-area').click(function(){\n\t\t\t\t\t\tif (\$(this).children('input').val() == 'globally'){\n\t\t\t\t\t\t\t\$(this).children('input').val('only');\n\t\t\t\t\t\t\t\$(this).children('span.symbol-only').show();\n\t\t\t\t\t\t\t\$(this).children('span.symbol-globally').hide();\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\$(this).children('span.symbol-only').hide();\n\t\t\t\t\t\t\t\$(this).children('span.symbol-globally').show();\n\t\t\t\t\t\t\t\$(this).children('input').val('globally');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t})(JoomlaShine.jQuery);\n\t\t"); $JSNConfig = JSNFactory::getConfig(); $params = $JSNConfig->getMenuParams($app->getUserState('com_poweradmin.component.menuid', 0)); $JSNConfig->megreGlobalParams('com_content', $params, true); $this->assign('params', $params); return parent::display(); }
/** * Add nesscessary JS & CSS files * * @return void */ private function _addAssets() { $objJSNMedia = JSNISFactory::getObj('classes.jsn_is_media'); !class_exists('JSNBaseHelper') or JSNBaseHelper::loadAssets(); $objJSNMedia->addStyleSheet(JURI::root(true) . '/administrator/components/com_imageshow/assets/css/imageshow.css'); 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'); // Add toolbar menu JSNISImageShowHelper::addToolbarMenu(); // Set the submenu JSNISImageShowHelper::addSubmenu('about'); }
/** * 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')))); }
public function display($tpl = null) { $app = JFactory::getApplication(); $document = JFactory::getDocument(); $positionName = JRequest::getVar('positionname', ''); JSNHtmlAsset::addScript(JURI::root(true) . '/media/jui/js/jquery.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.jquery.noconflict.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.functions.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.filter.visualmode.js'); //Enable position filter. $this->setFilterable(true); $customScript = "\n\t\t\tvar baseUrl = '" . JURI::root() . "';\n\t\t\t(function (\$){\n\t\t\t\t\$(document).ready(function (){\n\t\t\t\t\t\$('#" . $positionName . "-jsnposition').addClass('active-position').attr('title', 'Active position');\n\t\t\t\t});\n\t\t\t})(JoomlaShine.jQuery);\n \t\t"; $this->addCustomScripts($customScript); parent::display($tpl); }
protected function getInput() { $definePath = JPATH_ROOT . DIRECTORY_SEPARATOR . 'administrator' . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_imageshow' . DIRECTORY_SEPARATOR . 'imageshow.defines.php'; if (is_file($definePath)) { include_once $definePath; } $_app = JFactory::getApplication('admin'); $_input = $_app->input; $pathOnly = JURI::root(true); $pathRoot = JURI::root(); $enabledCSS = ' jsn-disable'; $menuid = $_input->getInt('id', 0); $app = JFactory::getApplication(); $db = JFactory::getDBO(); $doc = JFactory::getDocument(); $doc->addStyleSheet($pathOnly . '/administrator/components/com_imageshow/assets/css/imageshow.css'); $doc->addStyleSheet($pathOnly . '/administrator/components/com_imageshow/assets/css/menu.galleries.collection.css'); JSNHtmlAsset::addScript($pathOnly . '/media/jui/js/jquery.min.js'); JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery-ui/js/jquery-ui-1.9.0.custom.min.js'); $doc->addScript($pathOnly . '/administrator/components/com_imageshow/assets/js/joomlashine/window.js'); JSNHtmlAsset::addScript($pathOnly . '/administrator/components/com_imageshow/assets/js/joomlashine/conflict.js'); $query = 'SELECT COUNT(*) FROM #__imageshow_showlist'; $db->setQuery($query); $totalShowlist = $db->loadResult(); if ($totalShowlist >= 3 && strtolower(JSN_IMAGESHOW_EDITION) == 'free') { $jsCode = "\n\t\t\t\t(function(\$){\n\t\t\t\t\t\$(document).ready(function () {\n\n\t\t\t\t\t\t\$('.jsn-is-showlist-modal').click(function(event){\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tvar cfm = \$('<div id=\"jsn-is-module-backend-confirmbox-container\" style=\"padding:10px; overflow:hidden;\"/>').appendTo('body').html('" . JText::_('JSN_IMAGESHOW_YOU_HAVE_REACHED_THE_LIMITATION_OF_3_SHOWLISTS_IN_FREE_EDITION', true) . "');\n\t\t\t\t\t\t\tcfm.dialog({\n\t\t\t\t\t\t\t\twidth : 500,\n\t\t\t\t\t\t\t\theight : 250,\n\t\t\t\t\t\t\t\tmodal : true,\n\t\t\t\t\t\t\t\tdraggable : false,\n\t\t\t\t\t\t\t\tresizable : false,\n\t\t\t\t\t\t\t\ttitle\t\t: '" . JText::_('JSN_IMAGESHOW_UPGRADE_TO_PRO_EDITION_FOR_MORE', true) . "',\n\t\t\t\t\t\t\t\tbuttons :\n\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\ttext: 'Close',\n\t\t\t\t\t\t\t\t\t\t\t\tclick: function (){\n\t\t\t\t\t\t\t\t\t\t\t\t\tcfm.remove();\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t})((typeof JoomlaShine != 'undefined' && typeof JoomlaShine.jQuery != 'undefined') ? JoomlaShine.jQuery : jQuery);\n\t\t\t "; } else { $jsCode = "\n\t\t\t\tvar baseUrl = '" . JURI::root() . "';\n\t\t\t\tvar gIframeFunc = undefined;\n\t\t\t\t(function(\$){\n\t\t\t\t\t\$(document).ready(function () {\n\t\t\t\t\t\tvar wWidth = \$(window).width()*0.9;\n\t\t\t\t\t\tvar wHeight = \$(window).height()*0.8;\n\t\t\t\t\t\t\$('.jsn-is-showlist-modal').click(function(event){\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tvar link = baseUrl+'administrator/'+\$(this).attr('href')+'&tmpl=component';\n\t\t\t\t\t\t\tvar save_button_lable = '" . JText::_('JSN_IMAGESHOW_SAVE_AND_SELECT', true) . "';\n\t\t\t\t\t\t\tvar JSNISShowlistWindow = new \$.JSNISUIWindow(link,{\n\t\t\t\t\t\t\t\t\twidth: wWidth,\n\t\t\t\t\t\t\t\t\theight: wHeight,\n\t\t\t\t\t\t\t\t\ttitle: '" . JText::_('JSN_IMAGESHOW_SHOWLIST_SETTINGS') . "',\n\t\t\t\t\t\t\t\t\tscrollContent: true,\n\t\t\t\t\t\t\t\t\tbuttons:\n\t\t\t\t\t\t\t\t\t[{\n\t\t\t\t\t\t\t\t\t\ttext:save_button_lable,\n\t\t\t\t\t\t\t\t\t\tclass: 'ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only',\n\t\t\t\t\t\t\t\t\t\tclick: function (){\n\t\t\t\t\t\t\t\t\t\t\tif(typeof gIframeFunc != 'undefined')\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tgIframeFunc();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tconsole.log('Iframe function not available')\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttext: '" . JText::_('JSN_IMAGESHOW_CANCEL', true) . "',\n\t\t\t\t\t\t\t\t\t\tclass: 'ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only',\n\t\t\t\t\t\t\t\t\t\tclick: function (){\n\t\t\t\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t})((typeof JoomlaShine != 'undefined' && typeof JoomlaShine.jQuery != 'undefined') ? JoomlaShine.jQuery : jQuery);\n\t\t\t "; } $doc->addScriptDeclaration($jsCode); $query = $db->getQuery(true); $query->clear(); $query->select('a.showlist_title AS text, a.showlist_id AS id'); $query->from($db->quoteName('#__imageshow_showlist') . ' AS a'); $query->where('a.published = ' . $db->quote(1)); $query->order('a.ordering ASC'); $db->setQuery($query); $results = $db->loadObjectList(); $html = "<div id='jsn-showlist-container'>"; if (!$results) { $html .= '<span class="jsn-menu-alert-message">' . JText::_('JSN_DO_NOT_HAVE_ANY_SHOWLIST') . '</span>'; } else { $html .= JHTML::_('select.genericList', $results, $this->name, 'class="inputbox jsn-select-value' . $enabledCSS . '" multiple="multiple"', 'id', 'text', $this->value, $this->id); } $html .= "<a class=\"jsn-is-showlist-modal\" href=\"index.php?option=com_imageshow&controller=showlist&task=add\" rel='{\"action\": \"add\"}' title=\"" . JText::_('CREATE_NEW_SHOWLIST') . "\"><i class=\"jsn-icon16 jsn-icon-plus\" id = \"showlist-icon-add\"></i></a>"; $html .= "</div>"; 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); }
/** * Display the view */ public function display($tpl = null) { $JSNMedia = JSNFactory::getMedia(); $JSNMedia->addStyleSheet(JSN_POWERADMIN_STYLE_URI . 'content.css'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.content.js'); //Load language JFactory::getLanguage()->load('com_categories'); $this->form = $this->get('Form'); $this->item = $this->get('Item'); $this->state = $this->get('State'); $this->canDo = CategoriesHelper::getActions($this->state->get('category.component')); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } parent::display($tpl); }
/** * Display method * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void */ function display($tpl = null) { // Get config parameters $config = JSNConfigHelper::get(); // Set the toolbar JToolbarHelper::title(JText::_('JSN_PAGEBUILDER_BUILDER_SETTING_TITLE')); // Assign variables for rendering $this->assignRef('msgs', $msgs); JSNHtmlAsset::addStyle(JSNPB_PLG_SYSTEM_ASSETS_URL . '/css/pagebuilder.css'); JSNHtmlAsset::addStyle(JSNPB_ADMIN_URL . '/assets/css/configurations.css'); JSNHtmlAsset::addScript(JSNPB_FRAMEWORK_ASSETS . '/3rd-party/jquery/jquery.min.js'); JSNHtmlAsset::addScript(JSNPB_PLG_SYSTEM_ASSETS_URL . '3rd-party/jquery-ui/js/jquery-ui-1.10.3.custom.js'); JSNHtmlAsset::addScript(JSNPB_PLG_SYSTEM_ASSETS_URL . '3rd-party/jquery-livequery/jquery.livequery.min.js'); JSNHtmlAsset::addScript(JSNPB_PLG_SYSTEM_ASSETS_URL . 'js/joomlashine.noconflict.js'); JSNHtmlAsset::addScript(JSNPB_ASSETS_URL . 'js/config.js'); // Display the template parent::display($tpl); }
/** * Load assets. * * @return void */ public static function addAssets($checkVersion = true) { // Load common assets $stylesheets = array(); $stylesheets[] = JURI::root(true) . '/plugins/system/jsnframework/assets/3rd-party/jquery-ui/css/ui-bootstrap/jquery-ui-1.9.0.custom.css'; $stylesheets[] = JURI::root(true) . '/plugins/system/jsnframework/assets/joomlashine/css/jsn-gui.css'; //$stylesheets[] = JURI::root(true) . '/plugins/system/jsnframework/assets/3rd-party/font-awesome/css/font-awesome.css'; // Load proprietary assets // Load scripts if ($checkVersion && JSNVersion::isJoomlaCompatible('3.2')) { JSNHtmlAsset::addScript(JUri::root(true) . '/media/jui/js/jquery.min.js'); // $document = JFactory::getDocument(); //$document->addScript(JURI::root(true) . '/media/jui/js/jquery.min.js'); // JSNHtmlAsset::addScriptLibrary('jquery.ui', JSN_UNIFORM_ASSETS_URI . "/js/libs/jquery-ui-1.10.3.custom.min", array('jquery')); } $stylesheets[] = JURI::base(true) . '/components/com_uniform/assets/css/uniform.css'; JSNHtmlAsset::addStyle($stylesheets); }
private function _addAssets() { if (class_exists('JSNHtmlAsset')) { if (method_exists('JSNHtmlAsset', 'addScript') && method_exists('JSNHtmlAsset', 'addStyle')) { JSNHtmlAsset::addStyle(JSN_FRAMEWORK_ASSETS . '/3rd-party/jquery-ui/css/ui-bootstrap/jquery-ui-1.9.0.custom.css'); JSNHtmlAsset::addStyle(JSN_FRAMEWORK_ASSETS . '/joomlashine/css/jsn-gui.css'); JSNHtmlAsset::addScript(JURI::root(true) . '/media/jui/js/jquery.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.jquery.noconflict.js'); JSNHtmlAsset::addScript(JSN_FRAMEWORK_ASSETS . '/3rd-party/jquery-ui/js/jquery-ui-1.9.0.custom.min.js'); JSNHtmlAsset::addScript(JURI::root(true) . '/media/jui/js/jquery.ui.sortable.js'); JSNHtmlAsset::addScript(JSN_FRAMEWORK_ASSETS . '/3rd-party/jquery-ck/jquery.ck.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JS_URI . 'jquery.topzindex.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.window.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.lang.js'); JSNHtmlAsset::addStyle(JSN_POWERADMIN_STYLE_URI . "poweradmin.css"); } } }
public function display($tpl = null) { $JSNMedia = JSNFactory::getMedia(); $JSNMedia->addStyleSheet(JSN_POWERADMIN_STYLE_URI . 'styles.css'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . "jsn.mousecheck.js"); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . "jsn.submenu.js"); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . "jsn.manage-styles.js"); $JSNMedia->addStyleDeclaration("\n\t\t.template-item {\n\t\t\tbackground: url(" . JSN_POWERADMIN_IMAGES_URI . "icons-24/icon-24-loading-circle.gif) no-repeat center center;\n\t\t}\n\t\t.loading {\n\t\t\tbackground: url(" . JSN_POWERADMIN_IMAGES_URI . "icons-16/icon-16-loading-circle.gif) no-repeat center right;\n\t\t}\n\t\t"); $JSNMedia->addScriptDeclaration("\n (function (\$){\n \$(document).ready(function (){\n \$('#client-switch').change(function (e) {\n var val =\$(this).attr('value');\n if(val == 0){\n \$('.template-list').hide();\n \$('#site').show();\n }else{\n \$('.template-list').hide();\n \$('#admin').show();\n }\n })\n\t });\n })(JoomlaShine.jQuery);\n "); // Add javascript lang translation $jsnLang = new JSNJavascriptLanguages(); $jsnLang->addLang('JSN_POWERADMIN_TM_MAKE_DEFAULT'); $jsnLang->addLang('JSN_POWERADMIN_TM_UNINSTALL_TEMPLATE'); $jsnLang->addLang('JSN_POWERADMIN_TM_MAKE_DEFAULT'); $jsnLang->addLang('JSN_POWERADMIN_TM_UNINSTALL_TEMPLATE'); $jsnLang->addLang('JSN_POWERADMIN_TM_CLOSE_BEFORE_DELETE'); $jsnLang->addLang('JSN_POWERADMIN_TM_CLOSE_BEFORE_UNINSTALL'); $jsnLang->addLang('JSN_POWERADMIN_TM_ALREADY_DEFAULT'); $jsnLang->addLang('JSN_POWERADMIN_TM_CANNOT_DELETE_DEFAULT'); $jsnLang->addLang('JSN_POWERADMIN_TM_CANNOT_UNINSTALL_DEFAULT'); $jsnLang->addLang('JSN_POWERADMIN_TM_DELETE_STYLE_CONFIRM'); $jsnLang->addLang('JSN_POWERADMIN_TM_UNINSTALL_TEMPLATE_CONFIRM'); $JSNMedia->addScriptDeclaration($jsnLang->loadLang()); $model = $this->getModel('templates'); $rows = $model->getTemplates(); $adminRows = $model->getTemplates(1); // Check permission for removing styles. JSNFactory::import('components.com_templates.helpers.templates'); $canDo = version_compare(JVERSION, '3.2.2', 'ge') ? JHelperContent::getActions('com_templates') : TemplatesHelper::getActions(); $canDelete = $canDo->get('core.delete'); $canDelete = '<input type="hidden" id="candelete" value="' . $canDelete . '"></input>'; echo $canDelete; // Check permission for uninstalling template. JSNFactory::import('components.com_installer.helpers.installer'); $canDo = version_compare(JVERSION, '3.2.2', 'ge') ? JHelperContent::getActions('com_installer') : TemplatesHelper::getActions(); $canUninstall = $canDo->get('core.delete'); $canUninstall = '<input type="hidden" id="canuninstall" value="' . $canUninstall . '"></input>'; echo $canUninstall; //assign to view $this->assign('templates', $rows); $this->assign('adminTemplates', $adminRows); $this->assign('canDelete', $canDelete); return parent::display(); }
/** * Add jquery files * @return: Array */ protected function addScripts() { $JSNMedia = JSNFactory::getMedia(); $template = JSNFactory::getTemplate(); $template_js_positions = $template->loadArrayJavascriptTemplatePositions(true); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JS_URI . 'jquery-baseencode64.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.mousecheck.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.autodragdrop.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.submenu.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.visualmode.draganddrop.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.visualmode.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.showblock.js'); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JS_URI . 'jstorage.js'); $currentUrlInos = $this->jsnpwrender->getCurrentUrlInfos(); $showTemplatePosition = $currentUrlInos->showTemplatePosition ? 'true' : 'false'; $customscripts = "\n\t\t\t" . $template_js_positions . "\n\t\t\tvar jsnpoweradmin = true;\n\t\t\tvar baseUrl = '" . JURI::root() . "';\n\t\t\tvar lang = '" . $JSNMedia->getLang() . "';\n\t\t\tvar currItemid = '" . $this->jsnpwrender->getCurrentItemid() . "';\n\n\t\t\t(function(\$){\n\t\t\t\t\$(document).ready(function(){\n\t\t\t\t\tif (" . $showTemplatePosition . "){\n\t\t\t\t\t\t\$('.poweradmin-module-item').each(function(){\n\t\t\t\t\t\t\tvar el = \$(this);\n\t\t\t\t\t\t\tif ( el.attr('id').split('-')[0] == '0'){\n\t\t\t\t\t\t\t\tif (el.parent().find('.poweradmin-module-item').length == 1){\n\t\t\t\t\t\t\t\t\tel.parent().addClass('inactive-position');\n\t\t\t\t\t\t\t\t\tel.parent().html('<label class=\"jsn-position-name\">'+el.parent().attr('id').replace('-jsnposition', '')+'</label><a class=\"add-new-module\" title=\"Add new module to this position.\" href=\"javascript:;\"></a>');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tel.remove();\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tif (el.find('.mod-preview-wrapper').length > 0){\n\t\t\t\t\t\t\t\t\tvar moduleContent = \$('.mod-preview-wrapper', el).html();\n\t\t\t\t\t\t\t\t\tel.children().html( moduleContent );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tif (typeof window.parent !== undefined){\n\t\t\t\t\t\tif (typeof window.parent.jQuery._visualmode.changeToolbar == 'function' ){\n\t\t\t\t\t\t\twindow.parent.jQuery._visualmode.changeToolbar('" . $currentUrlInos->urlString . "');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (typeof window.parent.jQuery._visualmode.jsnRenderReady == 'function' ){\n\t\t\t\t\t\t\twindow.parent.jQuery._visualmode.jsnRenderReady();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\$.jsnmouse.init();\n\t\t\t\t\t//no show browser context menu\n\t \t\t\t\$('body')[0].oncontextmenu = function() {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t })(JoomlaShine.jQuery);"; $JSNMedia->addScriptDeclaration($customscripts); $this->assign('JSNMedia', $JSNMedia); }
function onLoadJSNShowcaseTheme($name, $themeID = 0) { if ($name != $this->_showcaseThemeName) { return false; } JPlugin::loadLanguage('plg_' . $this->_showcaseThemeType . '_' . $this->_showcaseThemeName); ob_start(); JHTML::stylesheet($this->_pathAssets . 'css/style.css'); JHTML::script($this->_pathAssets . 'js/jsn_is_admin_conflict.js'); JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery-easing/jquery.easing.1.3.js'); JHTML::script($this->_pathAssets . 'js/jquery/jquery.event.drag-2.2.js'); JHTML::script($this->_pathAssets . 'js/jquery/jquery.event.drop-2.2.js'); JHTML::script($this->_pathAssets . 'js/jquery/jquery.roundabout.js'); JHTML::script($this->_pathAssets . 'js/jquery/jquery.roundabout-shapes.js'); JHTML::script($this->_pathAssets . 'js/jsn_is_carouseltheme_setting.js'); include dirname(__FILE__) . DS . 'helper' . DS . 'helper.php'; include dirname(__FILE__) . DS . 'views' . DS . 'default.php'; return ob_get_clean(); }
public function display($tpl = null) { $JSNMedia = JSNFactory::getMedia(); JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.filter.js'); $state = $this->get('State'); $items = $this->get('Items'); $position = JRequest::getVar('position', ''); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->assignRef('state', $state); $this->assignRef('items', $items); $this->assignRef('position', $position); $customScript = "\n\t\t\tvar selectModuleType;\n (function(\$){\n\t\t\t\t\$(window).ready(function(){\n\t\t\t\t \t selectModuleType = \$.jsnFilter(\n\t\t\t\t \t {\n\t\t\t \t \t\t frameElement: \$('#jsn-module-type-container'),\n\t\t\t\t\t \t totalItems : " . count($items) . ",\n\t\t\t\t\t \t itemClass : '.jsn-item-type',\n\t\t\t\t\t \t totalColumn : 3,\n\t\t\t\t\t \t itemWidth : 220,\n\t\t\t\t\t \t itemHeight : 30,\n\t\t\t\t\t \t mPosLeft : 0,\n\t\t\t\t\t \t mPosTop : 0,\n\t\t\t\t\t \t marginOffset: {\n\t\t\t\t\t \t \t right : 15,\n\t\t\t\t\t \t \t bottom: 20\n\t\t\t\t\t \t },\n\t\t\t\t\t \t eventClick: function(){\n\t\t\t\t\t\t \t var extension_id = \$(this).attr('id');\n\t\t\t\t\t\t \t var position = \$('#position').val();\n\t\t\t\t\t\t \t window.parent.JoomlaShine.jQuery.addNewModule(extension_id, position);\n\t\t\t\t\t \t }\n\t\t\t\t \t \t}\n\t\t\t\t \t );\n\t\t\t\t });\n\t\t\t })(JoomlaShine.jQuery);\n\t\t"; $JSNMedia->addScriptDeclaration($customScript); return parent::display(); }
public function display($tpl = null) { $uri = JUri::root(true); $this->app = JFactory::getApplication(); $this->user = JFactory::getUser(); $this->document = JFactory::getDocument(); $this->language = JFactory::getLanguage(); $this->language->load('plg_system_jsnpoweradmin'); $this->keyword = $this->app->getUserStateFromRequest('search.keyword', 'keyword', ''); $this->coverage = $this->app->getUserStateFromRequest('search.coverage', 'coverages', ''); // Create coverages select box $this->coverages = JHTML::_('select.genericlist', $this->getCoverages(), 'coverages', null, 'value', 'text', $this->coverage); $this->state = $this->get('state'); $this->document->addStyleSheet('components/com_poweradmin/assets/css/styles.css'); JSNHtmlAsset::addScript($uri . '/media/jui/js/jquery.min.js'); $this->addToolbar(); $this->populateSearch(); parent::display($tpl); }
/** * 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(); '); } }
protected function getInput() { $_app = JFactory::getApplication('admin'); $_input = $_app->input; $pathOnly = JURI::root(true); $pathRoot = JURI::root(); $enabledCSS = ' jsn-disable'; $menuid = $_input->getInt('id', 0); $app = JFactory::getApplication(); $db = JFactory::getDBO(); $db = JFactory::getDBO(); $doc = JFactory::getDocument(); !class_exists('JSNBaseHelper') or JSNBaseHelper::loadAssets(); $doc->addStyleSheet($pathOnly . '/administrator/components/com_imageshow/assets/css/imageshow.css'); $doc->addStyleSheet($pathOnly . '/administrator/components/com_imageshow/assets/css/menu.galleries.collection.css'); JSNHtmlAsset::addScript($pathOnly . '/media/jui/js/jquery.min.js'); JSNHtmlAsset::addScript(JSN_URL_ASSETS . '/3rd-party/jquery-ui/js/jquery-ui-1.9.0.custom.min.js'); $doc->addScript($pathOnly . '/administrator/components/com_imageshow/assets/js/joomlashine/window.js'); JSNHtmlAsset::addScript($pathOnly . '/administrator/components/com_imageshow/assets/js/joomlashine/conflict.js'); $jsCode = "\n\t\t\tvar baseUrl = '" . JURI::root() . "';\n\t\t\tvar gIframeFunc = undefined;\n\t\t\t(function(\$){\n\t\t\t\t\$(document).ready(function () {\n\t\t\t\t\tvar wWidth = \$(window).width()*0.9;\n\t\t\t\t\tvar wHeight = \$(window).height()*0.8;\n\t\t\t\t\t\$('.jsn-is-showcase-modal').click(function(event){\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tvar link = baseUrl+'administrator/'+\$(this).attr('href')+'&tmpl=component';\n\t\t\t\t\t\tvar save_button_lable = '" . JText::_('JSN_IMAGESHOW_SAVE_AND_SELECT', true) . "';\n\t\t\t\t\t\tvar JSNISShowcaseWindow = new \$.JSNISUIWindow(link,{\n\t\t\t\t\t\t\t\twidth: wWidth,\n\t\t\t\t\t\t\t\theight: wHeight,\n\t\t\t\t\t\t\t\ttitle: '" . JText::_('JSN_IMAGESHOW_SHOWCASE_SETTINGS') . "',\n\t\t\t\t\t\t\t\tscrollContent: true,\n\t\t\t\t\t\t\t\tbuttons:\n\t\t\t\t\t\t\t\t[{\n\t\t\t\t\t\t\t\t\ttext:save_button_lable,\n\t\t\t\t\t\t\t\t\tclass: 'ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only',\n\t\t\t\t\t\t\t\t\tclick: function (){\n\t\t\t\t\t\t\t\t\t\tif(typeof gIframeFunc != 'undefined')\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tgIframeFunc();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tconsole.log('Iframe function not available')\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttext: '" . JText::_('JSN_IMAGESHOW_CANCEL', true) . "',\n\t\t\t\t\t\t\t\t\tclass: 'ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only',\n\t\t\t\t\t\t\t\t\tclick: function (){\n\t\t\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t})((typeof JoomlaShine != 'undefined' && typeof JoomlaShine.jQuery != 'undefined') ? JoomlaShine.jQuery : jQuery);\n\t\t "; $doc->addScriptDeclaration($jsCode); $query = $db->getQuery(true); $query->clear(); $query->select('a.showcase_title AS text, a.showcase_id AS id'); $query->from($db->quoteName('#__imageshow_showcase') . ' AS a'); $query->where('a.published = ' . $db->quote(1)); $query->order('a.ordering DESC'); $db->setQuery($query); $data = $db->loadObjectList(); $results[] = JHTML::_('select.option', '0', '- ' . JText::_('JSN_FIELD_SELECT_SHOWCASE') . ' -', 'id', 'text'); $results = array_merge($results, $data); $html = "<div id='jsn-showcase-container'>"; if (!$data) { $html .= '<span class="jsn-menu-alert-message">' . JText::_('JSN_DO_NOT_HAVE_ANY_SHOWCASE') . '</span>'; } else { $html .= JHTML::_('select.genericList', $results, $this->name, 'class="inputbox jsn-select-value' . $enabledCSS . '"', 'id', 'text', $this->value, $this->id); } $html .= "<a class=\"jsn-is-showcase-modal\" href=\"index.php?option=com_imageshow&controller=showcase&task=add\" rel='{\"action\": \"add\"}' title=\"" . JText::_('CREATE_NEW_SHOWCASE') . "\"><i class=\"jsn-icon16 jsn-icon-plus\" id=\"showcase-icon-add\"></i></a>"; $html .= "</div>"; return $html; }