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:
@ -122,9 +122,9 @@ class ###Component###View###View### extends JViewLegacy
|
||||
$this->document = JFactory::getDocument();
|
||||
}
|
||||
$this->document->setTitle(JText::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_###component###/assets/css/###view###.css");###AJAXTOKE### ###LINKEDVIEWTABLESCRIPTS###
|
||||
$this->document->addScript(JURI::root() . $this->script);
|
||||
$this->document->addScript(JURI::root() . "administrator/components/com_###component###/views/###view###/submitbutton.js"); ###DOCUMENT_CUSTOM_PHP###
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_###component###/assets/css/###view###.css", array('version' => 'auto'));###AJAXTOKE### ###LINKEDVIEWTABLESCRIPTS###
|
||||
$this->document->addScript(JURI::root() . $this->script, array('version' => 'auto'));
|
||||
$this->document->addScript(JURI::root() . "administrator/components/com_###component###/views/###view###/submitbutton.js", array('version' => 'auto')); ###DOCUMENT_CUSTOM_PHP###
|
||||
JText::script('view not acceptable. Error');
|
||||
}
|
||||
}
|
||||
|
@ -127,13 +127,13 @@ class ###Component###View###View### extends JViewLegacy
|
||||
}
|
||||
$this->document->setTitle(JText::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
|
||||
// we need this to fix the form display
|
||||
$this->document->addStyleSheet(JURI::root()."administrator/templates/isis/css/template.css");
|
||||
$this->document->addScript(JURI::root()."administrator/templates/isis/js/template.js");
|
||||
$this->document->addStyleSheet(JURI::root()."administrator/templates/isis/css/template.css", array('version' => 'auto'));
|
||||
$this->document->addScript(JURI::root()."administrator/templates/isis/js/template.js", array('version' => 'auto'));
|
||||
// the default style of this view
|
||||
$this->document->addStyleSheet(JURI::root()."components/com_###component###/assets/css/###view###.css");###AJAXTOKE### ###LINKEDVIEWTABLESCRIPTS###
|
||||
$this->document->addStyleSheet(JURI::root()."components/com_###component###/assets/css/###view###.css", array('version' => 'auto'));###AJAXTOKE### ###LINKEDVIEWTABLESCRIPTS###
|
||||
// default javascript of this view
|
||||
$this->document->addScript(JURI::root().$this->script);
|
||||
$this->document->addScript(JURI::root(). "components/com_###component###/views/###view###/submitbutton.js"); ###DOCUMENT_CUSTOM_PHP###
|
||||
$this->document->addScript(JURI::root().$this->script, array('version' => 'auto'));
|
||||
$this->document->addScript(JURI::root(). "components/com_###component###/views/###view###/submitbutton.js", array('version' => 'auto')); ###DOCUMENT_CUSTOM_PHP###
|
||||
JText::script('view not acceptable. Error');
|
||||
}
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ class ###Component###View###Views### extends JViewLegacy
|
||||
$this->document = JFactory::getDocument();
|
||||
}
|
||||
$this->document->setTitle(JText::_('COM_###COMPONENT###_###VIEWS###'));
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_###component###/assets/css/###views###.css");
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_###component###/assets/css/###views###.css", array('version' => 'auto'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -56,7 +56,7 @@ class ###Component###View###SViews### extends JViewLegacy
|
||||
protected function setDocument()
|
||||
{###CUSTOM_ADMIN_LIBRARIES_LOADER### ###CUSTOM_ADMIN_UIKIT_LOADER### ###CUSTOM_ADMIN_GOOGLECHART_LOADER### ###CUSTOM_ADMIN_FOOTABLE_LOADER### ###CUSTOM_ADMIN_DOCUMENT_CUSTOM_PHP###
|
||||
// add the document default css file
|
||||
$this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_###component###/assets/css/###sviews###.css');###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS### ###CUSTOM_ADMIN_DOCUMENT_CUSTOM_JS###
|
||||
$this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_###component###/assets/css/###sviews###.css', array('version' => 'auto'));###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS### ###CUSTOM_ADMIN_DOCUMENT_CUSTOM_JS###
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -54,7 +54,7 @@ class ###Component###View###SViews### extends JViewLegacy
|
||||
protected function _prepareDocument()
|
||||
{###SITE_LIBRARIES_LOADER### ###SITE_UIKIT_LOADER### ###SITE_GOOGLECHART_LOADER### ###SITE_FOOTABLE_LOADER### ###SITE_DOCUMENT_METADATA### ###SITE_DOCUMENT_CUSTOM_PHP###
|
||||
// add the document default css file
|
||||
$this->document->addStyleSheet(JURI::root(true) .'/components/com_###component###/assets/css/###sview###.css');###SITE_DOCUMENT_CUSTOM_CSS### ###SITE_DOCUMENT_CUSTOM_JS###
|
||||
$this->document->addStyleSheet(JURI::root(true) .'/components/com_###component###/assets/css/###sview###.css', array('version' => 'auto'));###SITE_DOCUMENT_CUSTOM_CSS### ###SITE_DOCUMENT_CUSTOM_JS###
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -54,7 +54,7 @@ class ###Component###View###SView### extends JViewLegacy
|
||||
protected function _prepareDocument()
|
||||
{###SITE_LIBRARIES_LOADER### ###SITE_UIKIT_LOADER### ###SITE_GOOGLECHART_LOADER### ###SITE_FOOTABLE_LOADER### ###SITE_DOCUMENT_METADATA### ###SITE_DOCUMENT_CUSTOM_PHP###
|
||||
// add the document default css file
|
||||
$this->document->addStyleSheet(JURI::root(true) .'/components/com_###component###/assets/css/###sview###.css');###SITE_DOCUMENT_CUSTOM_CSS### ###SITE_DOCUMENT_CUSTOM_JS###
|
||||
$this->document->addStyleSheet(JURI::root(true) .'/components/com_###component###/assets/css/###sview###.css', array('version' => 'auto'));###SITE_DOCUMENT_CUSTOM_CSS### ###SITE_DOCUMENT_CUSTOM_JS###
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user