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:
2017-12-22 21:46:03 +02:00
parent 26050c771a
commit 98a5803faf
74 changed files with 213 additions and 207 deletions

View File

@@ -197,19 +197,19 @@ class ComponentbuilderViewFtp extends JViewLegacy
$this->document = JFactory::getDocument();
}
$this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_FTP_NEW' : 'COM_COMPONENTBUILDER_FTP_EDIT'));
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/ftp.css");
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/ftp.css", array('version' => 'auto'));
// 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/ftp/submitbutton.js");
$this->document->addScript(JURI::root() . $this->script, array('version' => 'auto'));
$this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/ftp/submitbutton.js", array('version' => 'auto'));
JText::script('view not acceptable. Error');
}
}