Fixed gh-340, to insure that if no selection is made, the default notice of Joomla comes-up and no submistion is made

This commit is contained in:
2018-09-14 12:44:05 +02:00
parent e200e2179d
commit 38176365de
7 changed files with 102 additions and 91 deletions

View File

@@ -102,16 +102,22 @@ jQuery('<div id="loading"></div>')
// when the clone button is clicked
jQuery('#toolbar').on('click',"button.button-save-copy", function(e){
jQuery('#loading').show();
if (document.adminForm.boxchecked.value != 0){
jQuery('#loading').show();
}
});
// when the backup button is clicked
jQuery('#toolbar').on('click',"button.button-archive", function(e){
jQuery('#loading').show();
if (document.adminForm.boxchecked.value != 0){
jQuery('#loading').show();
}
});
// when the export button is clicked
jQuery('#toolbar').on('click',"button.button-download", function(e){
jQuery('#loading').show();
if (document.adminForm.boxchecked.value != 0){
jQuery('#loading').show();
}
});
</script>

View File

@@ -120,17 +120,12 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
if ($this->user->authorise('joomla_component.export_jcb_packages', 'com_componentbuilder'))
{
// add Export JCB Packages button.
JToolBarHelper::custom('joomla_components.smartExport', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_JCB_PACKAGES', false);
}
if ($this->user->authorise('joomla_component.backup', 'com_componentbuilder'))
{
// add Backup button.
JToolBarHelper::custom('joomla_components.backup', 'archive', '', 'COM_COMPONENTBUILDER_BACKUP', false);
JToolBarHelper::custom('joomla_components.smartExport', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_JCB_PACKAGES', 'true');
}
if ($this->user->authorise('joomla_component.clone', 'com_componentbuilder'))
{
// add Clone button.
JToolBarHelper::custom('joomla_components.cloner', 'save-copy', '', 'COM_COMPONENTBUILDER_CLONE', false);
JToolBarHelper::custom('joomla_components.cloner', 'save-copy', '', 'COM_COMPONENTBUILDER_CLONE', 'true');
}
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
@@ -152,6 +147,11 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
// add Import JCB Packages button.
JToolBarHelper::custom('joomla_components.smartImport', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_JCB_PACKAGES', false);
}
if ($this->user->authorise('joomla_component.backup', 'com_componentbuilder'))
{
// add Backup button.
JToolBarHelper::custom('joomla_components.backup', 'archive', '', 'COM_COMPONENTBUILDER_BACKUP', false);
}
if ($this->canDo->get('core.import') && $this->canDo->get('joomla_component.import'))
{