From 9f71766d518b2729249fc7c6eb92017af7b8c3b6 Mon Sep 17 00:00:00 2001 From: Rohan Shinde Date: Thu, 7 Oct 2021 17:12:30 +0530 Subject: [PATCH 1/2] Task #175290 feat: JTDashboard compatibility with joomla 4 --- .../views/dashboard/tmpl/edit.php | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/com_tjdashboard/administrator/views/dashboard/tmpl/edit.php b/src/components/com_tjdashboard/administrator/views/dashboard/tmpl/edit.php index 520e7a5..3a18406 100644 --- a/src/components/com_tjdashboard/administrator/views/dashboard/tmpl/edit.php +++ b/src/components/com_tjdashboard/administrator/views/dashboard/tmpl/edit.php @@ -31,17 +31,17 @@ $layout = $isModal ? 'modal' : 'edit'; $tmpl = $isModal || $input->get('tmpl', '', 'cmd') === 'component' ? '&tmpl=component' : ''; -JFactory::getDocument()->addScriptDeclaration(' - Joomla.submitbutton = function(task) - { - if (task == "dashboard.cancel" || document.formvalidator.isValid(document.getElementById("dashboard-form"))) - { - jQuery("#permissions-sliders select").attr("disabled", "disabled"); - ' . $this->form->getField('description')->save() . ' - Joomla.submitform(task, document.getElementById("dashboard-form")); - } - }; -'); +// JFactory::getDocument()->addScriptDeclaration(' +// Joomla.submitbutton = function(task) +// { +// if (task == "dashboard.cancel" || document.formvalidator.isValid(document.getElementById("dashboard-form"))) +// { +// jQuery("#permissions-sliders select").attr("disabled", "disabled"); +// ' . $this->form->getField('description')->save() . ' +// Joomla.submitform(task, document.getElementById("dashboard-form")); +// } +// }; +// '); ?>
From 23a4fa1a7666947b575057a71716343d437ac436 Mon Sep 17 00:00:00 2001 From: Rohan Shinde Date: Thu, 18 Nov 2021 13:01:56 +0530 Subject: [PATCH 2/2] Task #175290 feat: JTDashboard compatibility with joomla 4 --- .../com_tjdashboard/administrator/views/dashboard/view.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/com_tjdashboard/administrator/views/dashboard/view.html.php b/src/components/com_tjdashboard/administrator/views/dashboard/view.html.php index 3831af7..d9b5449 100644 --- a/src/components/com_tjdashboard/administrator/views/dashboard/view.html.php +++ b/src/components/com_tjdashboard/administrator/views/dashboard/view.html.php @@ -147,7 +147,7 @@ protected function addToolbar() JLoader::import('administrator.components.com_tjdashboard.helpers.dashboard', JPATH_SITE); DashboardHelper::addSubmenu('dashboard'); - if ($app->isAdmin()) + if ($app->isClient('administrator')) { $this->sidebar = JHtmlSidebar::render(); }