Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task #175290 feat: JTDashboard compatibility with joomla 4 #80

Open
wants to merge 2 commits into
base: j4x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
// }
// };
// ');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any alternative to this code? If not then what happens to this functionality @shindebalu

?>
<div class="">
<form action="<?php echo Route::_('index.php?option=com_tjdashboard&view=dashboard&layout=edit&dashboard_id=' . (int) $this->item->dashboard_id, false);?>" method="post" enctype="multipart/form-data" name="adminForm" id="dashboard-form" class="form-validate">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down