Added the getCustomFieldCode, setFieldFilterSet, setFieldFilterListSet, setFilterFieldFile methods to the field compiler area. Refactored few other methods and added setDefaultSidebarFilterHelper, setCategorySidebarFilterHelper, setBatchDisplayHelper, setDefaultBatchHelper, setCategoryBatchHelper methods in the integration area of the compiler. Improved the header ser feature and added the setCategoryBatchHelper method. gh-378
This commit is contained in:
@ -12,12 +12,10 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// load tooltip behavior
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.multiselect');
|
||||
JHtml::_('dropdown.init');
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.multiselect');
|
||||
JHtml::_('dropdown.init');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
if ($this->saveOrder)
|
||||
{
|
||||
$saveOrderingUrl = 'index.php?option=com_componentbuilder&task=custom_admin_views.saveOrderAjax&tmpl=component';
|
||||
|
@ -157,41 +157,24 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('JOPTION_SELECT_PUBLISHED'),
|
||||
'filter_published',
|
||||
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true)
|
||||
);
|
||||
// only load if batch allowed
|
||||
if ($this->canBatch)
|
||||
{
|
||||
JHtmlBatch_::addListSelection(
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_STATE'),
|
||||
'batch[published]',
|
||||
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('JOPTION_SELECT_ACCESS'),
|
||||
'filter_access',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))
|
||||
);
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
JHtmlBatch_::addListSelection(
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
|
||||
// Only load publish filter if state change is allowed
|
||||
if ($this->canState)
|
||||
{
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('JOPTION_SELECT_PUBLISHED'),
|
||||
'filter_published',
|
||||
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true)
|
||||
);
|
||||
}
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('JOPTION_SELECT_ACCESS'),
|
||||
'filter_access',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))
|
||||
);
|
||||
|
||||
// Set Main Get Name Selection
|
||||
$this->main_getNameOptions = JFormHelper::loadFieldType('Maingets')->options;
|
||||
// We do some sanitation for Main Get Name filter
|
||||
@ -210,16 +193,6 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy
|
||||
'filter_main_get',
|
||||
JHtml::_('select.options', $this->main_getNameOptions, 'value', 'text', $this->state->get('filter.main_get'))
|
||||
);
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// Main Get Name Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_LABEL').' -',
|
||||
'batch[main_get]',
|
||||
JHtml::_('select.options', $this->main_getNameOptions, 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Set Add Php Ajax Selection
|
||||
@ -240,16 +213,6 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy
|
||||
'filter_add_php_ajax',
|
||||
JHtml::_('select.options', $this->add_php_ajaxOptions, 'value', 'text', $this->state->get('filter.add_php_ajax'))
|
||||
);
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// Add Php Ajax Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_AJAX_LABEL').' -',
|
||||
'batch[add_php_ajax]',
|
||||
JHtml::_('select.options', $this->add_php_ajaxOptions, 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Set Add Custom Button Selection
|
||||
@ -270,16 +233,59 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy
|
||||
'filter_add_custom_button',
|
||||
JHtml::_('select.options', $this->add_custom_buttonOptions, 'value', 'text', $this->state->get('filter.add_custom_button'))
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// Add Custom Button Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_CUSTOM_BUTTON_LABEL').' -',
|
||||
'batch[add_custom_button]',
|
||||
JHtml::_('select.options', $this->add_custom_buttonOptions, 'value', 'text')
|
||||
);
|
||||
}
|
||||
// Only load published batch if state and batch is allowed
|
||||
if ($this->canState && $this->canBatch)
|
||||
{
|
||||
JHtmlBatch_::addListSelection(
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_STATE'),
|
||||
'batch[published]',
|
||||
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true)
|
||||
);
|
||||
}
|
||||
|
||||
// Only load access batch if create, edit and batch is allowed
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
JHtmlBatch_::addListSelection(
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
|
||||
// Only load Main Get Name batch if create, edit, and batch is allowed
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// Main Get Name Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_LABEL').' -',
|
||||
'batch[main_get]',
|
||||
JHtml::_('select.options', $this->main_getNameOptions, 'value', 'text')
|
||||
);
|
||||
}
|
||||
|
||||
// Only load Add Php Ajax batch if create, edit, and batch is allowed
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// Add Php Ajax Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_AJAX_LABEL').' -',
|
||||
'batch[add_php_ajax]',
|
||||
JHtml::_('select.options', $this->add_php_ajaxOptions, 'value', 'text')
|
||||
);
|
||||
}
|
||||
|
||||
// Only load Add Custom Button batch if create, edit, and batch is allowed
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// Add Custom Button Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_CUSTOM_BUTTON_LABEL').' -',
|
||||
'batch[add_custom_button]',
|
||||
JHtml::_('select.options', $this->add_custom_buttonOptions, 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user