Added auto versioning to all JavaScript and CSS fiels being added, to insure it reloads when there is an update. Resolves gh-203
This commit is contained in:
@ -197,28 +197,29 @@ class ComponentbuilderViewJoomla_component extends JViewLegacy
|
||||
$this->document = JFactory::getDocument();
|
||||
}
|
||||
$this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EDIT'));
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/joomla_component.css");
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/joomla_component.css", array('version' => 'auto'));
|
||||
// Add Ajax Token
|
||||
$this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';");
|
||||
|
||||
// Add the CSS for Footable
|
||||
$this->document->addStyleSheet('https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css');
|
||||
$this->document->addStyleSheet(JURI::root() .'media/com_componentbuilder/footable-v3/css/footable.standalone.min.css');
|
||||
$this->document->addStyleSheet(JURI::root() .'media/com_componentbuilder/footable-v3/css/footable.standalone.min.css', array('version' => 'auto'));
|
||||
// Add the JavaScript for Footable (adding all funtions)
|
||||
$this->document->addScript(JURI::root() .'media/com_componentbuilder/footable-v3/js/footable.min.js');
|
||||
$this->document->addScript(JURI::root() .'media/com_componentbuilder/footable-v3/js/footable.min.js', array('version' => 'auto'));
|
||||
|
||||
$footable = "jQuery(document).ready(function() { jQuery(function () { jQuery('.footable').footable();});});";
|
||||
$this->document->addScriptDeclaration($footable);
|
||||
|
||||
$this->document->addScript(JURI::root() . $this->script);
|
||||
$this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/joomla_component/submitbutton.js");
|
||||
// add JavaScripts
|
||||
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' );
|
||||
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', 'text/javascript', true);
|
||||
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', 'text/javascript', true);
|
||||
// add the style sheets
|
||||
$this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' );
|
||||
$this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' );
|
||||
$this->document->addScript(JURI::root() . $this->script, array('version' => 'auto'));
|
||||
$this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/joomla_component/submitbutton.js", array('version' => 'auto'));
|
||||
|
||||
// add Uikit v2 JavaScripts
|
||||
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , array('version' => 'auto'));
|
||||
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', array('version' => 'auto'), array('type' => 'text/javascript', 'async' => 'async'));
|
||||
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', array('version' => 'auto'), array('type' => 'text/javascript', 'async' => 'async'));
|
||||
// add the Uikit v2 style sheets
|
||||
$this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , array('version' => 'auto'));
|
||||
$this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , array('version' => 'auto'));
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '".$this->get('VDM')."';");
|
||||
JText::script('view not acceptable. Error');
|
||||
|
Reference in New Issue
Block a user