diff --git a/administrator/components/com_actionlogs/tmpl/actionlogs/default.php b/administrator/components/com_actionlogs/tmpl/actionlogs/default.php index 9679d1023061a..5173028b1aca8 100644 --- a/administrator/components/com_actionlogs/tmpl/actionlogs/default.php +++ b/administrator/components/com_actionlogs/tmpl/actionlogs/default.php @@ -9,7 +9,6 @@ defined('_JEXEC') or die; -use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Layout\LayoutHelper; @@ -22,13 +21,13 @@ $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); -Factory::getDocument()->addScriptDeclaration(' +$this->document->addScriptDeclaration(' Joomla.submitbutton = function(task) { if (task == "actionlogs.exportLogs") { Joomla.submitform(task, document.getElementById("exportForm")); - + return; } diff --git a/administrator/components/com_associations/View/Association/HtmlView.php b/administrator/components/com_associations/View/Association/HtmlView.php index a2eb8f6c5878a..b1aae58ee9156 100644 --- a/administrator/components/com_associations/View/Association/HtmlView.php +++ b/administrator/components/com_associations/View/Association/HtmlView.php @@ -174,8 +174,7 @@ public function display($tpl = null) * Let's put the target src into a variable to use in the javascript code * to avoid race conditions when the reference iframe loads. */ - $document = Factory::getDocument(); - $document->addScriptOptions('targetSrc', Route::_($this->editUri . '&task=' . $task . '&id=' . (int) $this->targetId)); + $this->document->addScriptOptions('targetSrc', Route::_($this->editUri . '&task=' . $task . '&id=' . (int) $this->targetId)); $this->form->setValue('itemlanguage', '', $this->targetLanguage . ':' . $this->targetId . ':' . $this->targetAction); } diff --git a/administrator/components/com_associations/tmpl/associations/modal.php b/administrator/components/com_associations/tmpl/associations/modal.php index ed7c320393274..f85f881a12bd5 100644 --- a/administrator/components/com_associations/tmpl/associations/modal.php +++ b/administrator/components/com_associations/tmpl/associations/modal.php @@ -38,7 +38,7 @@ 2 => 'icon-archive', ); -Factory::getDocument()->addScriptOptions('assosiations-modal', ['func' => $function]); +$this->document->addScriptOptions('assosiations-modal', ['func' => $function]); HTMLHelper::_('script', 'com_associations/admin-associations-modal.min.js', ['version' => 'auto', 'relative' => true]); ?>