• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP JSNHtmlAsset类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中JSNHtmlAsset的典型用法代码示例。如果您正苦于以下问题:PHP JSNHtmlAsset类的具体用法?PHP JSNHtmlAsset怎么用?PHP JSNHtmlAsset使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了JSNHtmlAsset类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: display

 /**
  * 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);
 }
开发者ID:densem-2013,项目名称:exikom,代码行数:33,代码来源:view.html.php


示例2: display

 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();
 }
开发者ID:kleinhelmi,项目名称:tus03_j3_2015_01,代码行数:25,代码来源:view.html.php


示例3: loadAssets

 /**
  * 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');
     }
 }
开发者ID:jdrzaic,项目名称:joomla-dummy,代码行数:38,代码来源:helper.php


示例4: addMedia

 /**
  *
  * 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);
 }
开发者ID:kleinhelmi,项目名称:tus03_j3_2015_01,代码行数:38,代码来源:view.html.php


示例5: display

 /**
  * 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);
 }
开发者ID:densem-2013,项目名称:exikom,代码行数:14,代码来源:view.html.php


示例6: 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);
 }
开发者ID:NallelyFlores89,项目名称:basvec,代码行数:33,代码来源:view.html.php


示例7: html

    /**
     * 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;
    }
开发者ID:networksoft,项目名称:declarafacil.com.co,代码行数:64,代码来源:builder.php


示例8: addAssets

 /**
  * 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);
 }
开发者ID:sillysachin,项目名称:teamtogether,代码行数:15,代码来源:view.html.php


示例9: backend_element_assets

 /**
  * 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');
 }
开发者ID:densem-2013,项目名称:exikom,代码行数:13,代码来源:item.php


示例10: display

 /**
  * 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);
 }
开发者ID:NallelyFlores89,项目名称:basvec,代码行数:15,代码来源:view.html.php


示例11: getInput

 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;
 }
开发者ID:jdrzaic,项目名称:joomla-dummy,代码行数:58,代码来源:jsnshowcase.php


示例12: getInput

 /**
  * 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;
 }
开发者ID:NallelyFlores89,项目名称:basvec,代码行数:16,代码来源:jsnfield.php


示例13: addAssets

 /**
  * 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');
 }
开发者ID:densem-2013,项目名称:exikom,代码行数:17,代码来源:view.html.php


示例14: display

 /**
  * 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);
 }
开发者ID:jdrzaic,项目名称:joomla-dummy,代码行数:17,代码来源:view.php


示例15: render

 /**
  * 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;
 }
开发者ID:jdrzaic,项目名称:joomla-dummy,代码行数:63,代码来源:helper.php


示例16: display

 public function display($tpl = null)
 {
     // Set the toolbar
     JToolbarHelper::title(JText::_('JSN_SAMPLE_UPGRADE_PRODUCT'));
     JSNHtmlAsset::addStyle(JSNPB_FRAMEWORK_ASSETS . '/joomlashine/css/jsn-gui.css');
     // Add assets
     $this->_document = JFactory::getDocument();
     $this->addToolbar();
     // Display the template
     parent::display($tpl);
 }
开发者ID:densem-2013,项目名称:exikom,代码行数:11,代码来源:view.html.php


示例17: _addAssets

 /**
  * 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');
 }
开发者ID:NallelyFlores89,项目名称:basvec,代码行数:18,代码来源:view.html.php


示例18: _addAssets

 /**
  * 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'))));
 }
开发者ID:NallelyFlores89,项目名称:basvec,代码行数:19,代码来源:view.html.php


示例19: __construct

 /**
  * 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);
 }
开发者ID:jdrzaic,项目名称:joomla-dummy,代码行数:20,代码来源:view.php


示例20: fetchButton

 /**
  * 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;
 }
开发者ID:jdrzaic,项目名称:joomla-dummy,代码行数:28,代码来源:jsnhelpbutton.php



注:本文中的JSNHtmlAsset类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP JSNISFactory类代码示例发布时间:2022-05-23
下一篇:
PHP JSNConfigHelper类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap