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

@@ -77,13 +77,12 @@ class UnauthenticatedWebPage extends NiceWebPage
$this->SetContentType('text/html');
// - bootstrap
$this->add_linked_script(UAWP_PORTAL_PUBLIC_FOLDER_ABSOLUTE_URL . 'lib/bootstrap/js/bootstrap.min.js');
$this->LinkScriptFromURI(UAWP_PORTAL_PUBLIC_FOLDER_ABSOLUTE_URL . 'lib/bootstrap/js/bootstrap.min.js');
// Note: Since 2.6.0 moment was moved from portal to iTop core
$sMomentURL = utils::GetAbsoluteUrlAppRoot().'/js/moment-with-locales.min.js';
$this->add_linked_script($sMomentURL);
$this->LinkScriptFromAppRoot('js/moment-with-locales.min.js');
$this->add_linked_script(UAWP_PORTAL_PUBLIC_FOLDER_ABSOLUTE_URL . 'lib/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js');
$this->LinkScriptFromURI(UAWP_PORTAL_PUBLIC_FOLDER_ABSOLUTE_URL . 'lib/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js');
// CSS files
$this->add_linked_stylesheet(UAWP_PORTAL_PUBLIC_FOLDER_ABSOLUTE_URL . 'lib/bootstrap/css/bootstrap.min.css');