N°7315 - Migrate deprecated usages of WebPage::add_linked_script()

This commit is contained in:
Molkobain
2024-03-05 22:15:02 +01:00
parent 7948793674
commit 33ba754277
26 changed files with 97 additions and 98 deletions

View File

@@ -17,7 +17,7 @@ class HubConnectorPage extends NiceWebPage
$sModuleImagesDir = utils::GetAbsoluteUrlModulesRoot().'itop-hub-connector/images';
$sUserPrefs = appUserPreferences::GetAsJSON();
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/utils.js');
$this->LinkScriptFromAppRoot('js/utils.js');
$this->add_script(<<<JS
var oUserPreferences = $sUserPrefs;
JS

View File

@@ -263,7 +263,7 @@ try {
}
$oPage = new SetupPage(''); // Title will be set later, depending on $sOperation
$oPage->add_linked_script(utils::GetAbsoluteUrlModulesRoot().'itop-hub-connector/js/hub.js');
$oPage->LinkScriptFromModule('itop-hub-connector/js/hub.js');
$oPage->add_linked_stylesheet('../css/font-combodo/font-combodo.css');
$oPage->add_style(<<<CSS

View File

@@ -305,7 +305,7 @@ try {
$sCloseUrl = utils::GetAbsoluteUrlModulesRoot().'/itop-hub-connector/images/black-close.svg';
$oPage = new HubConnectorPage(Dict::S('iTopHub:Connect'));
$oPage->add_linked_script(utils::GetAbsoluteUrlModulesRoot().'itop-hub-connector/js/hub.js');
$oPage->LinkScriptFromModule('itop-hub-connector/js/hub.js');
$oPage->add_linked_stylesheet('../css/font-combodo/font-combodo.css');
$oPage->add_linked_stylesheet(utils::GetAbsoluteUrlModulesRoot().'itop-hub-connector/css/hub.css');