本文整理汇总了PHP中FSS_Helper::styles_incl方法的典型用法代码示例。如果您正苦于以下问题:PHP FSS_Helper::styles_incl方法的具体用法?PHP FSS_Helper::styles_incl怎么用?PHP FSS_Helper::styles_incl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FSS_Helper
的用法示例。
在下文中一共展示了FSS_Helper::styles_incl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: StylesAndJS
static function StylesAndJS($params = array(), $css = array(), $js = array())
{
$document = JFactory::getDocument();
$force_jquery = false;
if (isset($params['force_jquery'])) {
$force_jquery = true;
unset($params['force_jquery']);
}
if (in_array('force_jquery', $params)) {
$force_jquery = true;
$key = array_search('force_jquery', $params);
unset($params[$key]);
}
if (!self::$styles_incl) {
// jquery with its various options
self::IncludeJQuery($force_jquery);
// bootstrap (css and javascript)
self::Bootstrap();
//$document->addStyleSheet(FSSRoute::_( "index.php?option=com_fss&view=css&layout=default&old=1" )); // Add old stylesheets to page
FSS_CSSParse::OutputCSS('components/com_fss/assets/css/fss.less');
if (!FSSJ3Helper::IsJ3()) {
FSS_CSSParse::OutputCSS('components/com_fss/assets/css/fss_j25.less');
}
if (FSS_Settings::get('hide_warnings')) {
$document->addScriptDeclaration('var fss_no_warn = true;');
}
$document->addScript(JURI::root(true) . '/components/com_fss/assets/js/main.js');
if (FSS_Settings::get('bootstrap_v3')) {
FSS_CSSParse::OutputCSS('components/com_fss/assets/css/bs3_fixes.less');
$document->addScript(JURI::root(true) . '/components/com_fss/assets/js/bs3_fixes.js');
}
self::$styles_incl = true;
}
foreach ($params as $param) {
if (array_key_exists($param, self::$styles_sub_incl)) {
continue;
}
switch ($param) {
case 'autoscroll':
$document->addScript(JURI::root(true) . '/components/com_fss/assets/js/jquery/jquery.autoscroll.js');
break;
case 'tooltip':
$document->addScript(JURI::root(true) . '/components/com_fss/assets/js/fss_tooltip.js');
break;
case 'glossary':
$document->addScript(JURI::root(true) . '/components/com_fss/assets/js/glossary.js');
break;
case 'translate':
$document->addScript(JURI::root(true) . '/administrator/components/com_fss/assets/js/translate.js');
$document->addScript(JURI::root(true) . '/administrator/components/com_fss/assets/js/popup.js');
$document->addStyleSheet(JURI::root(true) . '/administrator/components/com_fss/assets/css/popup.css');
break;
case 'csstest':
$document->addScript(JURI::root(true) . '/administrator/components/com_fss/assets/js/csstest.js');
break;
case 'admin_css':
$document->addStyleSheet(JURI::root(true) . '/administrator/components/com_fss/assets/css/main.css');
break;
case 'calendar':
$document->addStyleSheet(JURI::root(true) . '/components/com_fss/assets/css/calendar.css');
$document->addStyleSheet(JURI::root(true) . '/components/com_fss/assets/css/calendar_omega.css');
$document->addScript(JURI::root(true) . '/components/com_fss/assets/js/calendar.js');
break;
case 'base64':
$document->addScript(JURI::root(true) . '/components/com_fss/assets/js/base64.js');
break;
case 'ticket_list':
FSS_Translate_Helper::CalenderLocale();
$document->addScript(JURI::root(true) . '/components/com_fss/assets/js/ticket_list.js');
break;
case 'cookie':
$document->addScript(JURI::root(true) . '/components/com_fss/assets/js/jquery/jquery.cookie.js');
break;
}
self::$styles_sub_incl[$param] = 1;
}
foreach ($css as $c) {
if (array_key_exists($c, self::$styles_sub_incl)) {
continue;
}
$document->addStyleSheet(JURI::root(true) . "/" . $c);
self::$styles_sub_incl[$c] = 1;
}
foreach ($js as $j) {
if (array_key_exists($j, self::$styles_sub_incl)) {
continue;
}
$document->addScript(JURI::root(true) . "/" . $j);
self::$styles_sub_incl[$j] = 1;
}
/* Joomla 3.4 fix for admin pagination problem */
if (JFactory::getApplication()->isAdmin()) {
$version = new JVersion();
if ($version->RELEASE >= 3.4) {
$script = "\n\t\t\t\tjQuery(document).ready( function () {\n\t\t\t\t\tjQuery('.pagination-list').removeClass('pagination');\n\t\t\t\t\tjQuery('.pagination-toolbar').addClass('pagination');\n\t\t\t\t});";
$document->addScriptDeclaration($script);
}
}
}