mirror of
https://github.com/e107inc/e107.git
synced 2025-08-16 19:44:09 +02:00
Issue #3104 - Library CSS order fix.
This commit is contained in:
@@ -358,6 +358,21 @@ class e_jsmanager
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add CSS file(s) for inclusion in site header in the 'library' category.
|
||||
*
|
||||
* @param string|array $file_path path, shortcodes usage is prefered
|
||||
* @param string $media any valid media attribute string - http://www.w3schools.com/TAGS/att_link_media.asp
|
||||
* @return e_jsmanager
|
||||
*/
|
||||
public function libraryCSS($file_path, $media = 'all', $preComment = '', $postComment = '')
|
||||
{
|
||||
$this->addJs('library_css', $file_path, $media, $preComment, $postComment);
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Add CSS file(s) for inclusion in site header
|
||||
*
|
||||
@@ -962,6 +977,13 @@ class e_jsmanager
|
||||
$runtime = true;
|
||||
break;
|
||||
|
||||
case 'library_css':
|
||||
$file_path = $runtime_location.$this->_sep.$tp->createConstants($file_path, 'mix').$this->_sep.$pre.$this->_sep.$post;
|
||||
if(!isset($this->_e_css['library'])) $this->_e_css['library'] = array();
|
||||
$registry = &$this->_e_css['library'];
|
||||
$runtime = true;
|
||||
break;
|
||||
|
||||
case 'inline_css': // no zones, TODO - media?
|
||||
$this->_e_css_src[] = $file_path;
|
||||
return $this;
|
||||
@@ -1129,6 +1151,11 @@ class e_jsmanager
|
||||
unset($this->_e_css['other']);
|
||||
break;
|
||||
|
||||
case 'library_css':
|
||||
$this->renderFile(varset($this->_e_css['library'], array()), $external, 'Library CSS', $mod, false);
|
||||
unset($this->_e_css['library']);
|
||||
break;
|
||||
|
||||
case 'inline_css':
|
||||
$this->renderInline($this->_e_css_src, 'Inline CSS', 'css');
|
||||
$this->_e_css_src = array();
|
||||
|
Reference in New Issue
Block a user