Major code formate to try and set a standared. Added four new fields for JavaScript files
This commit is contained in:
@ -53,15 +53,15 @@ class ComponentbuilderViewAdmin_fields extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewAdmin_fields extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewAdmin_fields extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewAdmin_fields_conditions extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewAdmin_fields_conditions extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewAdmin_fields_conditions extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewAdmin_view extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewAdmin_view extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewAdmin_view extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_view');
|
||||
$this->canEdit = $this->canDo->get('admin_view.edit');
|
||||
$this->canState = $this->canDo->get('admin_view.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,96 +93,96 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_ADMIN_VIEWS'), 'stack');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=admin_views');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('admin_view.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('admin_view.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('admin_view.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('admin_views.publish');
|
||||
JToolBarHelper::unpublishList('admin_views.unpublish');
|
||||
JToolBarHelper::archiveList('admin_views.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('admin_views.publish');
|
||||
JToolBarHelper::unpublishList('admin_views.unpublish');
|
||||
JToolBarHelper::archiveList('admin_views.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('admin_views.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('admin_views.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'admin_views.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('admin_views.trash');
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'admin_views.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('admin_views.trash');
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.export') && $this->canDo->get('admin_view.export'))
|
||||
{
|
||||
JToolBarHelper::custom('admin_views.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('admin_view.import'))
|
||||
{
|
||||
JToolBarHelper::custom('admin_views.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false);
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('admin_views');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('admin_views');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -195,11 +194,11 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -217,7 +216,7 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admin_views.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -228,10 +227,10 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -251,5 +250,5 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy
|
||||
'a.short_description' => JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewAdmins_fields extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_fields');
|
||||
$this->canEdit = $this->canDo->get('admin_fields.edit');
|
||||
$this->canState = $this->canDo->get('admin_fields.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewAdmins_fields extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,86 +93,86 @@ class ComponentbuilderViewAdmins_fields extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_ADMINS_FIELDS'), 'joomla');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=admins_fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('admin_fields.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('admin_fields.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('admin_fields.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('admins_fields.publish');
|
||||
JToolBarHelper::unpublishList('admins_fields.unpublish');
|
||||
JToolBarHelper::archiveList('admins_fields.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('admins_fields.publish');
|
||||
JToolBarHelper::unpublishList('admins_fields.unpublish');
|
||||
JToolBarHelper::archiveList('admins_fields.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('admins_fields.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('admins_fields.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'admins_fields.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('admins_fields.trash');
|
||||
}
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'admins_fields.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('admins_fields.trash');
|
||||
}
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('admins_fields');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('admins_fields');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -185,11 +184,11 @@ class ComponentbuilderViewAdmins_fields extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -207,7 +206,7 @@ class ComponentbuilderViewAdmins_fields extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admins_fields.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -218,10 +217,10 @@ class ComponentbuilderViewAdmins_fields extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -237,5 +236,5 @@ class ComponentbuilderViewAdmins_fields extends JViewLegacy
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewAdmins_fields_conditions extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('admin_fields_conditions');
|
||||
$this->canEdit = $this->canDo->get('admin_fields_conditions.edit');
|
||||
$this->canState = $this->canDo->get('admin_fields_conditions.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewAdmins_fields_conditions extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,86 +93,86 @@ class ComponentbuilderViewAdmins_fields_conditions extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS'), 'joomla');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=admins_fields_conditions');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('admin_fields_conditions.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('admin_fields_conditions.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('admin_fields_conditions.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('admins_fields_conditions.publish');
|
||||
JToolBarHelper::unpublishList('admins_fields_conditions.unpublish');
|
||||
JToolBarHelper::archiveList('admins_fields_conditions.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('admins_fields_conditions.publish');
|
||||
JToolBarHelper::unpublishList('admins_fields_conditions.unpublish');
|
||||
JToolBarHelper::archiveList('admins_fields_conditions.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('admins_fields_conditions.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('admins_fields_conditions.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'admins_fields_conditions.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('admins_fields_conditions.trash');
|
||||
}
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'admins_fields_conditions.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('admins_fields_conditions.trash');
|
||||
}
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('admins_fields_conditions');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('admins_fields_conditions');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -185,11 +184,11 @@ class ComponentbuilderViewAdmins_fields_conditions extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -207,7 +206,7 @@ class ComponentbuilderViewAdmins_fields_conditions extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admins_fields_conditions.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -218,10 +217,10 @@ class ComponentbuilderViewAdmins_fields_conditions extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -237,5 +236,5 @@ class ComponentbuilderViewAdmins_fields_conditions extends JViewLegacy
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -37,13 +37,13 @@ class ComponentbuilderViewCompiler extends JViewLegacy
|
||||
// Overwriting JView display method
|
||||
function display($tpl = null)
|
||||
{
|
||||
// get component params
|
||||
// get component params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// get the application
|
||||
$this->app = JFactory::getApplication();
|
||||
// get the user object
|
||||
$this->user = JFactory::getUser();
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('compiler');
|
||||
// Initialise variables.
|
||||
$this->items = $this->get('Items');
|
||||
@ -139,7 +139,7 @@ class ComponentbuilderViewCompiler extends JViewLegacy
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Prepares the document
|
||||
*/
|
||||
protected function setDocument()
|
||||
@ -198,7 +198,7 @@ class ComponentbuilderViewCompiler extends JViewLegacy
|
||||
}
|
||||
// add marked library
|
||||
$this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/custom/marked.js");
|
||||
// add the document default css file
|
||||
// add the document default css file
|
||||
$this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_componentbuilder/assets/css/compiler.css');
|
||||
// Set the Custom CSS script to view
|
||||
$this->document->addStyleDeclaration("
|
||||
@ -267,7 +267,7 @@ class ComponentbuilderViewCompiler extends JViewLegacy
|
||||
});
|
||||
}
|
||||
");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Setting the toolbar
|
||||
@ -275,12 +275,12 @@ class ComponentbuilderViewCompiler extends JViewLegacy
|
||||
protected function addToolBar()
|
||||
{
|
||||
// hide the main menu
|
||||
$this->app->input->set('hidemainmenu', true);
|
||||
$this->app->input->set('hidemainmenu', true);
|
||||
// add title to the page
|
||||
JToolbarHelper::title(JText::_('COM_COMPONENTBUILDER_COMPILER'),'cogs');
|
||||
// add the back button
|
||||
// JToolBarHelper::custom('compiler.back', 'undo-2', '', 'COM_COMPONENTBUILDER_BACK', false);
|
||||
// add cpanel button
|
||||
// add the back button
|
||||
// JToolBarHelper::custom('compiler.back', 'undo-2', '', 'COM_COMPONENTBUILDER_BACK', false);
|
||||
// add cpanel button
|
||||
JToolBarHelper::custom('compiler.dashboard', 'grid-2', '', 'COM_COMPONENTBUILDER_DASH', false);
|
||||
if ($this->canDo->get('compiler.clear_tmp'))
|
||||
{
|
||||
@ -289,20 +289,20 @@ class ComponentbuilderViewCompiler extends JViewLegacy
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('compiler');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('compiler');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -311,7 +311,7 @@ class ComponentbuilderViewCompiler extends JViewLegacy
|
||||
*/
|
||||
public function escape($var)
|
||||
{
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
}
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewComponent_admin_views extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewComponent_admin_views extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewComponent_admin_views extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewComponent_config extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewComponent_config extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewComponent_config extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewComponent_custom_admin_menus extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewComponent_custom_admin_menus extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewComponent_custom_admin_menus extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewComponent_custom_admin_views extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewComponent_custom_admin_views extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewComponent_custom_admin_views extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewComponent_dashboard extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewComponent_dashboard extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewComponent_dashboard extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewComponent_files_folders extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewComponent_files_folders extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewComponent_files_folders extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewComponent_mysql_tweaks extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewComponent_mysql_tweaks extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewComponent_mysql_tweaks extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewComponent_site_views extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewComponent_site_views extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewComponent_site_views extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewComponent_updates extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewComponent_updates extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewComponent_updates extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewComponents_admin_views extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_admin_views');
|
||||
$this->canEdit = $this->canDo->get('component_admin_views.edit');
|
||||
$this->canState = $this->canDo->get('component_admin_views.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewComponents_admin_views extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,86 +93,86 @@ class ComponentbuilderViewComponents_admin_views extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS'), 'joomla');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=components_admin_views');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('component_admin_views.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('component_admin_views.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('component_admin_views.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('components_admin_views.publish');
|
||||
JToolBarHelper::unpublishList('components_admin_views.unpublish');
|
||||
JToolBarHelper::archiveList('components_admin_views.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('components_admin_views.publish');
|
||||
JToolBarHelper::unpublishList('components_admin_views.unpublish');
|
||||
JToolBarHelper::archiveList('components_admin_views.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('components_admin_views.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('components_admin_views.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'components_admin_views.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('components_admin_views.trash');
|
||||
}
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'components_admin_views.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('components_admin_views.trash');
|
||||
}
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_admin_views');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_admin_views');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -185,11 +184,11 @@ class ComponentbuilderViewComponents_admin_views extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -207,7 +206,7 @@ class ComponentbuilderViewComponents_admin_views extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_admin_views.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -218,10 +217,10 @@ class ComponentbuilderViewComponents_admin_views extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -237,5 +236,5 @@ class ComponentbuilderViewComponents_admin_views extends JViewLegacy
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewComponents_config extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_config');
|
||||
$this->canEdit = $this->canDo->get('component_config.edit');
|
||||
$this->canState = $this->canDo->get('component_config.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewComponents_config extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,86 +93,86 @@ class ComponentbuilderViewComponents_config extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_COMPONENTS_CONFIG'), 'joomla');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=components_config');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('component_config.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('component_config.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('component_config.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('components_config.publish');
|
||||
JToolBarHelper::unpublishList('components_config.unpublish');
|
||||
JToolBarHelper::archiveList('components_config.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('components_config.publish');
|
||||
JToolBarHelper::unpublishList('components_config.unpublish');
|
||||
JToolBarHelper::archiveList('components_config.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('components_config.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('components_config.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'components_config.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('components_config.trash');
|
||||
}
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'components_config.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('components_config.trash');
|
||||
}
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_config');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_config');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -185,11 +184,11 @@ class ComponentbuilderViewComponents_config extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -207,7 +206,7 @@ class ComponentbuilderViewComponents_config extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_config.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -218,10 +217,10 @@ class ComponentbuilderViewComponents_config extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -237,5 +236,5 @@ class ComponentbuilderViewComponents_config extends JViewLegacy
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewComponents_custom_admin_menus extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_custom_admin_menus');
|
||||
$this->canEdit = $this->canDo->get('component_custom_admin_menus.edit');
|
||||
$this->canState = $this->canDo->get('component_custom_admin_menus.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewComponents_custom_admin_menus extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,86 +93,86 @@ class ComponentbuilderViewComponents_custom_admin_menus extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_MENUS'), 'joomla');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=components_custom_admin_menus');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('component_custom_admin_menus.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('component_custom_admin_menus.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('component_custom_admin_menus.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('components_custom_admin_menus.publish');
|
||||
JToolBarHelper::unpublishList('components_custom_admin_menus.unpublish');
|
||||
JToolBarHelper::archiveList('components_custom_admin_menus.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('components_custom_admin_menus.publish');
|
||||
JToolBarHelper::unpublishList('components_custom_admin_menus.unpublish');
|
||||
JToolBarHelper::archiveList('components_custom_admin_menus.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('components_custom_admin_menus.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('components_custom_admin_menus.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'components_custom_admin_menus.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('components_custom_admin_menus.trash');
|
||||
}
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'components_custom_admin_menus.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('components_custom_admin_menus.trash');
|
||||
}
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_custom_admin_menus');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_custom_admin_menus');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -185,11 +184,11 @@ class ComponentbuilderViewComponents_custom_admin_menus extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -207,7 +206,7 @@ class ComponentbuilderViewComponents_custom_admin_menus extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_custom_admin_menus.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -218,10 +217,10 @@ class ComponentbuilderViewComponents_custom_admin_menus extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -237,5 +236,5 @@ class ComponentbuilderViewComponents_custom_admin_menus extends JViewLegacy
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewComponents_custom_admin_views extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_custom_admin_views');
|
||||
$this->canEdit = $this->canDo->get('component_custom_admin_views.edit');
|
||||
$this->canState = $this->canDo->get('component_custom_admin_views.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewComponents_custom_admin_views extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,86 +93,86 @@ class ComponentbuilderViewComponents_custom_admin_views extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_COMPONENTS_CUSTOM_ADMIN_VIEWS'), 'joomla');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=components_custom_admin_views');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('component_custom_admin_views.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('component_custom_admin_views.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('component_custom_admin_views.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('components_custom_admin_views.publish');
|
||||
JToolBarHelper::unpublishList('components_custom_admin_views.unpublish');
|
||||
JToolBarHelper::archiveList('components_custom_admin_views.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('components_custom_admin_views.publish');
|
||||
JToolBarHelper::unpublishList('components_custom_admin_views.unpublish');
|
||||
JToolBarHelper::archiveList('components_custom_admin_views.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('components_custom_admin_views.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('components_custom_admin_views.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'components_custom_admin_views.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('components_custom_admin_views.trash');
|
||||
}
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'components_custom_admin_views.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('components_custom_admin_views.trash');
|
||||
}
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_custom_admin_views');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_custom_admin_views');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -185,11 +184,11 @@ class ComponentbuilderViewComponents_custom_admin_views extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -207,7 +206,7 @@ class ComponentbuilderViewComponents_custom_admin_views extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_custom_admin_views.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -218,10 +217,10 @@ class ComponentbuilderViewComponents_custom_admin_views extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -237,5 +236,5 @@ class ComponentbuilderViewComponents_custom_admin_views extends JViewLegacy
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewComponents_dashboard extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_dashboard');
|
||||
$this->canEdit = $this->canDo->get('component_dashboard.edit');
|
||||
$this->canState = $this->canDo->get('component_dashboard.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewComponents_dashboard extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,86 +93,86 @@ class ComponentbuilderViewComponents_dashboard extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_COMPONENTS_DASHBOARD'), 'joomla');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=components_dashboard');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('component_dashboard.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('component_dashboard.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('component_dashboard.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('components_dashboard.publish');
|
||||
JToolBarHelper::unpublishList('components_dashboard.unpublish');
|
||||
JToolBarHelper::archiveList('components_dashboard.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('components_dashboard.publish');
|
||||
JToolBarHelper::unpublishList('components_dashboard.unpublish');
|
||||
JToolBarHelper::archiveList('components_dashboard.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('components_dashboard.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('components_dashboard.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'components_dashboard.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('components_dashboard.trash');
|
||||
}
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'components_dashboard.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('components_dashboard.trash');
|
||||
}
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_dashboard');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_dashboard');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -185,11 +184,11 @@ class ComponentbuilderViewComponents_dashboard extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -207,7 +206,7 @@ class ComponentbuilderViewComponents_dashboard extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_dashboard.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -218,10 +217,10 @@ class ComponentbuilderViewComponents_dashboard extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -237,5 +236,5 @@ class ComponentbuilderViewComponents_dashboard extends JViewLegacy
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewComponents_files_folders extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_files_folders');
|
||||
$this->canEdit = $this->canDo->get('component_files_folders.edit');
|
||||
$this->canState = $this->canDo->get('component_files_folders.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewComponents_files_folders extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,86 +93,86 @@ class ComponentbuilderViewComponents_files_folders extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_COMPONENTS_FILES_FOLDERS'), 'joomla');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=components_files_folders');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('component_files_folders.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('component_files_folders.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('component_files_folders.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('components_files_folders.publish');
|
||||
JToolBarHelper::unpublishList('components_files_folders.unpublish');
|
||||
JToolBarHelper::archiveList('components_files_folders.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('components_files_folders.publish');
|
||||
JToolBarHelper::unpublishList('components_files_folders.unpublish');
|
||||
JToolBarHelper::archiveList('components_files_folders.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('components_files_folders.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('components_files_folders.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'components_files_folders.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('components_files_folders.trash');
|
||||
}
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'components_files_folders.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('components_files_folders.trash');
|
||||
}
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_files_folders');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_files_folders');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -185,11 +184,11 @@ class ComponentbuilderViewComponents_files_folders extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -207,7 +206,7 @@ class ComponentbuilderViewComponents_files_folders extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_files_folders.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -218,10 +217,10 @@ class ComponentbuilderViewComponents_files_folders extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -237,5 +236,5 @@ class ComponentbuilderViewComponents_files_folders extends JViewLegacy
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewComponents_mysql_tweaks extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_mysql_tweaks');
|
||||
$this->canEdit = $this->canDo->get('component_mysql_tweaks.edit');
|
||||
$this->canState = $this->canDo->get('component_mysql_tweaks.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewComponents_mysql_tweaks extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,86 +93,86 @@ class ComponentbuilderViewComponents_mysql_tweaks extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_COMPONENTS_MYSQL_TWEAKS'), 'joomla');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=components_mysql_tweaks');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('component_mysql_tweaks.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('component_mysql_tweaks.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('component_mysql_tweaks.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('components_mysql_tweaks.publish');
|
||||
JToolBarHelper::unpublishList('components_mysql_tweaks.unpublish');
|
||||
JToolBarHelper::archiveList('components_mysql_tweaks.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('components_mysql_tweaks.publish');
|
||||
JToolBarHelper::unpublishList('components_mysql_tweaks.unpublish');
|
||||
JToolBarHelper::archiveList('components_mysql_tweaks.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('components_mysql_tweaks.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('components_mysql_tweaks.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'components_mysql_tweaks.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('components_mysql_tweaks.trash');
|
||||
}
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'components_mysql_tweaks.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('components_mysql_tweaks.trash');
|
||||
}
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_mysql_tweaks');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_mysql_tweaks');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -185,11 +184,11 @@ class ComponentbuilderViewComponents_mysql_tweaks extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -207,7 +206,7 @@ class ComponentbuilderViewComponents_mysql_tweaks extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_mysql_tweaks.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -218,10 +217,10 @@ class ComponentbuilderViewComponents_mysql_tweaks extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -237,5 +236,5 @@ class ComponentbuilderViewComponents_mysql_tweaks extends JViewLegacy
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewComponents_site_views extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_site_views');
|
||||
$this->canEdit = $this->canDo->get('component_site_views.edit');
|
||||
$this->canState = $this->canDo->get('component_site_views.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewComponents_site_views extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,86 +93,86 @@ class ComponentbuilderViewComponents_site_views extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_COMPONENTS_SITE_VIEWS'), 'joomla');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=components_site_views');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('component_site_views.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('component_site_views.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('component_site_views.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('components_site_views.publish');
|
||||
JToolBarHelper::unpublishList('components_site_views.unpublish');
|
||||
JToolBarHelper::archiveList('components_site_views.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('components_site_views.publish');
|
||||
JToolBarHelper::unpublishList('components_site_views.unpublish');
|
||||
JToolBarHelper::archiveList('components_site_views.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('components_site_views.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('components_site_views.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'components_site_views.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('components_site_views.trash');
|
||||
}
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'components_site_views.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('components_site_views.trash');
|
||||
}
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_site_views');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_site_views');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -185,11 +184,11 @@ class ComponentbuilderViewComponents_site_views extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -207,7 +206,7 @@ class ComponentbuilderViewComponents_site_views extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_site_views.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -218,10 +217,10 @@ class ComponentbuilderViewComponents_site_views extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -237,5 +236,5 @@ class ComponentbuilderViewComponents_site_views extends JViewLegacy
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewComponents_updates extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('component_updates');
|
||||
$this->canEdit = $this->canDo->get('component_updates.edit');
|
||||
$this->canState = $this->canDo->get('component_updates.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewComponents_updates extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,86 +93,86 @@ class ComponentbuilderViewComponents_updates extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_COMPONENTS_UPDATES'), 'joomla');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=components_updates');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('component_updates.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('component_updates.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('component_updates.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('components_updates.publish');
|
||||
JToolBarHelper::unpublishList('components_updates.unpublish');
|
||||
JToolBarHelper::archiveList('components_updates.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('components_updates.publish');
|
||||
JToolBarHelper::unpublishList('components_updates.unpublish');
|
||||
JToolBarHelper::archiveList('components_updates.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('components_updates.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('components_updates.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'components_updates.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('components_updates.trash');
|
||||
}
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'components_updates.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('components_updates.trash');
|
||||
}
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_updates');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('components_updates');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -185,11 +184,11 @@ class ComponentbuilderViewComponents_updates extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -207,7 +206,7 @@ class ComponentbuilderViewComponents_updates extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/components_updates.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -218,10 +217,10 @@ class ComponentbuilderViewComponents_updates extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -237,5 +236,5 @@ class ComponentbuilderViewComponents_updates extends JViewLegacy
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -93,12 +93,22 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'custom_admin_viewTab', 'custom_script', JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CUSTOM_SCRIPT', true)); ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'custom_admin_viewTab', 'javascript_css', JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_JAVASCRIPT_CSS', true)); ?>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
</div>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
<div class="span12">
|
||||
<?php echo JLayoutHelper::render('custom_admin_view.custom_script_fullwidth', $this); ?>
|
||||
<?php echo JLayoutHelper::render('custom_admin_view.javascript_css_fullwidth', $this); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'custom_admin_viewTab', 'php', JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_PHP', true)); ?>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
</div>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
<div class="span12">
|
||||
<?php echo JLayoutHelper::render('custom_admin_view.php_fullwidth', $this); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
@ -228,48 +238,63 @@ jQuery('#adminForm').on('change', '#jform_add_css_document',function (e)
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_js_document listeners for add_js_document_vvvvvyf function
|
||||
// #jform_add_javascript_file listeners for add_javascript_file_vvvvvyf function
|
||||
jQuery('#jform_add_javascript_file').on('keyup',function()
|
||||
{
|
||||
var add_javascript_file_vvvvvyf = jQuery("#jform_add_javascript_file input[type='radio']:checked").val();
|
||||
vvvvvyf(add_javascript_file_vvvvvyf);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_javascript_file',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_javascript_file_vvvvvyf = jQuery("#jform_add_javascript_file input[type='radio']:checked").val();
|
||||
vvvvvyf(add_javascript_file_vvvvvyf);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_js_document listeners for add_js_document_vvvvvyg function
|
||||
jQuery('#jform_add_js_document').on('keyup',function()
|
||||
{
|
||||
var add_js_document_vvvvvyf = jQuery("#jform_add_js_document input[type='radio']:checked").val();
|
||||
vvvvvyf(add_js_document_vvvvvyf);
|
||||
var add_js_document_vvvvvyg = jQuery("#jform_add_js_document input[type='radio']:checked").val();
|
||||
vvvvvyg(add_js_document_vvvvvyg);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_js_document',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_js_document_vvvvvyf = jQuery("#jform_add_js_document input[type='radio']:checked").val();
|
||||
vvvvvyf(add_js_document_vvvvvyf);
|
||||
var add_js_document_vvvvvyg = jQuery("#jform_add_js_document input[type='radio']:checked").val();
|
||||
vvvvvyg(add_js_document_vvvvvyg);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_custom_button listeners for add_custom_button_vvvvvyg function
|
||||
// #jform_add_custom_button listeners for add_custom_button_vvvvvyh function
|
||||
jQuery('#jform_add_custom_button').on('keyup',function()
|
||||
{
|
||||
var add_custom_button_vvvvvyg = jQuery("#jform_add_custom_button input[type='radio']:checked").val();
|
||||
vvvvvyg(add_custom_button_vvvvvyg);
|
||||
var add_custom_button_vvvvvyh = jQuery("#jform_add_custom_button input[type='radio']:checked").val();
|
||||
vvvvvyh(add_custom_button_vvvvvyh);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_custom_button',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_custom_button_vvvvvyg = jQuery("#jform_add_custom_button input[type='radio']:checked").val();
|
||||
vvvvvyg(add_custom_button_vvvvvyg);
|
||||
var add_custom_button_vvvvvyh = jQuery("#jform_add_custom_button input[type='radio']:checked").val();
|
||||
vvvvvyh(add_custom_button_vvvvvyh);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_css listeners for add_css_vvvvvyh function
|
||||
// #jform_add_css listeners for add_css_vvvvvyi function
|
||||
jQuery('#jform_add_css').on('keyup',function()
|
||||
{
|
||||
var add_css_vvvvvyh = jQuery("#jform_add_css input[type='radio']:checked").val();
|
||||
vvvvvyh(add_css_vvvvvyh);
|
||||
var add_css_vvvvvyi = jQuery("#jform_add_css input[type='radio']:checked").val();
|
||||
vvvvvyi(add_css_vvvvvyi);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_css',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_css_vvvvvyh = jQuery("#jform_add_css input[type='radio']:checked").val();
|
||||
vvvvvyh(add_css_vvvvvyh);
|
||||
var add_css_vvvvvyi = jQuery("#jform_add_css input[type='radio']:checked").val();
|
||||
vvvvvyi(add_css_vvvvvyi);
|
||||
|
||||
});
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewCustom_admin_view extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewCustom_admin_view extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewCustom_admin_view extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('custom_admin_view');
|
||||
$this->canEdit = $this->canDo->get('core.edit');
|
||||
$this->canState = $this->canDo->get('core.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,61 +93,61 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS'), 'screen');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=custom_admin_views');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('custom_admin_view.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('custom_admin_view.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('custom_admin_view.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('custom_admin_views.publish');
|
||||
JToolBarHelper::unpublishList('custom_admin_views.unpublish');
|
||||
JToolBarHelper::archiveList('custom_admin_views.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('custom_admin_views.publish');
|
||||
JToolBarHelper::unpublishList('custom_admin_views.unpublish');
|
||||
JToolBarHelper::archiveList('custom_admin_views.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('custom_admin_views.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('custom_admin_views.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'custom_admin_views.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('custom_admin_views.trash');
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'custom_admin_views.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('custom_admin_views.trash');
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.export') && $this->canDo->get('custom_admin_view.export'))
|
||||
{
|
||||
JToolBarHelper::custom('custom_admin_views.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($this->user->authorise('custom_admin_view.get_snippets', 'com_componentbuilder'))
|
||||
{
|
||||
// add Get Snippets button.
|
||||
@ -160,35 +159,35 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy
|
||||
JToolBarHelper::custom('custom_admin_views.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false);
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('custom_admin_views');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('custom_admin_views');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -200,11 +199,11 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -222,7 +221,7 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/custom_admin_views.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -233,10 +232,10 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -256,5 +255,5 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy
|
||||
'a.description' => JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DESCRIPTION_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -127,101 +127,101 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_target listeners for target_vvvvvzq function
|
||||
jQuery('#jform_target').on('keyup',function()
|
||||
{
|
||||
var target_vvvvvzq = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvvzq(target_vvvvvzq);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_target',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var target_vvvvvzq = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvvzq(target_vvvvvzq);
|
||||
|
||||
});
|
||||
|
||||
// #jform_target listeners for target_vvvvvzr function
|
||||
jQuery('#jform_target').on('keyup',function()
|
||||
{
|
||||
var target_vvvvvzr = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvvzr(target_vvvvvzr);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_target',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var target_vvvvvzr = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvvzr(target_vvvvvzr);
|
||||
|
||||
});
|
||||
|
||||
// #jform_target listeners for target_vvvvvzs function
|
||||
jQuery('#jform_target').on('keyup',function()
|
||||
{
|
||||
var target_vvvvvzs = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
var type_vvvvvzs = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvvzs(target_vvvvvzs,type_vvvvvzs);
|
||||
vvvvvzs(target_vvvvvzs);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_target',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var target_vvvvvzs = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
var type_vvvvvzs = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvvzs(target_vvvvvzs,type_vvvvvzs);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_vvvvvzs function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var target_vvvvvzs = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
var type_vvvvvzs = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvvzs(target_vvvvvzs,type_vvvvvzs);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var target_vvvvvzs = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
var type_vvvvvzs = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvvzs(target_vvvvvzs,type_vvvvvzs);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_vvvvvzt function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_vvvvvzt = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
var target_vvvvvzt = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvvzt(type_vvvvvzt,target_vvvvvzt);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_vvvvvzt = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
var target_vvvvvzt = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvvzt(type_vvvvvzt,target_vvvvvzt);
|
||||
vvvvvzs(target_vvvvvzs);
|
||||
|
||||
});
|
||||
|
||||
// #jform_target listeners for target_vvvvvzt function
|
||||
jQuery('#jform_target').on('keyup',function()
|
||||
{
|
||||
var type_vvvvvzt = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
var target_vvvvvzt = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvvzt(type_vvvvvzt,target_vvvvvzt);
|
||||
vvvvvzt(target_vvvvvzt);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_target',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_vvvvvzt = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
var target_vvvvvzt = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvvzt(type_vvvvvzt,target_vvvvvzt);
|
||||
vvvvvzt(target_vvvvvzt);
|
||||
|
||||
});
|
||||
|
||||
// #jform_target listeners for target_vvvvvzu function
|
||||
jQuery('#jform_target').on('keyup',function()
|
||||
{
|
||||
var target_vvvvvzu = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
var type_vvvvvzu = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvvzu(target_vvvvvzu,type_vvvvvzu);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_target',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var target_vvvvvzu = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
var type_vvvvvzu = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvvzu(target_vvvvvzu,type_vvvvvzu);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_vvvvvzu function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var target_vvvvvzu = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
var type_vvvvvzu = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvvzu(target_vvvvvzu,type_vvvvvzu);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var target_vvvvvzu = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
var type_vvvvvzu = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvvzu(target_vvvvvzu,type_vvvvvzu);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_vvvvvzv function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_vvvvvzv = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
var target_vvvvvzv = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvvzv(type_vvvvvzv,target_vvvvvzv);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_vvvvvzv = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
var target_vvvvvzv = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvvzv(type_vvvvvzv,target_vvvvvzv);
|
||||
|
||||
});
|
||||
|
||||
// #jform_target listeners for target_vvvvvzv function
|
||||
jQuery('#jform_target').on('keyup',function()
|
||||
{
|
||||
var type_vvvvvzv = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
var target_vvvvvzv = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvvzv(type_vvvvvzv,target_vvvvvzv);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_target',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_vvvvvzv = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
var target_vvvvvzv = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvvzv(type_vvvvvzv,target_vvvvvzv);
|
||||
|
||||
});
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewCustom_code extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewCustom_code extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewCustom_code extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('custom_code');
|
||||
$this->canEdit = $this->canDo->get('custom_code.edit');
|
||||
$this->canState = $this->canDo->get('custom_code.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,96 +93,96 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_CUSTOM_CODES'), 'shuffle');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=custom_codes');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('custom_code.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('custom_code.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('custom_code.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('custom_codes.publish');
|
||||
JToolBarHelper::unpublishList('custom_codes.unpublish');
|
||||
JToolBarHelper::archiveList('custom_codes.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('custom_codes.publish');
|
||||
JToolBarHelper::unpublishList('custom_codes.unpublish');
|
||||
JToolBarHelper::archiveList('custom_codes.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('custom_codes.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('custom_codes.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'custom_codes.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('custom_codes.trash');
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'custom_codes.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('custom_codes.trash');
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.export') && $this->canDo->get('custom_code.export'))
|
||||
{
|
||||
JToolBarHelper::custom('custom_codes.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('custom_code.import'))
|
||||
{
|
||||
JToolBarHelper::custom('custom_codes.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false);
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('custom_codes');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('custom_codes');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -195,11 +194,11 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Set Component System Name Selection
|
||||
$this->componentSystem_nameOptions = JFormHelper::loadFieldType('Component')->getOptions();
|
||||
@ -305,7 +304,7 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/custom_codes.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -316,10 +315,10 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -340,7 +339,7 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy
|
||||
'a.comment_type' => JText::_('COM_COMPONENTBUILDER_CUSTOM_CODE_COMMENT_TYPE_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
protected function getTheTargetSelections()
|
||||
{
|
||||
|
@ -167,48 +167,18 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_gettype listeners for gettype_vvvvvyu function
|
||||
// #jform_gettype listeners for gettype_vvvvvyw function
|
||||
jQuery('#jform_gettype').on('keyup',function()
|
||||
{
|
||||
var gettype_vvvvvyu = jQuery("#jform_gettype").val();
|
||||
vvvvvyu(gettype_vvvvvyu);
|
||||
var gettype_vvvvvyw = jQuery("#jform_gettype").val();
|
||||
vvvvvyw(gettype_vvvvvyw);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_gettype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var gettype_vvvvvyu = jQuery("#jform_gettype").val();
|
||||
vvvvvyu(gettype_vvvvvyu);
|
||||
|
||||
});
|
||||
|
||||
// #jform_main_source listeners for main_source_vvvvvyv function
|
||||
jQuery('#jform_main_source').on('keyup',function()
|
||||
{
|
||||
var main_source_vvvvvyv = jQuery("#jform_main_source").val();
|
||||
vvvvvyv(main_source_vvvvvyv);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_main_source',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var main_source_vvvvvyv = jQuery("#jform_main_source").val();
|
||||
vvvvvyv(main_source_vvvvvyv);
|
||||
|
||||
});
|
||||
|
||||
// #jform_main_source listeners for main_source_vvvvvyw function
|
||||
jQuery('#jform_main_source').on('keyup',function()
|
||||
{
|
||||
var main_source_vvvvvyw = jQuery("#jform_main_source").val();
|
||||
vvvvvyw(main_source_vvvvvyw);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_main_source',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var main_source_vvvvvyw = jQuery("#jform_main_source").val();
|
||||
vvvvvyw(main_source_vvvvvyw);
|
||||
var gettype_vvvvvyw = jQuery("#jform_gettype").val();
|
||||
vvvvvyw(gettype_vvvvvyw);
|
||||
|
||||
});
|
||||
|
||||
@ -242,52 +212,33 @@ jQuery('#adminForm').on('change', '#jform_main_source',function (e)
|
||||
|
||||
});
|
||||
|
||||
// #jform_addcalculation listeners for addcalculation_vvvvvyz function
|
||||
jQuery('#jform_addcalculation').on('keyup',function()
|
||||
// #jform_main_source listeners for main_source_vvvvvyz function
|
||||
jQuery('#jform_main_source').on('keyup',function()
|
||||
{
|
||||
var addcalculation_vvvvvyz = jQuery("#jform_addcalculation input[type='radio']:checked").val();
|
||||
vvvvvyz(addcalculation_vvvvvyz);
|
||||
var main_source_vvvvvyz = jQuery("#jform_main_source").val();
|
||||
vvvvvyz(main_source_vvvvvyz);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_addcalculation',function (e)
|
||||
jQuery('#adminForm').on('change', '#jform_main_source',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var addcalculation_vvvvvyz = jQuery("#jform_addcalculation input[type='radio']:checked").val();
|
||||
vvvvvyz(addcalculation_vvvvvyz);
|
||||
var main_source_vvvvvyz = jQuery("#jform_main_source").val();
|
||||
vvvvvyz(main_source_vvvvvyz);
|
||||
|
||||
});
|
||||
|
||||
// #jform_addcalculation listeners for addcalculation_vvvvvza function
|
||||
jQuery('#jform_addcalculation').on('keyup',function()
|
||||
// #jform_main_source listeners for main_source_vvvvvza function
|
||||
jQuery('#jform_main_source').on('keyup',function()
|
||||
{
|
||||
var addcalculation_vvvvvza = jQuery("#jform_addcalculation input[type='radio']:checked").val();
|
||||
var gettype_vvvvvza = jQuery("#jform_gettype").val();
|
||||
vvvvvza(addcalculation_vvvvvza,gettype_vvvvvza);
|
||||
var main_source_vvvvvza = jQuery("#jform_main_source").val();
|
||||
vvvvvza(main_source_vvvvvza);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_addcalculation',function (e)
|
||||
jQuery('#adminForm').on('change', '#jform_main_source',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var addcalculation_vvvvvza = jQuery("#jform_addcalculation input[type='radio']:checked").val();
|
||||
var gettype_vvvvvza = jQuery("#jform_gettype").val();
|
||||
vvvvvza(addcalculation_vvvvvza,gettype_vvvvvza);
|
||||
|
||||
});
|
||||
|
||||
// #jform_gettype listeners for gettype_vvvvvza function
|
||||
jQuery('#jform_gettype').on('keyup',function()
|
||||
{
|
||||
var addcalculation_vvvvvza = jQuery("#jform_addcalculation input[type='radio']:checked").val();
|
||||
var gettype_vvvvvza = jQuery("#jform_gettype").val();
|
||||
vvvvvza(addcalculation_vvvvvza,gettype_vvvvvza);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_gettype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var addcalculation_vvvvvza = jQuery("#jform_addcalculation input[type='radio']:checked").val();
|
||||
var gettype_vvvvvza = jQuery("#jform_gettype").val();
|
||||
vvvvvza(addcalculation_vvvvvza,gettype_vvvvvza);
|
||||
var main_source_vvvvvza = jQuery("#jform_main_source").val();
|
||||
vvvvvza(main_source_vvvvvza);
|
||||
|
||||
});
|
||||
|
||||
@ -295,278 +246,327 @@ jQuery('#adminForm').on('change', '#jform_gettype',function (e)
|
||||
jQuery('#jform_addcalculation').on('keyup',function()
|
||||
{
|
||||
var addcalculation_vvvvvzb = jQuery("#jform_addcalculation input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzb = jQuery("#jform_gettype").val();
|
||||
vvvvvzb(addcalculation_vvvvvzb,gettype_vvvvvzb);
|
||||
vvvvvzb(addcalculation_vvvvvzb);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_addcalculation',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var addcalculation_vvvvvzb = jQuery("#jform_addcalculation input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzb = jQuery("#jform_gettype").val();
|
||||
vvvvvzb(addcalculation_vvvvvzb,gettype_vvvvvzb);
|
||||
vvvvvzb(addcalculation_vvvvvzb);
|
||||
|
||||
});
|
||||
|
||||
// #jform_gettype listeners for gettype_vvvvvzb function
|
||||
// #jform_addcalculation listeners for addcalculation_vvvvvzc function
|
||||
jQuery('#jform_addcalculation').on('keyup',function()
|
||||
{
|
||||
var addcalculation_vvvvvzc = jQuery("#jform_addcalculation input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzc = jQuery("#jform_gettype").val();
|
||||
vvvvvzc(addcalculation_vvvvvzc,gettype_vvvvvzc);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_addcalculation',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var addcalculation_vvvvvzc = jQuery("#jform_addcalculation input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzc = jQuery("#jform_gettype").val();
|
||||
vvvvvzc(addcalculation_vvvvvzc,gettype_vvvvvzc);
|
||||
|
||||
});
|
||||
|
||||
// #jform_gettype listeners for gettype_vvvvvzc function
|
||||
jQuery('#jform_gettype').on('keyup',function()
|
||||
{
|
||||
var addcalculation_vvvvvzb = jQuery("#jform_addcalculation input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzb = jQuery("#jform_gettype").val();
|
||||
vvvvvzb(addcalculation_vvvvvzb,gettype_vvvvvzb);
|
||||
var addcalculation_vvvvvzc = jQuery("#jform_addcalculation input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzc = jQuery("#jform_gettype").val();
|
||||
vvvvvzc(addcalculation_vvvvvzc,gettype_vvvvvzc);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_gettype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var addcalculation_vvvvvzb = jQuery("#jform_addcalculation input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzb = jQuery("#jform_gettype").val();
|
||||
vvvvvzb(addcalculation_vvvvvzb,gettype_vvvvvzb);
|
||||
var addcalculation_vvvvvzc = jQuery("#jform_addcalculation input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzc = jQuery("#jform_gettype").val();
|
||||
vvvvvzc(addcalculation_vvvvvzc,gettype_vvvvvzc);
|
||||
|
||||
});
|
||||
|
||||
// #jform_main_source listeners for main_source_vvvvvze function
|
||||
// #jform_addcalculation listeners for addcalculation_vvvvvzd function
|
||||
jQuery('#jform_addcalculation').on('keyup',function()
|
||||
{
|
||||
var addcalculation_vvvvvzd = jQuery("#jform_addcalculation input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzd = jQuery("#jform_gettype").val();
|
||||
vvvvvzd(addcalculation_vvvvvzd,gettype_vvvvvzd);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_addcalculation',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var addcalculation_vvvvvzd = jQuery("#jform_addcalculation input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzd = jQuery("#jform_gettype").val();
|
||||
vvvvvzd(addcalculation_vvvvvzd,gettype_vvvvvzd);
|
||||
|
||||
});
|
||||
|
||||
// #jform_gettype listeners for gettype_vvvvvzd function
|
||||
jQuery('#jform_gettype').on('keyup',function()
|
||||
{
|
||||
var addcalculation_vvvvvzd = jQuery("#jform_addcalculation input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzd = jQuery("#jform_gettype").val();
|
||||
vvvvvzd(addcalculation_vvvvvzd,gettype_vvvvvzd);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_gettype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var addcalculation_vvvvvzd = jQuery("#jform_addcalculation input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzd = jQuery("#jform_gettype").val();
|
||||
vvvvvzd(addcalculation_vvvvvzd,gettype_vvvvvzd);
|
||||
|
||||
});
|
||||
|
||||
// #jform_main_source listeners for main_source_vvvvvzg function
|
||||
jQuery('#jform_main_source').on('keyup',function()
|
||||
{
|
||||
var main_source_vvvvvze = jQuery("#jform_main_source").val();
|
||||
vvvvvze(main_source_vvvvvze);
|
||||
var main_source_vvvvvzg = jQuery("#jform_main_source").val();
|
||||
vvvvvzg(main_source_vvvvvzg);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_main_source',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var main_source_vvvvvze = jQuery("#jform_main_source").val();
|
||||
vvvvvze(main_source_vvvvvze);
|
||||
var main_source_vvvvvzg = jQuery("#jform_main_source").val();
|
||||
vvvvvzg(main_source_vvvvvzg);
|
||||
|
||||
});
|
||||
|
||||
// #jform_main_source listeners for main_source_vvvvvzf function
|
||||
// #jform_main_source listeners for main_source_vvvvvzh function
|
||||
jQuery('#jform_main_source').on('keyup',function()
|
||||
{
|
||||
var main_source_vvvvvzf = jQuery("#jform_main_source").val();
|
||||
vvvvvzf(main_source_vvvvvzf);
|
||||
var main_source_vvvvvzh = jQuery("#jform_main_source").val();
|
||||
vvvvvzh(main_source_vvvvvzh);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_main_source',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var main_source_vvvvvzf = jQuery("#jform_main_source").val();
|
||||
vvvvvzf(main_source_vvvvvzf);
|
||||
var main_source_vvvvvzh = jQuery("#jform_main_source").val();
|
||||
vvvvvzh(main_source_vvvvvzh);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_php_before_getitem listeners for add_php_before_getitem_vvvvvzg function
|
||||
// #jform_add_php_before_getitem listeners for add_php_before_getitem_vvvvvzi function
|
||||
jQuery('#jform_add_php_before_getitem').on('keyup',function()
|
||||
{
|
||||
var add_php_before_getitem_vvvvvzg = jQuery("#jform_add_php_before_getitem input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzg = jQuery("#jform_gettype").val();
|
||||
vvvvvzg(add_php_before_getitem_vvvvvzg,gettype_vvvvvzg);
|
||||
var add_php_before_getitem_vvvvvzi = jQuery("#jform_add_php_before_getitem input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzi = jQuery("#jform_gettype").val();
|
||||
vvvvvzi(add_php_before_getitem_vvvvvzi,gettype_vvvvvzi);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_php_before_getitem',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_php_before_getitem_vvvvvzg = jQuery("#jform_add_php_before_getitem input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzg = jQuery("#jform_gettype").val();
|
||||
vvvvvzg(add_php_before_getitem_vvvvvzg,gettype_vvvvvzg);
|
||||
var add_php_before_getitem_vvvvvzi = jQuery("#jform_add_php_before_getitem input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzi = jQuery("#jform_gettype").val();
|
||||
vvvvvzi(add_php_before_getitem_vvvvvzi,gettype_vvvvvzi);
|
||||
|
||||
});
|
||||
|
||||
// #jform_gettype listeners for gettype_vvvvvzg function
|
||||
// #jform_gettype listeners for gettype_vvvvvzi function
|
||||
jQuery('#jform_gettype').on('keyup',function()
|
||||
{
|
||||
var add_php_before_getitem_vvvvvzg = jQuery("#jform_add_php_before_getitem input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzg = jQuery("#jform_gettype").val();
|
||||
vvvvvzg(add_php_before_getitem_vvvvvzg,gettype_vvvvvzg);
|
||||
var add_php_before_getitem_vvvvvzi = jQuery("#jform_add_php_before_getitem input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzi = jQuery("#jform_gettype").val();
|
||||
vvvvvzi(add_php_before_getitem_vvvvvzi,gettype_vvvvvzi);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_gettype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_php_before_getitem_vvvvvzg = jQuery("#jform_add_php_before_getitem input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzg = jQuery("#jform_gettype").val();
|
||||
vvvvvzg(add_php_before_getitem_vvvvvzg,gettype_vvvvvzg);
|
||||
var add_php_before_getitem_vvvvvzi = jQuery("#jform_add_php_before_getitem input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzi = jQuery("#jform_gettype").val();
|
||||
vvvvvzi(add_php_before_getitem_vvvvvzi,gettype_vvvvvzi);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_php_after_getitem listeners for add_php_after_getitem_vvvvvzh function
|
||||
// #jform_add_php_after_getitem listeners for add_php_after_getitem_vvvvvzj function
|
||||
jQuery('#jform_add_php_after_getitem').on('keyup',function()
|
||||
{
|
||||
var add_php_after_getitem_vvvvvzh = jQuery("#jform_add_php_after_getitem input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzh = jQuery("#jform_gettype").val();
|
||||
vvvvvzh(add_php_after_getitem_vvvvvzh,gettype_vvvvvzh);
|
||||
var add_php_after_getitem_vvvvvzj = jQuery("#jform_add_php_after_getitem input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzj = jQuery("#jform_gettype").val();
|
||||
vvvvvzj(add_php_after_getitem_vvvvvzj,gettype_vvvvvzj);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_php_after_getitem',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_php_after_getitem_vvvvvzh = jQuery("#jform_add_php_after_getitem input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzh = jQuery("#jform_gettype").val();
|
||||
vvvvvzh(add_php_after_getitem_vvvvvzh,gettype_vvvvvzh);
|
||||
|
||||
});
|
||||
|
||||
// #jform_gettype listeners for gettype_vvvvvzh function
|
||||
jQuery('#jform_gettype').on('keyup',function()
|
||||
{
|
||||
var add_php_after_getitem_vvvvvzh = jQuery("#jform_add_php_after_getitem input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzh = jQuery("#jform_gettype").val();
|
||||
vvvvvzh(add_php_after_getitem_vvvvvzh,gettype_vvvvvzh);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_gettype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_php_after_getitem_vvvvvzh = jQuery("#jform_add_php_after_getitem input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzh = jQuery("#jform_gettype").val();
|
||||
vvvvvzh(add_php_after_getitem_vvvvvzh,gettype_vvvvvzh);
|
||||
var add_php_after_getitem_vvvvvzj = jQuery("#jform_add_php_after_getitem input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzj = jQuery("#jform_gettype").val();
|
||||
vvvvvzj(add_php_after_getitem_vvvvvzj,gettype_vvvvvzj);
|
||||
|
||||
});
|
||||
|
||||
// #jform_gettype listeners for gettype_vvvvvzj function
|
||||
jQuery('#jform_gettype').on('keyup',function()
|
||||
{
|
||||
var add_php_after_getitem_vvvvvzj = jQuery("#jform_add_php_after_getitem input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzj = jQuery("#jform_gettype").val();
|
||||
vvvvvzj(gettype_vvvvvzj);
|
||||
vvvvvzj(add_php_after_getitem_vvvvvzj,gettype_vvvvvzj);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_gettype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_php_after_getitem_vvvvvzj = jQuery("#jform_add_php_after_getitem input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzj = jQuery("#jform_gettype").val();
|
||||
vvvvvzj(gettype_vvvvvzj);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_php_getlistquery listeners for add_php_getlistquery_vvvvvzk function
|
||||
jQuery('#jform_add_php_getlistquery').on('keyup',function()
|
||||
{
|
||||
var add_php_getlistquery_vvvvvzk = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzk = jQuery("#jform_gettype").val();
|
||||
vvvvvzk(add_php_getlistquery_vvvvvzk,gettype_vvvvvzk);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_php_getlistquery',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_php_getlistquery_vvvvvzk = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzk = jQuery("#jform_gettype").val();
|
||||
vvvvvzk(add_php_getlistquery_vvvvvzk,gettype_vvvvvzk);
|
||||
|
||||
});
|
||||
|
||||
// #jform_gettype listeners for gettype_vvvvvzk function
|
||||
jQuery('#jform_gettype').on('keyup',function()
|
||||
{
|
||||
var add_php_getlistquery_vvvvvzk = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzk = jQuery("#jform_gettype").val();
|
||||
vvvvvzk(add_php_getlistquery_vvvvvzk,gettype_vvvvvzk);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_gettype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_php_getlistquery_vvvvvzk = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzk = jQuery("#jform_gettype").val();
|
||||
vvvvvzk(add_php_getlistquery_vvvvvzk,gettype_vvvvvzk);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_php_before_getitems listeners for add_php_before_getitems_vvvvvzl function
|
||||
jQuery('#jform_add_php_before_getitems').on('keyup',function()
|
||||
{
|
||||
var add_php_before_getitems_vvvvvzl = jQuery("#jform_add_php_before_getitems input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzl = jQuery("#jform_gettype").val();
|
||||
vvvvvzl(add_php_before_getitems_vvvvvzl,gettype_vvvvvzl);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_php_before_getitems',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_php_before_getitems_vvvvvzl = jQuery("#jform_add_php_before_getitems input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzl = jQuery("#jform_gettype").val();
|
||||
vvvvvzl(add_php_before_getitems_vvvvvzl,gettype_vvvvvzl);
|
||||
vvvvvzj(add_php_after_getitem_vvvvvzj,gettype_vvvvvzj);
|
||||
|
||||
});
|
||||
|
||||
// #jform_gettype listeners for gettype_vvvvvzl function
|
||||
jQuery('#jform_gettype').on('keyup',function()
|
||||
{
|
||||
var add_php_before_getitems_vvvvvzl = jQuery("#jform_add_php_before_getitems input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzl = jQuery("#jform_gettype").val();
|
||||
vvvvvzl(add_php_before_getitems_vvvvvzl,gettype_vvvvvzl);
|
||||
vvvvvzl(gettype_vvvvvzl);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_gettype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_php_before_getitems_vvvvvzl = jQuery("#jform_add_php_before_getitems input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzl = jQuery("#jform_gettype").val();
|
||||
vvvvvzl(add_php_before_getitems_vvvvvzl,gettype_vvvvvzl);
|
||||
vvvvvzl(gettype_vvvvvzl);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_php_after_getitems listeners for add_php_after_getitems_vvvvvzm function
|
||||
jQuery('#jform_add_php_after_getitems').on('keyup',function()
|
||||
// #jform_add_php_getlistquery listeners for add_php_getlistquery_vvvvvzm function
|
||||
jQuery('#jform_add_php_getlistquery').on('keyup',function()
|
||||
{
|
||||
var add_php_after_getitems_vvvvvzm = jQuery("#jform_add_php_after_getitems input[type='radio']:checked").val();
|
||||
var add_php_getlistquery_vvvvvzm = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzm = jQuery("#jform_gettype").val();
|
||||
vvvvvzm(add_php_after_getitems_vvvvvzm,gettype_vvvvvzm);
|
||||
vvvvvzm(add_php_getlistquery_vvvvvzm,gettype_vvvvvzm);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_php_after_getitems',function (e)
|
||||
jQuery('#adminForm').on('change', '#jform_add_php_getlistquery',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_php_after_getitems_vvvvvzm = jQuery("#jform_add_php_after_getitems input[type='radio']:checked").val();
|
||||
var add_php_getlistquery_vvvvvzm = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzm = jQuery("#jform_gettype").val();
|
||||
vvvvvzm(add_php_after_getitems_vvvvvzm,gettype_vvvvvzm);
|
||||
vvvvvzm(add_php_getlistquery_vvvvvzm,gettype_vvvvvzm);
|
||||
|
||||
});
|
||||
|
||||
// #jform_gettype listeners for gettype_vvvvvzm function
|
||||
jQuery('#jform_gettype').on('keyup',function()
|
||||
{
|
||||
var add_php_after_getitems_vvvvvzm = jQuery("#jform_add_php_after_getitems input[type='radio']:checked").val();
|
||||
var add_php_getlistquery_vvvvvzm = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzm = jQuery("#jform_gettype").val();
|
||||
vvvvvzm(add_php_after_getitems_vvvvvzm,gettype_vvvvvzm);
|
||||
vvvvvzm(add_php_getlistquery_vvvvvzm,gettype_vvvvvzm);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_gettype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_php_after_getitems_vvvvvzm = jQuery("#jform_add_php_after_getitems input[type='radio']:checked").val();
|
||||
var add_php_getlistquery_vvvvvzm = jQuery("#jform_add_php_getlistquery input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzm = jQuery("#jform_gettype").val();
|
||||
vvvvvzm(add_php_after_getitems_vvvvvzm,gettype_vvvvvzm);
|
||||
vvvvvzm(add_php_getlistquery_vvvvvzm,gettype_vvvvvzm);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_php_before_getitems listeners for add_php_before_getitems_vvvvvzn function
|
||||
jQuery('#jform_add_php_before_getitems').on('keyup',function()
|
||||
{
|
||||
var add_php_before_getitems_vvvvvzn = jQuery("#jform_add_php_before_getitems input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzn = jQuery("#jform_gettype").val();
|
||||
vvvvvzn(add_php_before_getitems_vvvvvzn,gettype_vvvvvzn);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_php_before_getitems',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_php_before_getitems_vvvvvzn = jQuery("#jform_add_php_before_getitems input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzn = jQuery("#jform_gettype").val();
|
||||
vvvvvzn(add_php_before_getitems_vvvvvzn,gettype_vvvvvzn);
|
||||
|
||||
});
|
||||
|
||||
// #jform_gettype listeners for gettype_vvvvvzn function
|
||||
jQuery('#jform_gettype').on('keyup',function()
|
||||
{
|
||||
var add_php_before_getitems_vvvvvzn = jQuery("#jform_add_php_before_getitems input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzn = jQuery("#jform_gettype").val();
|
||||
vvvvvzn(add_php_before_getitems_vvvvvzn,gettype_vvvvvzn);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_gettype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_php_before_getitems_vvvvvzn = jQuery("#jform_add_php_before_getitems input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzn = jQuery("#jform_gettype").val();
|
||||
vvvvvzn(add_php_before_getitems_vvvvvzn,gettype_vvvvvzn);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_php_after_getitems listeners for add_php_after_getitems_vvvvvzo function
|
||||
jQuery('#jform_add_php_after_getitems').on('keyup',function()
|
||||
{
|
||||
var add_php_after_getitems_vvvvvzo = jQuery("#jform_add_php_after_getitems input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzo = jQuery("#jform_gettype").val();
|
||||
vvvvvzo(add_php_after_getitems_vvvvvzo,gettype_vvvvvzo);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_php_after_getitems',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_php_after_getitems_vvvvvzo = jQuery("#jform_add_php_after_getitems input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzo = jQuery("#jform_gettype").val();
|
||||
vvvvvzo(add_php_after_getitems_vvvvvzo,gettype_vvvvvzo);
|
||||
|
||||
});
|
||||
|
||||
// #jform_gettype listeners for gettype_vvvvvzo function
|
||||
jQuery('#jform_gettype').on('keyup',function()
|
||||
{
|
||||
var add_php_after_getitems_vvvvvzo = jQuery("#jform_add_php_after_getitems input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzo = jQuery("#jform_gettype").val();
|
||||
vvvvvzo(gettype_vvvvvzo);
|
||||
vvvvvzo(add_php_after_getitems_vvvvvzo,gettype_vvvvvzo);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_gettype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_php_after_getitems_vvvvvzo = jQuery("#jform_add_php_after_getitems input[type='radio']:checked").val();
|
||||
var gettype_vvvvvzo = jQuery("#jform_gettype").val();
|
||||
vvvvvzo(gettype_vvvvvzo);
|
||||
vvvvvzo(add_php_after_getitems_vvvvvzo,gettype_vvvvvzo);
|
||||
|
||||
});
|
||||
|
||||
// #jform_gettype listeners for gettype_vvvvvzp function
|
||||
// #jform_gettype listeners for gettype_vvvvvzq function
|
||||
jQuery('#jform_gettype').on('keyup',function()
|
||||
{
|
||||
var gettype_vvvvvzp = jQuery("#jform_gettype").val();
|
||||
vvvvvzp(gettype_vvvvvzp);
|
||||
var gettype_vvvvvzq = jQuery("#jform_gettype").val();
|
||||
vvvvvzq(gettype_vvvvvzq);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_gettype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var gettype_vvvvvzp = jQuery("#jform_gettype").val();
|
||||
vvvvvzp(gettype_vvvvvzp);
|
||||
var gettype_vvvvvzq = jQuery("#jform_gettype").val();
|
||||
vvvvvzq(gettype_vvvvvzq);
|
||||
|
||||
});
|
||||
|
||||
// #jform_gettype listeners for gettype_vvvvvzr function
|
||||
jQuery('#jform_gettype').on('keyup',function()
|
||||
{
|
||||
var gettype_vvvvvzr = jQuery("#jform_gettype").val();
|
||||
vvvvvzr(gettype_vvvvvzr);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_gettype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var gettype_vvvvvzr = jQuery("#jform_gettype").val();
|
||||
vvvvvzr(gettype_vvvvvzr);
|
||||
|
||||
});
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewDynamic_get extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewDynamic_get extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewDynamic_get extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('dynamic_get');
|
||||
$this->canEdit = $this->canDo->get('dynamic_get.edit');
|
||||
$this->canState = $this->canDo->get('dynamic_get.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,96 +93,96 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_DYNAMIC_GETS'), 'database');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=dynamic_gets');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('dynamic_get.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('dynamic_get.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('dynamic_get.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('dynamic_gets.publish');
|
||||
JToolBarHelper::unpublishList('dynamic_gets.unpublish');
|
||||
JToolBarHelper::archiveList('dynamic_gets.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('dynamic_gets.publish');
|
||||
JToolBarHelper::unpublishList('dynamic_gets.unpublish');
|
||||
JToolBarHelper::archiveList('dynamic_gets.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('dynamic_gets.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('dynamic_gets.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'dynamic_gets.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('dynamic_gets.trash');
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'dynamic_gets.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('dynamic_gets.trash');
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.export') && $this->canDo->get('dynamic_get.export'))
|
||||
{
|
||||
JToolBarHelper::custom('dynamic_gets.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('dynamic_get.import'))
|
||||
{
|
||||
JToolBarHelper::custom('dynamic_gets.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false);
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('dynamic_gets');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('dynamic_gets');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -195,11 +194,11 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Set Main Source Selection
|
||||
$this->main_sourceOptions = $this->getTheMain_sourceSelections();
|
||||
@ -261,7 +260,7 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/dynamic_gets.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -272,10 +271,10 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -294,7 +293,7 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy
|
||||
'a.gettype' => JText::_('COM_COMPONENTBUILDER_DYNAMIC_GET_GETTYPE_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
protected function getTheMain_sourceSelections()
|
||||
{
|
||||
|
@ -137,157 +137,157 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_datalenght listeners for datalenght_vvvvwac function
|
||||
// #jform_datalenght listeners for datalenght_vvvvwae function
|
||||
jQuery('#jform_datalenght').on('keyup',function()
|
||||
{
|
||||
var datalenght_vvvvwac = jQuery("#jform_datalenght").val();
|
||||
vvvvwac(datalenght_vvvvwac);
|
||||
var datalenght_vvvvwae = jQuery("#jform_datalenght").val();
|
||||
vvvvwae(datalenght_vvvvwae);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_datalenght',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var datalenght_vvvvwac = jQuery("#jform_datalenght").val();
|
||||
vvvvwac(datalenght_vvvvwac);
|
||||
var datalenght_vvvvwae = jQuery("#jform_datalenght").val();
|
||||
vvvvwae(datalenght_vvvvwae);
|
||||
|
||||
});
|
||||
|
||||
// #jform_datadefault listeners for datadefault_vvvvwad function
|
||||
// #jform_datadefault listeners for datadefault_vvvvwaf function
|
||||
jQuery('#jform_datadefault').on('keyup',function()
|
||||
{
|
||||
var datadefault_vvvvwad = jQuery("#jform_datadefault").val();
|
||||
vvvvwad(datadefault_vvvvwad);
|
||||
var datadefault_vvvvwaf = jQuery("#jform_datadefault").val();
|
||||
vvvvwaf(datadefault_vvvvwaf);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_datadefault',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var datadefault_vvvvwad = jQuery("#jform_datadefault").val();
|
||||
vvvvwad(datadefault_vvvvwad);
|
||||
|
||||
});
|
||||
|
||||
// #jform_datatype listeners for datatype_vvvvwae function
|
||||
jQuery('#jform_datatype').on('keyup',function()
|
||||
{
|
||||
var datatype_vvvvwae = jQuery("#jform_datatype").val();
|
||||
vvvvwae(datatype_vvvvwae);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_datatype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var datatype_vvvvwae = jQuery("#jform_datatype").val();
|
||||
vvvvwae(datatype_vvvvwae);
|
||||
|
||||
});
|
||||
|
||||
// #jform_datatype listeners for datatype_vvvvwaf function
|
||||
jQuery('#jform_datatype').on('keyup',function()
|
||||
{
|
||||
var datatype_vvvvwaf = jQuery("#jform_datatype").val();
|
||||
vvvvwaf(datatype_vvvvwaf);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_datatype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var datatype_vvvvwaf = jQuery("#jform_datatype").val();
|
||||
vvvvwaf(datatype_vvvvwaf);
|
||||
|
||||
});
|
||||
|
||||
// #jform_store listeners for store_vvvvwag function
|
||||
jQuery('#jform_store').on('keyup',function()
|
||||
{
|
||||
var store_vvvvwag = jQuery("#jform_store").val();
|
||||
var datatype_vvvvwag = jQuery("#jform_datatype").val();
|
||||
vvvvwag(store_vvvvwag,datatype_vvvvwag);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_store',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var store_vvvvwag = jQuery("#jform_store").val();
|
||||
var datatype_vvvvwag = jQuery("#jform_datatype").val();
|
||||
vvvvwag(store_vvvvwag,datatype_vvvvwag);
|
||||
var datadefault_vvvvwaf = jQuery("#jform_datadefault").val();
|
||||
vvvvwaf(datadefault_vvvvwaf);
|
||||
|
||||
});
|
||||
|
||||
// #jform_datatype listeners for datatype_vvvvwag function
|
||||
jQuery('#jform_datatype').on('keyup',function()
|
||||
{
|
||||
var store_vvvvwag = jQuery("#jform_store").val();
|
||||
var datatype_vvvvwag = jQuery("#jform_datatype").val();
|
||||
vvvvwag(store_vvvvwag,datatype_vvvvwag);
|
||||
vvvvwag(datatype_vvvvwag);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_datatype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var store_vvvvwag = jQuery("#jform_store").val();
|
||||
var datatype_vvvvwag = jQuery("#jform_datatype").val();
|
||||
vvvvwag(store_vvvvwag,datatype_vvvvwag);
|
||||
vvvvwag(datatype_vvvvwag);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_css_view listeners for add_css_view_vvvvwai function
|
||||
// #jform_datatype listeners for datatype_vvvvwah function
|
||||
jQuery('#jform_datatype').on('keyup',function()
|
||||
{
|
||||
var datatype_vvvvwah = jQuery("#jform_datatype").val();
|
||||
vvvvwah(datatype_vvvvwah);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_datatype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var datatype_vvvvwah = jQuery("#jform_datatype").val();
|
||||
vvvvwah(datatype_vvvvwah);
|
||||
|
||||
});
|
||||
|
||||
// #jform_store listeners for store_vvvvwai function
|
||||
jQuery('#jform_store').on('keyup',function()
|
||||
{
|
||||
var store_vvvvwai = jQuery("#jform_store").val();
|
||||
var datatype_vvvvwai = jQuery("#jform_datatype").val();
|
||||
vvvvwai(store_vvvvwai,datatype_vvvvwai);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_store',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var store_vvvvwai = jQuery("#jform_store").val();
|
||||
var datatype_vvvvwai = jQuery("#jform_datatype").val();
|
||||
vvvvwai(store_vvvvwai,datatype_vvvvwai);
|
||||
|
||||
});
|
||||
|
||||
// #jform_datatype listeners for datatype_vvvvwai function
|
||||
jQuery('#jform_datatype').on('keyup',function()
|
||||
{
|
||||
var store_vvvvwai = jQuery("#jform_store").val();
|
||||
var datatype_vvvvwai = jQuery("#jform_datatype").val();
|
||||
vvvvwai(store_vvvvwai,datatype_vvvvwai);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_datatype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var store_vvvvwai = jQuery("#jform_store").val();
|
||||
var datatype_vvvvwai = jQuery("#jform_datatype").val();
|
||||
vvvvwai(store_vvvvwai,datatype_vvvvwai);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_css_view listeners for add_css_view_vvvvwak function
|
||||
jQuery('#jform_add_css_view').on('keyup',function()
|
||||
{
|
||||
var add_css_view_vvvvwai = jQuery("#jform_add_css_view input[type='radio']:checked").val();
|
||||
vvvvwai(add_css_view_vvvvwai);
|
||||
var add_css_view_vvvvwak = jQuery("#jform_add_css_view input[type='radio']:checked").val();
|
||||
vvvvwak(add_css_view_vvvvwak);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_css_view',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_css_view_vvvvwai = jQuery("#jform_add_css_view input[type='radio']:checked").val();
|
||||
vvvvwai(add_css_view_vvvvwai);
|
||||
var add_css_view_vvvvwak = jQuery("#jform_add_css_view input[type='radio']:checked").val();
|
||||
vvvvwak(add_css_view_vvvvwak);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_css_views listeners for add_css_views_vvvvwaj function
|
||||
// #jform_add_css_views listeners for add_css_views_vvvvwal function
|
||||
jQuery('#jform_add_css_views').on('keyup',function()
|
||||
{
|
||||
var add_css_views_vvvvwaj = jQuery("#jform_add_css_views input[type='radio']:checked").val();
|
||||
vvvvwaj(add_css_views_vvvvwaj);
|
||||
var add_css_views_vvvvwal = jQuery("#jform_add_css_views input[type='radio']:checked").val();
|
||||
vvvvwal(add_css_views_vvvvwal);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_css_views',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_css_views_vvvvwaj = jQuery("#jform_add_css_views input[type='radio']:checked").val();
|
||||
vvvvwaj(add_css_views_vvvvwaj);
|
||||
var add_css_views_vvvvwal = jQuery("#jform_add_css_views input[type='radio']:checked").val();
|
||||
vvvvwal(add_css_views_vvvvwal);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_javascript_view_footer listeners for add_javascript_view_footer_vvvvwak function
|
||||
// #jform_add_javascript_view_footer listeners for add_javascript_view_footer_vvvvwam function
|
||||
jQuery('#jform_add_javascript_view_footer').on('keyup',function()
|
||||
{
|
||||
var add_javascript_view_footer_vvvvwak = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val();
|
||||
vvvvwak(add_javascript_view_footer_vvvvwak);
|
||||
var add_javascript_view_footer_vvvvwam = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val();
|
||||
vvvvwam(add_javascript_view_footer_vvvvwam);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_javascript_view_footer',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_javascript_view_footer_vvvvwak = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val();
|
||||
vvvvwak(add_javascript_view_footer_vvvvwak);
|
||||
var add_javascript_view_footer_vvvvwam = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val();
|
||||
vvvvwam(add_javascript_view_footer_vvvvwam);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_javascript_views_footer listeners for add_javascript_views_footer_vvvvwal function
|
||||
// #jform_add_javascript_views_footer listeners for add_javascript_views_footer_vvvvwan function
|
||||
jQuery('#jform_add_javascript_views_footer').on('keyup',function()
|
||||
{
|
||||
var add_javascript_views_footer_vvvvwal = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val();
|
||||
vvvvwal(add_javascript_views_footer_vvvvwal);
|
||||
var add_javascript_views_footer_vvvvwan = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val();
|
||||
vvvvwan(add_javascript_views_footer_vvvvwan);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_javascript_views_footer',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_javascript_views_footer_vvvvwal = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val();
|
||||
vvvvwal(add_javascript_views_footer_vvvvwal);
|
||||
var add_javascript_views_footer_vvvvwan = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val();
|
||||
vvvvwan(add_javascript_views_footer_vvvvwan);
|
||||
|
||||
});
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewField extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewField extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewField extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewFields extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('field');
|
||||
$this->canEdit = $this->canDo->get('field.edit');
|
||||
$this->canState = $this->canDo->get('field.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewFields extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,96 +93,96 @@ class ComponentbuilderViewFields extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_FIELDS'), 'lamp');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('field.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('field.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('field.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('fields.publish');
|
||||
JToolBarHelper::unpublishList('fields.unpublish');
|
||||
JToolBarHelper::archiveList('fields.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('fields.publish');
|
||||
JToolBarHelper::unpublishList('fields.unpublish');
|
||||
JToolBarHelper::archiveList('fields.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('fields.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('fields.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'fields.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('fields.trash');
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'fields.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('fields.trash');
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.export') && $this->canDo->get('field.export'))
|
||||
{
|
||||
JToolBarHelper::custom('fields.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('field.import'))
|
||||
{
|
||||
JToolBarHelper::custom('fields.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false);
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('fields');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('fields');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -195,11 +194,11 @@ class ComponentbuilderViewFields extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Category Filter.
|
||||
JHtmlSidebar::addFilter(
|
||||
@ -344,7 +343,7 @@ class ComponentbuilderViewFields extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/fields.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -355,10 +354,10 @@ class ComponentbuilderViewFields extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -381,7 +380,7 @@ class ComponentbuilderViewFields extends JViewLegacy
|
||||
'a.store' => JText::_('COM_COMPONENTBUILDER_FIELD_STORE_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
protected function getTheDatatypeSelections()
|
||||
{
|
||||
|
@ -53,18 +53,18 @@ class ComponentbuilderViewFieldtype extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->vzwfields = $this->get('Vzwfields');
|
||||
$this->vzyfields = $this->get('Vzyfields');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -166,7 +166,7 @@ class ComponentbuilderViewFieldtype extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -180,7 +180,7 @@ class ComponentbuilderViewFieldtype extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('fieldtype');
|
||||
$this->canEdit = $this->canDo->get('fieldtype.edit');
|
||||
$this->canState = $this->canDo->get('fieldtype.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,96 +93,96 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_FIELDTYPES'), 'power-cord');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=fieldtypes');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('fieldtype.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('fieldtype.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('fieldtype.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('fieldtypes.publish');
|
||||
JToolBarHelper::unpublishList('fieldtypes.unpublish');
|
||||
JToolBarHelper::archiveList('fieldtypes.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('fieldtypes.publish');
|
||||
JToolBarHelper::unpublishList('fieldtypes.unpublish');
|
||||
JToolBarHelper::archiveList('fieldtypes.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('fieldtypes.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('fieldtypes.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'fieldtypes.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('fieldtypes.trash');
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'fieldtypes.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('fieldtypes.trash');
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.export') && $this->canDo->get('fieldtype.export'))
|
||||
{
|
||||
JToolBarHelper::custom('fieldtypes.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('fieldtype.import'))
|
||||
{
|
||||
JToolBarHelper::custom('fieldtypes.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false);
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('fieldtypes');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('fieldtypes');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -195,11 +194,11 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Category Filter.
|
||||
JHtmlSidebar::addFilter(
|
||||
@ -234,7 +233,7 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/fieldtypes.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -245,10 +244,10 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -267,5 +266,5 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy
|
||||
'a.short_description' => JText::_('COM_COMPONENTBUILDER_FIELDTYPE_SHORT_DESCRIPTION_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,18 +53,18 @@ class ComponentbuilderViewFtp extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->vzxlinked_components = $this->get('Vzxlinked_components');
|
||||
$this->vzzlinked_components = $this->get('Vzzlinked_components');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -166,7 +166,7 @@ class ComponentbuilderViewFtp extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -180,7 +180,7 @@ class ComponentbuilderViewFtp extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewFtps extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('ftp');
|
||||
$this->canEdit = $this->canDo->get('ftp.edit');
|
||||
$this->canState = $this->canDo->get('ftp.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewFtps extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,96 +93,96 @@ class ComponentbuilderViewFtps extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_FTPS'), 'flash');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=ftps');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('ftp.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('ftp.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('ftp.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('ftps.publish');
|
||||
JToolBarHelper::unpublishList('ftps.unpublish');
|
||||
JToolBarHelper::archiveList('ftps.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('ftps.publish');
|
||||
JToolBarHelper::unpublishList('ftps.unpublish');
|
||||
JToolBarHelper::archiveList('ftps.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('ftps.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('ftps.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'ftps.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('ftps.trash');
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'ftps.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('ftps.trash');
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.export') && $this->canDo->get('ftp.export'))
|
||||
{
|
||||
JToolBarHelper::custom('ftps.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('ftp.import'))
|
||||
{
|
||||
JToolBarHelper::custom('ftps.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false);
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('ftps');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('ftps');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -195,11 +194,11 @@ class ComponentbuilderViewFtps extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Set Name Selection
|
||||
$this->nameOptions = $this->getTheNameSelections();
|
||||
@ -239,7 +238,7 @@ class ComponentbuilderViewFtps extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/ftps.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -250,10 +249,10 @@ class ComponentbuilderViewFtps extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -270,7 +269,7 @@ class ComponentbuilderViewFtps extends JViewLegacy
|
||||
'a.name' => JText::_('COM_COMPONENTBUILDER_FTP_NAME_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
protected function getTheNameSelections()
|
||||
{
|
||||
|
@ -37,13 +37,13 @@ class ComponentbuilderViewGet_snippets extends JViewLegacy
|
||||
// Overwriting JView display method
|
||||
function display($tpl = null)
|
||||
{
|
||||
// get component params
|
||||
// get component params
|
||||
$this->params = JComponentHelper::getParams('com_componentbuilder');
|
||||
// get the application
|
||||
$this->app = JFactory::getApplication();
|
||||
// get the user object
|
||||
$this->user = JFactory::getUser();
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('get_snippets');
|
||||
// Initialise variables.
|
||||
$this->items = $this->get('Items');
|
||||
@ -67,7 +67,7 @@ class ComponentbuilderViewGet_snippets extends JViewLegacy
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Prepares the document
|
||||
*/
|
||||
protected function setDocument()
|
||||
@ -78,7 +78,9 @@ class ComponentbuilderViewGet_snippets extends JViewLegacy
|
||||
// Load the header checker class.
|
||||
require_once( JPATH_COMPONENT_ADMINISTRATOR.'/helpers/headercheck.php' );
|
||||
// Initialize the header checker.
|
||||
$HeaderCheck = new componentbuilderHeaderCheck;
|
||||
$HeaderCheck = new componentbuilderHeaderCheck;
|
||||
// Add View JavaScript File
|
||||
$this->document->addScript(JURI::root(true) . "/administrator/components/com_componentbuilder/assets/js/get_snippets.js");
|
||||
|
||||
// Load uikit options.
|
||||
$uikit = $this->params->get('uikit_load');
|
||||
@ -189,6 +191,7 @@ class ComponentbuilderViewGet_snippets extends JViewLegacy
|
||||
// set an error message if needed
|
||||
$this->document->addScriptDeclaration("var returnError = '<div class=\"uk-alert uk-alert-warning\"><h1>".JText::_('COM_COMPONENTBUILDER_AN_ERROR_HAS_OCCURRED')."!</h1><p>".JText::_('COM_COMPONENTBUILDER_PLEASE_TRY_AGAIN_LATER').".</p></div>';");
|
||||
// need to add some language strings
|
||||
JText::script('COM_COMPONENTBUILDER_JCB_COMMUNITY_SNIPPETS');
|
||||
JText::script('COM_COMPONENTBUILDER_SNIPPETS');
|
||||
JText::script('COM_COMPONENTBUILDER_SNIPPET');
|
||||
JText::script('COM_COMPONENTBUILDER_VIEW_SNIPPET_OF_COMMUNITY_VERSION');
|
||||
@ -251,529 +254,9 @@ class ComponentbuilderViewGet_snippets extends JViewLegacy
|
||||
// Set the local snippets array
|
||||
$this->document->addScriptDeclaration("var local_snippets = ". json_encode($local_snippets).";");
|
||||
}
|
||||
// add the document default css file
|
||||
$this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_componentbuilder/assets/css/get_snippets.css');
|
||||
// Set the Custom JS script to view
|
||||
$this->document->addScriptDeclaration("
|
||||
// start the moment the document is ready
|
||||
jQuery(document).ready(function () {
|
||||
// just get the available libraries
|
||||
getLibraries(snippetsPath);
|
||||
});
|
||||
|
||||
// add an ajax call tracker
|
||||
var ajaxcall = null;
|
||||
var fromLocal = false;
|
||||
|
||||
jQuery(document).ready(function(){
|
||||
jQuery('body').on('click','.getreaction',function(){
|
||||
// Ajax request
|
||||
var btn = jQuery(this);
|
||||
btn.prop('disabled', true);
|
||||
setTimeout(function(){
|
||||
btn.prop('disabled', false);
|
||||
}, 3000);
|
||||
var type = btn.data('type');
|
||||
if ('getLibraries' === type) {
|
||||
getLibraries(snippetsPath);
|
||||
} else if ('getSnippets' === type) {
|
||||
var name = btn.data('name');
|
||||
getSnippets(snippetsPath, name);
|
||||
} else if ('all' === type) {
|
||||
var status = btn.data('status');
|
||||
bulkSnippetGithub(status);
|
||||
} else if ('bulk' === type) {
|
||||
checkBulkSnippetGithub();
|
||||
} else if ('get' === type) {
|
||||
var path = btn.data('path');
|
||||
var status = btn.data('status');
|
||||
setSnippetGithub(path, status);
|
||||
} else {
|
||||
var path = btn.data('path');
|
||||
getSnippetModal(path, type);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// load every thing once ready
|
||||
jQuery(document).ajaxStop(function () {
|
||||
if (0 === jQuery.active) {
|
||||
//do something special
|
||||
if ('snippets' === ajaxcall) {
|
||||
setTimeout( function() {
|
||||
jQuery('#snippets-github').html('<h1>'+Joomla.JText._('COM_COMPONENTBUILDER_JCB_COMMUNITY_SNIPPETS')+'</h1>');
|
||||
jQuery('#snippets-display').show();
|
||||
jQuery('#snippets-grid').trigger('display.uk.check');
|
||||
jQuery('#loading').hide();
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// get the libraries
|
||||
function getLibraries(path) {
|
||||
var _paths = jQuery.jStorage.get('JCB-Snippets-Paths', null);
|
||||
// always hide the snippets display
|
||||
jQuery('#snippets-display').hide();
|
||||
// always reset the grid
|
||||
jQuery('#libraries-grid').html('');
|
||||
// set the ajax scope
|
||||
ajaxcall = 'libraries';
|
||||
if (_paths) {
|
||||
buildLibraries(_paths);
|
||||
} else {
|
||||
jQuery.get(path)
|
||||
.success(function(paths) {
|
||||
// load only this library paths
|
||||
jQuery.jStorage.set('JCB-Snippets-Paths', paths, {TTL: expire});
|
||||
buildLibraries(paths);
|
||||
})
|
||||
.error(function(jqXHR, textStatus, errorThrown) {
|
||||
jQuery('#snippets-github').html(returnError);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// build the ibraries object
|
||||
function buildLibraries(paths) {
|
||||
var _temp = jQuery.jStorage.get('JCB-Libraries', null);
|
||||
if (_temp) {
|
||||
setLibraries(_temp);
|
||||
} else {
|
||||
var temp = {};
|
||||
jQuery.each(paths.tree, function(key,value) {
|
||||
if (value.path.match(\".json$\")) {
|
||||
var libName = value.path.split(/ -(.+)/)[0];
|
||||
libName = libName.trim()
|
||||
temp[libName] = libName;
|
||||
}
|
||||
});
|
||||
// load only this library paths
|
||||
jQuery.jStorage.set('JCB-Libraries', temp, {TTL: expire});
|
||||
setLibraries(temp);
|
||||
}
|
||||
}
|
||||
|
||||
// set the libraries
|
||||
function setLibraries(names) {
|
||||
// now load the lib buttons
|
||||
jQuery.each(names, function(value) {
|
||||
setLibrary(value);
|
||||
});
|
||||
setTimeout( function() {
|
||||
jQuery('#snippets-github').html('<h1>'+Joomla.JText._('COM_COMPONENTBUILDER_AVAILABLE_LIBRARIES')+'</h1>');
|
||||
jQuery('#libraries-display').show();
|
||||
jQuery('#libraries-grid').trigger('display.uk.check');
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
// set the snippets
|
||||
function setLibrary(name) {
|
||||
// get useful ID
|
||||
var keyID = getKeyID(name);
|
||||
// build the library display
|
||||
var html = '<div id=\"'+keyID+'-panel\" class=\"uk-panel\">';
|
||||
html += '<div class=\"uk-panel uk-panel-box uk-width-1-1\">';
|
||||
html += '<h3 class=\"uk-panel-title\">' + name + '</h3>';
|
||||
html += '<hr />';
|
||||
// set the data buttons
|
||||
html += setLibButtons(name);
|
||||
// close the box panel
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
// now we have the library
|
||||
jQuery('#libraries-grid').append(html);
|
||||
}
|
||||
|
||||
function setLibButtons(name) {
|
||||
return '<button class=\"uk-button uk-button-small uk-button-success uk-width-1-1 getreaction\" data-name=\"'+name+'\" data-type=\"getSnippets\" title=\"'+Joomla.JText._('COM_COMPONENTBUILDER_VIEW_DESCRIPTION_OF_COMMUNITY_VERSION')+'\"><i class=\"uk-icon-thumb-tack\"></i><span class=\"uk-hidden-small\"> '+Joomla.JText._('COM_COMPONENTBUILDER_OPEN_LIBRARY_SNIPPETS')+'</span></button>';
|
||||
}
|
||||
|
||||
// get the snippets
|
||||
function getSnippets(path, libraryName) {
|
||||
jQuery('#loading').show();
|
||||
// get local values if set
|
||||
var _paths = jQuery.jStorage.get('JCB-Snippets-Paths', null);
|
||||
// always reset the grid
|
||||
jQuery('#snippets-grid').html('');
|
||||
// always hide libraries
|
||||
jQuery('#libraries-display').hide();
|
||||
// set the ajax scope
|
||||
ajaxcall = 'snippets';
|
||||
fromLocal = false;
|
||||
if (_paths) {
|
||||
setSnippets(_paths, libraryName);
|
||||
jQuery('#snippets-github').html('<h1>'+Joomla.JText._('COM_COMPONENTBUILDER_JCB_COMMUNITY_SNIPPETS')+'</h1>');
|
||||
} else {
|
||||
jQuery.get(path)
|
||||
.success(function(paths) {
|
||||
// load only this library paths
|
||||
jQuery.jStorage.set('JCB-Snippets-Paths', paths, {TTL: expire});
|
||||
setSnippets(paths, libraryName);
|
||||
})
|
||||
.error(function(jqXHR, textStatus, errorThrown) {
|
||||
jQuery('#snippets-github').html(returnError);
|
||||
});
|
||||
}
|
||||
// only use if loading localy
|
||||
if (fromLocal) {
|
||||
jQuery('#snippets-display').show();
|
||||
jQuery('#snippets-grid').trigger('display.uk.check');
|
||||
jQuery('#loading').hide();
|
||||
}
|
||||
}
|
||||
|
||||
// set the snippets
|
||||
function setSnippets(paths, libraryName) {
|
||||
// set the ajax scope
|
||||
ajaxcall = 'snippets';
|
||||
jQuery.each(paths.tree, function(key,value) {
|
||||
if (value.path.match(\".json$\") && value.path.match(\"^\"+libraryName)) {
|
||||
var _snippet = jQuery.jStorage.get(value.path, null);
|
||||
if (_snippet) {
|
||||
setSnippet(_snippet, value.path);
|
||||
fromLocal = true;
|
||||
} else {
|
||||
jQuery.get(snippetPath+value.path)
|
||||
.success(function(snippet) {
|
||||
// convert the string to json.object
|
||||
snippet = jQuery.parseJSON(snippet);
|
||||
jQuery.jStorage.set(value.path, snippet, {TTL: expire});
|
||||
setSnippet(snippet, value.path);
|
||||
})
|
||||
.error(function(jqXHR, textStatus, errorThrown) {
|
||||
// we could do more
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// set the snippets
|
||||
function setSnippet(snippet, key) {
|
||||
// get useful ID
|
||||
var keyID = getKeyID(key);
|
||||
// get the status
|
||||
var status = getSnippetStatus(snippet, key);
|
||||
// add to bulk updater
|
||||
if ('equal' !== status) {
|
||||
bulkItems[status].push(key);
|
||||
}
|
||||
// build the snippet display
|
||||
var html = '<div id=\"'+keyID+'-panel\" class=\"uk-panel\" data-uk-filter=\"'+status+'\" data-snippet-libraries=\"'+snippet.library+'\" data-snippet-types=\"'+snippet.type+'\" data-snippet-name=\"'+snippet.name+'\">';
|
||||
html += '<div class=\"uk-panel uk-panel-box uk-width-1-1\">';
|
||||
html += '<div class=\"uk-panel-badge uk-badge\" ><a id=\"'+keyID+'-badge\" href=\"#'+status+'-meaning\" data-uk-offcanvas class=\"uk-text-uppercase uk-text-contrast\"><i class=\"uk-icon-info\"></i> '+status+'</a></div><br />';
|
||||
html += '<h3 class=\"uk-panel-title\">' + snippet.library+ ' - (' + snippet.type + ') ' + snippet.name + '</h3>';
|
||||
html += snippet.heading + '<hr />';
|
||||
// set the data buttons
|
||||
html += setDataButtons(snippet, key, status);
|
||||
// set the snippet ref button
|
||||
html += setRefButtons(snippet, key, status, keyID);
|
||||
// set the contributor buttons
|
||||
html += setContributorButtons(snippet, key);
|
||||
// close the box panel
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
// now we have the snippet
|
||||
jQuery('#snippets-grid').append(html);
|
||||
}
|
||||
|
||||
// set the snippet status
|
||||
function getSnippetStatus(snippet, key) {
|
||||
// check if JCB already has this snippet
|
||||
if(local_snippets.hasOwnProperty(key)){
|
||||
// first get local time stamp
|
||||
var local_created = strtotime(local_snippets[key].created);
|
||||
var local_modified = strtotime(local_snippets[key].modified);
|
||||
// now get github time stamps
|
||||
var created = strtotime(snippet.created);
|
||||
var modified = strtotime(snippet.modified);
|
||||
// work out the status
|
||||
if (local_created == created) {
|
||||
if (local_modified == modified) {
|
||||
return 'equal';
|
||||
} else if (local_modified > modified) {
|
||||
return 'ahead';
|
||||
} else if (local_modified < modified) {
|
||||
return 'behind';
|
||||
}
|
||||
}
|
||||
return 'diverged';
|
||||
}
|
||||
return 'new';
|
||||
}
|
||||
|
||||
function setDataButtons(snippet, key, status) {
|
||||
var html = '<div class=\"uk-button-group uk-width-1-1 uk-margin-small-bottom\">';
|
||||
html += '<button class=\"uk-button uk-button-small uk-button-success uk-width-1-3 getreaction\" data-status=\"'+status+'\" data-path=\"'+key+'\" data-type=\"usage\" title=\"'+Joomla.JText._('COM_COMPONENTBUILDER_VIEW_USAGE_OF_COMMUNITY_VERSION')+'\"><i class=\"uk-icon-info\"></i><span class=\"uk-hidden-small\"> '+Joomla.JText._('COM_COMPONENTBUILDER_USAGE')+'</span></button>';
|
||||
html += '<button class=\"uk-button uk-button-small uk-button-success uk-width-1-3 getreaction\" data-status=\"'+status+'\" data-path=\"'+key+'\" data-type=\"description\" title=\"'+Joomla.JText._('COM_COMPONENTBUILDER_VIEW_DESCRIPTION_OF_COMMUNITY_VERSION')+'\"><i class=\"uk-icon-sticky-note-o\"></i><span class=\"uk-hidden-small\"> '+Joomla.JText._('COM_COMPONENTBUILDER_DESCRIPTION')+'</span></button>';
|
||||
html += '<button class=\"uk-button uk-button-small uk-button-success uk-width-1-3 getreaction\" data-status=\"'+status+'\" data-path=\"'+key+'\" data-type=\"snippet\" title=\"'+Joomla.JText._('COM_COMPONENTBUILDER_VIEW_SNIPPET_OF_COMMUNITY_VERSION')+'\"><i class=\"uk-icon-code\"></i><span class=\"uk-hidden-small\"> '+Joomla.JText._('COM_COMPONENTBUILDER_SNIPPET')+'</span></button>';
|
||||
html += '</div>';
|
||||
// return data buttons
|
||||
return html;
|
||||
}
|
||||
|
||||
function setRefButtons(snippet, key, status, keyID) {
|
||||
var html = '<div><a class=\"uk-button uk-button-mini uk-button-success uk-margin-small-bottom uk-width-1-1\" href=\"'+snippet.url+'\" target=\"_blank\" title=\"'+Joomla.JText._('COM_COMPONENTBUILDER_VIEW_SNIPPET_REFERENCE_URL')+'\"><i class=\"uk-icon-external-link\"></i> ' + snippet.name + '</a></div>';
|
||||
// set the update button
|
||||
html += '<div>';
|
||||
if ('equal' !== status) {
|
||||
if ('new' === status) {
|
||||
var tooltip = Joomla.JText._('COM_COMPONENTBUILDER_GET_THE_SNIPPET_FROM_GITHUB_AND_INSTALL_IT_LOCALLY');
|
||||
} else {
|
||||
var tooltip = Joomla.JText._('COM_COMPONENTBUILDER_GET_THE_SNIPPET_FROM_GITHUB_AND_UPDATE_THE_LOCAL_VERSION');
|
||||
}
|
||||
html += '<button id=\"'+keyID+'-getbutton\" class=\"uk-button uk-button-small uk-button-primary uk-width-1-1 uk-margin-small-bottom getreaction\" data-status=\"'+status+'\" data-path=\"'+key+'\" data-type=\"get\" title=\"'+tooltip+'\"><i class=\"uk-icon-cloud-download\"></i> '+Joomla.JText._('COM_COMPONENTBUILDER_GET_SNIPPET')+'</button>';
|
||||
} else {
|
||||
html += '<button class=\"uk-button uk-button-small uk-width-1-1 uk-margin-small-bottom\" type=\"button\" disabled title=\"'+Joomla.JText._('COM_COMPONENTBUILDER_NO_NEED_TO_GET_IT_SINCE_IT_IS_ALREADY_IN_SYNC_WITH_YOUR_LOCAL_VERSION')+'\"><i class=\"uk-icon-check-square-o\"></i> '+Joomla.JText._('COM_COMPONENTBUILDER_LOCAL_SNIPPET')+'</button>';
|
||||
}
|
||||
html += '</div>';
|
||||
// return data buttons
|
||||
return html;
|
||||
}
|
||||
|
||||
function setContributorButtons(snippet, key) {
|
||||
// set the contributor name
|
||||
if (snippet.contributor_company) {
|
||||
var contributor_name = snippet.contributor_company;
|
||||
} else if (snippet.contributor_name) {
|
||||
var contributor_name = snippet.contributor_name;
|
||||
} else {
|
||||
var contributor_name = Joomla.JText._('COM_COMPONENTBUILDER_JCB_COMMUNITY');
|
||||
}
|
||||
// set the contributor url
|
||||
if (snippet.contributor_website) {
|
||||
var contributor_url = snippet.contributor_website;
|
||||
} else if (snippet.contributor_email) {
|
||||
var contributor_url = 'mailto:'+snippet.contributor_email;
|
||||
} else {
|
||||
var contributor_url = 'https://github.com/vdm-io/Joomla-Component-Builder-Snippets';
|
||||
}
|
||||
var html = '<div class=\"uk-button-group uk-width-1-1\">';
|
||||
html += '<button class=\"uk-button uk-button-primary uk-width-1-10 uk-button-mini getreaction\" data-type=\"contributor\" data-path=\"'+key+'\" title=\"'+Joomla.JText._('COM_COMPONENTBUILDER_VIEW_THE_CONTRIBUTOR_DETAILS')+'\"><i class=\"uk-icon-user\"></i></button>';
|
||||
html += '<a class=\"uk-button uk-button-primary uk-width-5-10 uk-button-mini\" href=\"'+contributor_url+'\" target=\"_blank\" title=\"'+Joomla.JText._('COM_COMPONENTBUILDER_LINK_TO_THE_CONTRIBUTOR')+'\"><i class=\"uk-icon-external-link\"></i> ' + contributor_name + '</a>';
|
||||
html += '<a class=\"uk-button uk-button-primary uk-width-4-10 uk-button-mini\" href=\"https://github.com/vdm-io/Joomla-Component-Builder-Snippets/blame/master/'+key+'\" target=\"_blank\" title=\"'+Joomla.JText._('COM_COMPONENTBUILDER_VIEW_WHO_CONTRIBUTED_TO_THIS_SNIPPET')+'\"><i class=\"uk-icon-external-link\"></i> '+Joomla.JText._('COM_COMPONENTBUILDER_VIEW_BLAME')+'</a>';
|
||||
html += '</div>';
|
||||
// return contributor buttons
|
||||
return html;
|
||||
}
|
||||
|
||||
// do a bulk update
|
||||
function checkBulkSnippetGithub() {
|
||||
// check if there is new items
|
||||
if (bulkItems.new.length === 0) {
|
||||
jQuery('#bulk-button-new').prop('disabled', true);
|
||||
jQuery('#bulk-button-new').attr('title', Joomla.JText._('COM_COMPONENTBUILDER_THERE_ARE_NO_NEW_SNIPPETS_AT_THIS_TIME'));
|
||||
jQuery('#bulk-notice-new').show();
|
||||
}
|
||||
// check if there is diverged items
|
||||
if (bulkItems.diverged.length === 0) {
|
||||
jQuery('#bulk-button-diverged').prop('disabled', true);
|
||||
jQuery('#bulk-button-diverged').attr('title', Joomla.JText._('COM_COMPONENTBUILDER_THERE_ARE_NO_DIVERGED_SNIPPETS_AT_THIS_TIME'));
|
||||
jQuery('#bulk-notice-diverged').show();
|
||||
}
|
||||
// check if there is ahead items
|
||||
if (bulkItems.ahead.length === 0) {
|
||||
jQuery('#bulk-button-ahead').prop('disabled', true);
|
||||
jQuery('#bulk-button-ahead').attr('title', Joomla.JText._('COM_COMPONENTBUILDER_THERE_ARE_NO_AHEAD_SNIPPETS_AT_THIS_TIME'));
|
||||
jQuery('#bulk-notice-ahead').show();
|
||||
}
|
||||
// check if there is behind items
|
||||
if (bulkItems.behind.length === 0) {
|
||||
jQuery('#bulk-button-behind').prop('disabled', true);
|
||||
jQuery('#bulk-button-behind').attr('title', Joomla.JText._('COM_COMPONENTBUILDER_THERE_ARE_NO_OUT_OF_DATE_SNIPPETS_AT_THIS_TIME'));
|
||||
jQuery('#bulk-notice-behind').show();
|
||||
}
|
||||
// check if all we should close the all button
|
||||
if (bulkItems.behind.length === 0 && bulkItems.new.length === 0 && bulkItems.ahead.length === 0 && bulkItems.diverged.length === 0) {
|
||||
jQuery('#bulk-button-all').prop('disabled', true);
|
||||
jQuery('#bulk-button-all').attr('title', Joomla.JText._('COM_COMPONENTBUILDER_THERE_ARE_NO_SNIPPETS_TO_UPDATE_AT_THIS_TIME'));
|
||||
jQuery('#bulk-notice-all').show();
|
||||
}
|
||||
}
|
||||
|
||||
// do a bulk update
|
||||
function bulkSnippetGithub(status) {
|
||||
// if all then trigger those with values
|
||||
if ('all' === status) {
|
||||
bulkSnippetGithub('behind');
|
||||
bulkSnippetGithub('new');
|
||||
bulkSnippetGithub('ahead');
|
||||
bulkSnippetGithub('diverged');
|
||||
} else if (bulkItems[status].length > 0) {
|
||||
jQuery.each(bulkItems[status], function(i, key){
|
||||
setTimeout(function(){
|
||||
doBulkUpdate_server(key, status).done(function(result) {
|
||||
if (result.message) {
|
||||
// only show errors
|
||||
if ('error' === result.status || 'warning' === result.status) {
|
||||
UIkit.notify(result.message, {status: result.status});
|
||||
}
|
||||
// update local items
|
||||
if ('success' === result.status) {
|
||||
// get key ID
|
||||
var keyID = getKeyID(key);
|
||||
// update snippet if we can
|
||||
updateSnippetDisplay(keyID, 'equal');
|
||||
}
|
||||
} else {
|
||||
UIkit.notify(Joomla.JText._('COM_COMPONENTBUILDER_SNIPPET_COULD_NOT_BE_UPDATEDSAVED'), {status:'danger'});
|
||||
}
|
||||
});
|
||||
}, 200);
|
||||
});
|
||||
// reset array
|
||||
bulkItems[status].length = 0;
|
||||
// update the buttons (since we only do the bulk update once)
|
||||
checkBulkSnippetGithub();
|
||||
}
|
||||
}
|
||||
|
||||
function doBulkUpdate_server(path, status) {
|
||||
// set the ajax scope
|
||||
ajaxcall = null;
|
||||
var getUrl = \"index.php?option=com_componentbuilder&task=ajax.setSnippetGithub&format=json\";
|
||||
if (token.length > 0 && path.length > 0 && status.length > 0) {
|
||||
var request = 'token='+token+'&path='+path+'&status='+status;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'POST',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
});
|
||||
}
|
||||
|
||||
// set the snippet from gitHub
|
||||
function setSnippetGithub(key, status) {
|
||||
var message = getConfirmUpdate(status);
|
||||
UIkit.modal.confirm(message, function(){
|
||||
// will be executed on confirm.
|
||||
setSnippetGithub_server(key, status).done(function(result) {
|
||||
if (result.message) {
|
||||
UIkit.notify(result.message, {status: result.status});
|
||||
if ('success' === result.status) {
|
||||
// get key ID
|
||||
var keyID = getKeyID(key);
|
||||
// update snippet if we can
|
||||
updateSnippetDisplay(keyID, 'equal');
|
||||
}
|
||||
} else {
|
||||
UIkit.notify(Joomla.JText._('COM_COMPONENTBUILDER_SNIPPET_COULD_NOT_BE_UPDATEDSAVED'), {status:'danger'});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function setSnippetGithub_server(path, status) {
|
||||
// set the ajax scope
|
||||
ajaxcall = null;
|
||||
var getUrl = \"index.php?option=com_componentbuilder&task=ajax.setSnippetGithub&format=json\";
|
||||
if (token.length > 0 && path.length > 0 && status.length > 0) {
|
||||
var request = 'token='+token+'&path='+path+'&status='+status;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'POST',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
});
|
||||
}
|
||||
|
||||
// update the snippet display
|
||||
function updateSnippetDisplay(keyID, status) {
|
||||
// update badge
|
||||
jQuery('#'+keyID+'-badge').html('<i class=\"uk-icon-info\"></i> ' +status);
|
||||
jQuery('#'+keyID+'-badge').attr('href' , '#'+status+'-meaning');
|
||||
// update button
|
||||
if ('equal' === status) {
|
||||
// update notice
|
||||
jQuery('#'+keyID+'-getbutton').attr('title', Joomla.JText._('COM_COMPONENTBUILDER_NO_NEED_TO_GET_IT_SINCE_IT_IS_ALREADY_IN_SYNC_WITH_YOUR_LOCAL_VERSION'));
|
||||
jQuery('#'+keyID+'-getbutton').prop('disabled', true);
|
||||
jQuery('#'+keyID+'-getbutton').html('<i class=\"uk-icon-check-square-o\"></i> ' + Joomla.JText._('COM_COMPONENTBUILDER_LOCAL_SNIPPET'));
|
||||
// counter delay just incase
|
||||
setTimeout(function(){
|
||||
jQuery('#'+keyID+'-getbutton').prop('disabled', true);
|
||||
}, 2000);
|
||||
}
|
||||
// update the data filter
|
||||
jQuery('#'+keyID+'-panel').attr('data-uk-filter', status);
|
||||
// tell the grid to update
|
||||
jQuery('#snippets-grid').trigger('display.uk.check');
|
||||
}
|
||||
|
||||
// set the modal
|
||||
function getSnippetModal(key, type) {
|
||||
// set the ajax scope
|
||||
ajaxcall = 'snippets';
|
||||
var _snippet = jQuery.jStorage.get(key, null);
|
||||
if (_snippet) {
|
||||
// show modal
|
||||
showSnippetModal(_snippet, type);
|
||||
} else {
|
||||
jQuery.get('https://raw.githubusercontent.com/vdm-io/Joomla-Component-Builder-Snippets/master/'+key)
|
||||
.success(function(snippet) {
|
||||
// convert the string to json.object
|
||||
snippet = jQuery.parseJSON(snippet);
|
||||
jQuery.jStorage.set(key, snippet, {TTL: expire});
|
||||
// show modal
|
||||
showSnippetModal(snippet, type);
|
||||
})
|
||||
.error(function(jqXHR, textStatus, errorThrown) {
|
||||
// we could do more
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// show the modal
|
||||
function showSnippetModal(snippet, type) {
|
||||
var html = '<div class=\"uk-modal-dialog uk-modal-dialog-lightbox\">';
|
||||
html += '<a href=\"\" class=\"uk-modal-close uk-close uk-close-alt\"></a>';
|
||||
html += '<h3>' + snippet.library + ' - (' + snippet.type + ') ' + snippet.name + '</h3>';
|
||||
if ('contributor' === type) {
|
||||
html += '<dl class=\"uk-description-list-line\">';
|
||||
html += '<dt><i class=\"uk-icon-institution\"></i> '+Joomla.JText._('COM_COMPONENTBUILDER_COMPANY_NAME')+'</dt>';
|
||||
html += '<dd>'+snippet.contributor_company+'</dd>';
|
||||
html += '<dt><i class=\"uk-icon-user\"></i> '+Joomla.JText._('COM_COMPONENTBUILDER_AUTHOR_NAME')+'</dt>';
|
||||
html += '<dd>'+snippet.contributor_name+'</dd>';
|
||||
html += '<dt><i class=\"uk-icon-envelope-o\"></i> '+Joomla.JText._('COM_COMPONENTBUILDER_AUTHOR_EMAIL')+'</dt>';
|
||||
html += '<dd>'+snippet.contributor_email+'</dd>';
|
||||
html += '<dt><i class=\"uk-icon-laptop\"></i> '+Joomla.JText._('COM_COMPONENTBUILDER_AUTHOR_WEBSITE')+'</dt>';
|
||||
html += '<dd>'+snippet.contributor_website+'</dd>';
|
||||
html += '</dl>';
|
||||
} else {
|
||||
html += '<br /><textarea class=\"uk-width-1-1\" rows=\"15\" readonly>'+snippet[type]+'</textarea>';
|
||||
}
|
||||
html += '<br /><small>C: ' + snippet.created + ' | M: ' + snippet.modified + '</small>';
|
||||
html += '</div>';
|
||||
// get current page position
|
||||
var scroll = jQuery(window).scrollTop();
|
||||
// add html to modal
|
||||
var modal = UIkit.modal.blockUI(html, {center:true, bgclose:true}).on({
|
||||
'hide.uk.modal': function(){
|
||||
// scroll fix since the modal pops to the top of the page
|
||||
jQuery(window).scrollTop(scroll);
|
||||
}
|
||||
});
|
||||
// show modal
|
||||
modal.show();
|
||||
}
|
||||
|
||||
// get key ID
|
||||
function getKeyID(key) {
|
||||
// get useful ID
|
||||
var keyID = key.replace('-', '');
|
||||
keyID = keyID.replace('.json', '');
|
||||
keyID = keyID.replace(/\s+/ig, '-');
|
||||
keyID = keyID.replace(/\(/g, '');
|
||||
keyID = keyID.replace(/\)/g, '');
|
||||
// return the id build
|
||||
return keyID;
|
||||
}
|
||||
");
|
||||
}
|
||||
// add the document default css file
|
||||
$this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_componentbuilder/assets/css/get_snippets.css');
|
||||
}
|
||||
|
||||
/**
|
||||
* Setting the toolbar
|
||||
@ -781,12 +264,12 @@ class ComponentbuilderViewGet_snippets extends JViewLegacy
|
||||
protected function addToolBar()
|
||||
{
|
||||
// hide the main menu
|
||||
$this->app->input->set('hidemainmenu', true);
|
||||
$this->app->input->set('hidemainmenu', true);
|
||||
// add title to the page
|
||||
JToolbarHelper::title(JText::_('COM_COMPONENTBUILDER_GET_SNIPPETS'),'search');
|
||||
// add the back button
|
||||
// JToolBarHelper::custom('get_snippets.back', 'undo-2', '', 'COM_COMPONENTBUILDER_BACK', false);
|
||||
// add cpanel button
|
||||
// add the back button
|
||||
// JToolBarHelper::custom('get_snippets.back', 'undo-2', '', 'COM_COMPONENTBUILDER_BACK', false);
|
||||
// add cpanel button
|
||||
JToolBarHelper::custom('get_snippets.dashboard', 'grid-2', '', 'COM_COMPONENTBUILDER_DASH', false);
|
||||
if ($this->canDo->get('get_snippets.custom_admin_views'))
|
||||
{
|
||||
@ -820,20 +303,20 @@ class ComponentbuilderViewGet_snippets extends JViewLegacy
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('get_snippets');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('get_snippets');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -842,7 +325,7 @@ class ComponentbuilderViewGet_snippets extends JViewLegacy
|
||||
*/
|
||||
public function escape($var)
|
||||
{
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
}
|
||||
|
@ -127,63 +127,33 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_location listeners for location_vvvvwam function
|
||||
// #jform_location listeners for location_vvvvwao function
|
||||
jQuery('#jform_location').on('keyup',function()
|
||||
{
|
||||
var location_vvvvwam = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
vvvvwam(location_vvvvwam);
|
||||
var location_vvvvwao = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
vvvvwao(location_vvvvwao);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_location',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var location_vvvvwam = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
vvvvwam(location_vvvvwam);
|
||||
var location_vvvvwao = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
vvvvwao(location_vvvvwao);
|
||||
|
||||
});
|
||||
|
||||
// #jform_location listeners for location_vvvvwan function
|
||||
// #jform_location listeners for location_vvvvwap function
|
||||
jQuery('#jform_location').on('keyup',function()
|
||||
{
|
||||
var location_vvvvwan = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
vvvvwan(location_vvvvwan);
|
||||
var location_vvvvwap = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
vvvvwap(location_vvvvwap);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_location',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var location_vvvvwan = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
vvvvwan(location_vvvvwan);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_vvvvwao function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_vvvvwao = jQuery("#jform_type").val();
|
||||
vvvvwao(type_vvvvwao);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_vvvvwao = jQuery("#jform_type").val();
|
||||
vvvvwao(type_vvvvwao);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_vvvvwap function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_vvvvwap = jQuery("#jform_type").val();
|
||||
vvvvwap(type_vvvvwap);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_vvvvwap = jQuery("#jform_type").val();
|
||||
vvvvwap(type_vvvvwap);
|
||||
var location_vvvvwap = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
vvvvwap(location_vvvvwap);
|
||||
|
||||
});
|
||||
|
||||
@ -202,18 +172,48 @@ jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
|
||||
});
|
||||
|
||||
// #jform_target listeners for target_vvvvwar function
|
||||
// #jform_type listeners for type_vvvvwar function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_vvvvwar = jQuery("#jform_type").val();
|
||||
vvvvwar(type_vvvvwar);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_vvvvwar = jQuery("#jform_type").val();
|
||||
vvvvwar(type_vvvvwar);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_vvvvwas function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_vvvvwas = jQuery("#jform_type").val();
|
||||
vvvvwas(type_vvvvwas);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_vvvvwas = jQuery("#jform_type").val();
|
||||
vvvvwas(type_vvvvwas);
|
||||
|
||||
});
|
||||
|
||||
// #jform_target listeners for target_vvvvwat function
|
||||
jQuery('#jform_target').on('keyup',function()
|
||||
{
|
||||
var target_vvvvwar = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvwar(target_vvvvwar);
|
||||
var target_vvvvwat = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvwat(target_vvvvwat);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_target',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var target_vvvvwar = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvwar(target_vvvvwar);
|
||||
var target_vvvvwat = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvwat(target_vvvvwat);
|
||||
|
||||
});
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewHelp_document extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewHelp_document extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewHelp_document extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('help_document');
|
||||
$this->canEdit = $this->canDo->get('help_document.edit');
|
||||
$this->canState = $this->canDo->get('help_document.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,96 +93,96 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_HELP_DOCUMENTS'), 'support');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=help_documents');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('help_document.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('help_document.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('help_document.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('help_documents.publish');
|
||||
JToolBarHelper::unpublishList('help_documents.unpublish');
|
||||
JToolBarHelper::archiveList('help_documents.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('help_documents.publish');
|
||||
JToolBarHelper::unpublishList('help_documents.unpublish');
|
||||
JToolBarHelper::archiveList('help_documents.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('help_documents.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('help_documents.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'help_documents.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('help_documents.trash');
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'help_documents.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('help_documents.trash');
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.export') && $this->canDo->get('help_document.export'))
|
||||
{
|
||||
JToolBarHelper::custom('help_documents.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('help_document.import'))
|
||||
{
|
||||
JToolBarHelper::custom('help_documents.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false);
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('help_documents');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('help_documents');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -195,11 +194,11 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Set Type Selection
|
||||
$this->typeOptions = $this->getTheTypeSelections();
|
||||
@ -305,7 +304,7 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/help_documents.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -316,10 +315,10 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -340,7 +339,7 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy
|
||||
'h.' => JText::_('COM_COMPONENTBUILDER_HELP_DOCUMENT_SITE_VIEW_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
protected function getTheTypeSelections()
|
||||
{
|
||||
|
@ -101,10 +101,10 @@ class ComponentbuilderViewImport extends JViewLegacy
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('import');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('import');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -164,10 +164,10 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('import_joomla_components');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('import_joomla_components');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewJoomla_component extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->vwmtranslation = $this->get('Vwmtranslation');
|
||||
@ -166,7 +166,7 @@ class ComponentbuilderViewJoomla_component extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -180,7 +180,7 @@ class ComponentbuilderViewJoomla_component extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('joomla_component');
|
||||
$this->canEdit = $this->canDo->get('joomla_component.edit');
|
||||
$this->canState = $this->canDo->get('joomla_component.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,46 +93,46 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENTS'), 'joomla');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=joomla_components');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('joomla_component.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('joomla_component.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('joomla_component.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('joomla_components.publish');
|
||||
JToolBarHelper::unpublishList('joomla_components.unpublish');
|
||||
JToolBarHelper::archiveList('joomla_components.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('joomla_components.publish');
|
||||
JToolBarHelper::unpublishList('joomla_components.unpublish');
|
||||
JToolBarHelper::archiveList('joomla_components.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('joomla_components.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('joomla_components.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
if ($this->user->authorise('joomla_component.export_components', 'com_componentbuilder'))
|
||||
{
|
||||
// add Export Components button.
|
||||
@ -145,20 +144,20 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
|
||||
JToolBarHelper::custom('joomla_components.backup', 'archive', '', 'COM_COMPONENTBUILDER_BACKUP', false);
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'joomla_components.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('joomla_components.trash');
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'joomla_components.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('joomla_components.trash');
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.export') && $this->canDo->get('joomla_component.export'))
|
||||
{
|
||||
JToolBarHelper::custom('joomla_components.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($this->user->authorise('joomla_component.import_components', 'com_componentbuilder'))
|
||||
{
|
||||
// add Import Components button.
|
||||
@ -170,35 +169,35 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
|
||||
JToolBarHelper::custom('joomla_components.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false);
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('joomla_components');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('joomla_components');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -210,11 +209,11 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Set Companyname Selection
|
||||
$this->companynameOptions = $this->getTheCompanynameSelections();
|
||||
@ -276,7 +275,7 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/joomla_components.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -287,10 +286,10 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -312,7 +311,7 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
|
||||
'a.author' => JText::_('COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
protected function getTheCompanynameSelections()
|
||||
{
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewLanguage extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewLanguage extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewLanguage extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewLanguage_translation extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewLanguage_translation extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewLanguage_translation extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewLanguage_translations extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('language_translation');
|
||||
$this->canEdit = $this->canDo->get('language_translation.edit');
|
||||
$this->canState = $this->canDo->get('language_translation.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewLanguage_translations extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,96 +93,96 @@ class ComponentbuilderViewLanguage_translations extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_LANGUAGE_TRANSLATIONS'), 'comments-2');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=language_translations');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('language_translation.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('language_translation.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('language_translation.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('language_translations.publish');
|
||||
JToolBarHelper::unpublishList('language_translations.unpublish');
|
||||
JToolBarHelper::archiveList('language_translations.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('language_translations.publish');
|
||||
JToolBarHelper::unpublishList('language_translations.unpublish');
|
||||
JToolBarHelper::archiveList('language_translations.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('language_translations.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('language_translations.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'language_translations.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('language_translations.trash');
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'language_translations.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('language_translations.trash');
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.export') && $this->canDo->get('language_translation.export'))
|
||||
{
|
||||
JToolBarHelper::custom('language_translations.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('language_translation.import'))
|
||||
{
|
||||
JToolBarHelper::custom('language_translations.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false);
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('language_translations');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('language_translations');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -195,11 +194,11 @@ class ComponentbuilderViewLanguage_translations extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -217,7 +216,7 @@ class ComponentbuilderViewLanguage_translations extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/language_translations.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -228,10 +227,10 @@ class ComponentbuilderViewLanguage_translations extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -248,5 +247,5 @@ class ComponentbuilderViewLanguage_translations extends JViewLegacy
|
||||
'a.entranslation' => JText::_('COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_ENTRANSLATION_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewLanguages extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('language');
|
||||
$this->canEdit = $this->canDo->get('language.edit');
|
||||
$this->canState = $this->canDo->get('language.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewLanguages extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,96 +93,96 @@ class ComponentbuilderViewLanguages extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_LANGUAGES'), 'comment');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=languages');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('language.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('language.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('language.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('languages.publish');
|
||||
JToolBarHelper::unpublishList('languages.unpublish');
|
||||
JToolBarHelper::archiveList('languages.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('languages.publish');
|
||||
JToolBarHelper::unpublishList('languages.unpublish');
|
||||
JToolBarHelper::archiveList('languages.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('languages.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('languages.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'languages.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('languages.trash');
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'languages.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('languages.trash');
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.export') && $this->canDo->get('language.export'))
|
||||
{
|
||||
JToolBarHelper::custom('languages.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('language.import'))
|
||||
{
|
||||
JToolBarHelper::custom('languages.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false);
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('languages');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('languages');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -195,11 +194,11 @@ class ComponentbuilderViewLanguages extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -217,7 +216,7 @@ class ComponentbuilderViewLanguages extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/languages.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -228,10 +227,10 @@ class ComponentbuilderViewLanguages extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -249,5 +248,5 @@ class ComponentbuilderViewLanguages extends JViewLegacy
|
||||
'a.langtag' => JText::_('COM_COMPONENTBUILDER_LANGUAGE_LANGTAG_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -139,18 +139,18 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_add_php_view listeners for add_php_view_vvvvvyt function
|
||||
// #jform_add_php_view listeners for add_php_view_vvvvvyv function
|
||||
jQuery('#jform_add_php_view').on('keyup',function()
|
||||
{
|
||||
var add_php_view_vvvvvyt = jQuery("#jform_add_php_view input[type='radio']:checked").val();
|
||||
vvvvvyt(add_php_view_vvvvvyt);
|
||||
var add_php_view_vvvvvyv = jQuery("#jform_add_php_view input[type='radio']:checked").val();
|
||||
vvvvvyv(add_php_view_vvvvvyv);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_php_view',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_php_view_vvvvvyt = jQuery("#jform_add_php_view input[type='radio']:checked").val();
|
||||
vvvvvyt(add_php_view_vvvvvyt);
|
||||
var add_php_view_vvvvvyv = jQuery("#jform_add_php_view input[type='radio']:checked").val();
|
||||
vvvvvyv(add_php_view_vvvvvyv);
|
||||
|
||||
});
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewLayout extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewLayout extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewLayout extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewLayouts extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('layout');
|
||||
$this->canEdit = $this->canDo->get('core.edit');
|
||||
$this->canState = $this->canDo->get('core.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewLayouts extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,61 +93,61 @@ class ComponentbuilderViewLayouts extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_LAYOUTS'), 'brush');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=layouts');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('layout.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('layout.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('layout.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('layouts.publish');
|
||||
JToolBarHelper::unpublishList('layouts.unpublish');
|
||||
JToolBarHelper::archiveList('layouts.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('layouts.publish');
|
||||
JToolBarHelper::unpublishList('layouts.unpublish');
|
||||
JToolBarHelper::archiveList('layouts.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('layouts.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('layouts.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'layouts.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('layouts.trash');
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'layouts.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('layouts.trash');
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.export') && $this->canDo->get('layout.export'))
|
||||
{
|
||||
JToolBarHelper::custom('layouts.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($this->user->authorise('layout.get_snippets', 'com_componentbuilder'))
|
||||
{
|
||||
// add Get Snippets button.
|
||||
@ -160,35 +159,35 @@ class ComponentbuilderViewLayouts extends JViewLegacy
|
||||
JToolBarHelper::custom('layouts.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false);
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('layouts');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('layouts');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -200,11 +199,11 @@ class ComponentbuilderViewLayouts extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Set Dynamic Get Name Selection
|
||||
$this->dynamic_getNameOptions = JFormHelper::loadFieldType('Dynamicget')->getOptions();
|
||||
@ -244,7 +243,7 @@ class ComponentbuilderViewLayouts extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/layouts.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -255,10 +254,10 @@ class ComponentbuilderViewLayouts extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -278,5 +277,5 @@ class ComponentbuilderViewLayouts extends JViewLegacy
|
||||
'g.name' => JText::_('COM_COMPONENTBUILDER_LAYOUT_DYNAMIC_GET_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewLibraries extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('library');
|
||||
$this->canEdit = $this->canDo->get('library.edit');
|
||||
$this->canState = $this->canDo->get('library.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewLibraries extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,91 +93,91 @@ class ComponentbuilderViewLibraries extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_LIBRARIES'), 'puzzle');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=libraries');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('library.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('library.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('library.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('libraries.publish');
|
||||
JToolBarHelper::unpublishList('libraries.unpublish');
|
||||
JToolBarHelper::archiveList('libraries.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('libraries.publish');
|
||||
JToolBarHelper::unpublishList('libraries.unpublish');
|
||||
JToolBarHelper::archiveList('libraries.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('libraries.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('libraries.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'libraries.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('libraries.trash');
|
||||
}
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'libraries.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('libraries.trash');
|
||||
}
|
||||
}
|
||||
if ($this->user->authorise('library.get_snippets', 'com_componentbuilder'))
|
||||
{
|
||||
// add Get Snippets button.
|
||||
JToolBarHelper::custom('libraries.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('libraries');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('libraries');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -190,11 +189,11 @@ class ComponentbuilderViewLibraries extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Set How Selection
|
||||
$this->howOptions = JFormHelper::loadFieldType('Filebehaviour')->getOptions();
|
||||
@ -256,7 +255,7 @@ class ComponentbuilderViewLibraries extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/libraries.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -267,10 +266,10 @@ class ComponentbuilderViewLibraries extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -289,7 +288,7 @@ class ComponentbuilderViewLibraries extends JViewLegacy
|
||||
'a.type' => JText::_('COM_COMPONENTBUILDER_LIBRARY_TYPE_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
protected function getTheTypeSelections()
|
||||
{
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewLibraries_config extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('library_config');
|
||||
$this->canEdit = $this->canDo->get('library_config.edit');
|
||||
$this->canState = $this->canDo->get('library_config.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewLibraries_config extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,86 +93,86 @@ class ComponentbuilderViewLibraries_config extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_LIBRARIES_CONFIG'), 'joomla');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=libraries_config');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('library_config.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('library_config.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('library_config.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('libraries_config.publish');
|
||||
JToolBarHelper::unpublishList('libraries_config.unpublish');
|
||||
JToolBarHelper::archiveList('libraries_config.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('libraries_config.publish');
|
||||
JToolBarHelper::unpublishList('libraries_config.unpublish');
|
||||
JToolBarHelper::archiveList('libraries_config.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('libraries_config.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('libraries_config.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'libraries_config.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('libraries_config.trash');
|
||||
}
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'libraries_config.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('libraries_config.trash');
|
||||
}
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('libraries_config');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('libraries_config');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -185,11 +184,11 @@ class ComponentbuilderViewLibraries_config extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -207,7 +206,7 @@ class ComponentbuilderViewLibraries_config extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/libraries_config.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -218,10 +217,10 @@ class ComponentbuilderViewLibraries_config extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -237,5 +236,5 @@ class ComponentbuilderViewLibraries_config extends JViewLegacy
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewLibraries_files_folders_urls extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('library_files_folders_urls');
|
||||
$this->canEdit = $this->canDo->get('library_files_folders_urls.edit');
|
||||
$this->canState = $this->canDo->get('library_files_folders_urls.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewLibraries_files_folders_urls extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,86 +93,86 @@ class ComponentbuilderViewLibraries_files_folders_urls extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_LIBRARIES_FILES_FOLDERS_URLS'), 'joomla');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=libraries_files_folders_urls');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('library_files_folders_urls.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('library_files_folders_urls.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('library_files_folders_urls.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('libraries_files_folders_urls.publish');
|
||||
JToolBarHelper::unpublishList('libraries_files_folders_urls.unpublish');
|
||||
JToolBarHelper::archiveList('libraries_files_folders_urls.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('libraries_files_folders_urls.publish');
|
||||
JToolBarHelper::unpublishList('libraries_files_folders_urls.unpublish');
|
||||
JToolBarHelper::archiveList('libraries_files_folders_urls.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('libraries_files_folders_urls.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('libraries_files_folders_urls.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'libraries_files_folders_urls.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('libraries_files_folders_urls.trash');
|
||||
}
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'libraries_files_folders_urls.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('libraries_files_folders_urls.trash');
|
||||
}
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('libraries_files_folders_urls');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('libraries_files_folders_urls');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -185,11 +184,11 @@ class ComponentbuilderViewLibraries_files_folders_urls extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -207,7 +206,7 @@ class ComponentbuilderViewLibraries_files_folders_urls extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/libraries_files_folders_urls.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -218,10 +217,10 @@ class ComponentbuilderViewLibraries_files_folders_urls extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -237,5 +236,5 @@ class ComponentbuilderViewLibraries_files_folders_urls extends JViewLegacy
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -147,36 +147,6 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_how listeners for how_vvvvvzu function
|
||||
jQuery('#jform_how').on('keyup',function()
|
||||
{
|
||||
var how_vvvvvzu = jQuery("#jform_how").val();
|
||||
vvvvvzu(how_vvvvvzu);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_how',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var how_vvvvvzu = jQuery("#jform_how").val();
|
||||
vvvvvzu(how_vvvvvzu);
|
||||
|
||||
});
|
||||
|
||||
// #jform_how listeners for how_vvvvvzv function
|
||||
jQuery('#jform_how').on('keyup',function()
|
||||
{
|
||||
var how_vvvvvzv = jQuery("#jform_how").val();
|
||||
vvvvvzv(how_vvvvvzv);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_how',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var how_vvvvvzv = jQuery("#jform_how").val();
|
||||
vvvvvzv(how_vvvvvzv);
|
||||
|
||||
});
|
||||
|
||||
// #jform_how listeners for how_vvvvvzw function
|
||||
jQuery('#jform_how').on('keyup',function()
|
||||
{
|
||||
@ -252,18 +222,48 @@ jQuery('#adminForm').on('change', '#jform_how',function (e)
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_vvvvwab function
|
||||
// #jform_how listeners for how_vvvvwab function
|
||||
jQuery('#jform_how').on('keyup',function()
|
||||
{
|
||||
var how_vvvvwab = jQuery("#jform_how").val();
|
||||
vvvvwab(how_vvvvwab);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_how',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var how_vvvvwab = jQuery("#jform_how").val();
|
||||
vvvvwab(how_vvvvwab);
|
||||
|
||||
});
|
||||
|
||||
// #jform_how listeners for how_vvvvwac function
|
||||
jQuery('#jform_how').on('keyup',function()
|
||||
{
|
||||
var how_vvvvwac = jQuery("#jform_how").val();
|
||||
vvvvwac(how_vvvvwac);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_how',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var how_vvvvwac = jQuery("#jform_how").val();
|
||||
vvvvwac(how_vvvvwac);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_vvvvwad function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_vvvvwab = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvwab(type_vvvvwab);
|
||||
var type_vvvvwad = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvwad(type_vvvvwad);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_vvvvwab = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvwab(type_vvvvwab);
|
||||
var type_vvvvwad = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvwad(type_vvvvwad);
|
||||
|
||||
});
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewLibrary extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewLibrary extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewLibrary extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewLibrary_config extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewLibrary_config extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewLibrary_config extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewLibrary_files_folders_urls extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewLibrary_files_folders_urls extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewLibrary_files_folders_urls extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -166,153 +166,168 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_add_php_view listeners for add_php_view_vvvvvyi function
|
||||
// #jform_add_php_view listeners for add_php_view_vvvvvyj function
|
||||
jQuery('#jform_add_php_view').on('keyup',function()
|
||||
{
|
||||
var add_php_view_vvvvvyi = jQuery("#jform_add_php_view input[type='radio']:checked").val();
|
||||
vvvvvyi(add_php_view_vvvvvyi);
|
||||
var add_php_view_vvvvvyj = jQuery("#jform_add_php_view input[type='radio']:checked").val();
|
||||
vvvvvyj(add_php_view_vvvvvyj);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_php_view',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_php_view_vvvvvyi = jQuery("#jform_add_php_view input[type='radio']:checked").val();
|
||||
vvvvvyi(add_php_view_vvvvvyi);
|
||||
var add_php_view_vvvvvyj = jQuery("#jform_add_php_view input[type='radio']:checked").val();
|
||||
vvvvvyj(add_php_view_vvvvvyj);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_php_jview_display listeners for add_php_jview_display_vvvvvyj function
|
||||
// #jform_add_php_jview_display listeners for add_php_jview_display_vvvvvyk function
|
||||
jQuery('#jform_add_php_jview_display').on('keyup',function()
|
||||
{
|
||||
var add_php_jview_display_vvvvvyj = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val();
|
||||
vvvvvyj(add_php_jview_display_vvvvvyj);
|
||||
var add_php_jview_display_vvvvvyk = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val();
|
||||
vvvvvyk(add_php_jview_display_vvvvvyk);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_php_jview_display',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_php_jview_display_vvvvvyj = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val();
|
||||
vvvvvyj(add_php_jview_display_vvvvvyj);
|
||||
var add_php_jview_display_vvvvvyk = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val();
|
||||
vvvvvyk(add_php_jview_display_vvvvvyk);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_php_jview listeners for add_php_jview_vvvvvyk function
|
||||
// #jform_add_php_jview listeners for add_php_jview_vvvvvyl function
|
||||
jQuery('#jform_add_php_jview').on('keyup',function()
|
||||
{
|
||||
var add_php_jview_vvvvvyk = jQuery("#jform_add_php_jview input[type='radio']:checked").val();
|
||||
vvvvvyk(add_php_jview_vvvvvyk);
|
||||
var add_php_jview_vvvvvyl = jQuery("#jform_add_php_jview input[type='radio']:checked").val();
|
||||
vvvvvyl(add_php_jview_vvvvvyl);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_php_jview',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_php_jview_vvvvvyk = jQuery("#jform_add_php_jview input[type='radio']:checked").val();
|
||||
vvvvvyk(add_php_jview_vvvvvyk);
|
||||
var add_php_jview_vvvvvyl = jQuery("#jform_add_php_jview input[type='radio']:checked").val();
|
||||
vvvvvyl(add_php_jview_vvvvvyl);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_php_document listeners for add_php_document_vvvvvyl function
|
||||
// #jform_add_php_document listeners for add_php_document_vvvvvym function
|
||||
jQuery('#jform_add_php_document').on('keyup',function()
|
||||
{
|
||||
var add_php_document_vvvvvyl = jQuery("#jform_add_php_document input[type='radio']:checked").val();
|
||||
vvvvvyl(add_php_document_vvvvvyl);
|
||||
var add_php_document_vvvvvym = jQuery("#jform_add_php_document input[type='radio']:checked").val();
|
||||
vvvvvym(add_php_document_vvvvvym);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_php_document',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_php_document_vvvvvyl = jQuery("#jform_add_php_document input[type='radio']:checked").val();
|
||||
vvvvvyl(add_php_document_vvvvvyl);
|
||||
var add_php_document_vvvvvym = jQuery("#jform_add_php_document input[type='radio']:checked").val();
|
||||
vvvvvym(add_php_document_vvvvvym);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_css_document listeners for add_css_document_vvvvvym function
|
||||
// #jform_add_css_document listeners for add_css_document_vvvvvyn function
|
||||
jQuery('#jform_add_css_document').on('keyup',function()
|
||||
{
|
||||
var add_css_document_vvvvvym = jQuery("#jform_add_css_document input[type='radio']:checked").val();
|
||||
vvvvvym(add_css_document_vvvvvym);
|
||||
var add_css_document_vvvvvyn = jQuery("#jform_add_css_document input[type='radio']:checked").val();
|
||||
vvvvvyn(add_css_document_vvvvvyn);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_css_document',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_css_document_vvvvvym = jQuery("#jform_add_css_document input[type='radio']:checked").val();
|
||||
vvvvvym(add_css_document_vvvvvym);
|
||||
var add_css_document_vvvvvyn = jQuery("#jform_add_css_document input[type='radio']:checked").val();
|
||||
vvvvvyn(add_css_document_vvvvvyn);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_js_document listeners for add_js_document_vvvvvyn function
|
||||
// #jform_add_javascript_file listeners for add_javascript_file_vvvvvyo function
|
||||
jQuery('#jform_add_javascript_file').on('keyup',function()
|
||||
{
|
||||
var add_javascript_file_vvvvvyo = jQuery("#jform_add_javascript_file input[type='radio']:checked").val();
|
||||
vvvvvyo(add_javascript_file_vvvvvyo);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_javascript_file',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_javascript_file_vvvvvyo = jQuery("#jform_add_javascript_file input[type='radio']:checked").val();
|
||||
vvvvvyo(add_javascript_file_vvvvvyo);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_js_document listeners for add_js_document_vvvvvyp function
|
||||
jQuery('#jform_add_js_document').on('keyup',function()
|
||||
{
|
||||
var add_js_document_vvvvvyn = jQuery("#jform_add_js_document input[type='radio']:checked").val();
|
||||
vvvvvyn(add_js_document_vvvvvyn);
|
||||
var add_js_document_vvvvvyp = jQuery("#jform_add_js_document input[type='radio']:checked").val();
|
||||
vvvvvyp(add_js_document_vvvvvyp);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_js_document',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_js_document_vvvvvyn = jQuery("#jform_add_js_document input[type='radio']:checked").val();
|
||||
vvvvvyn(add_js_document_vvvvvyn);
|
||||
var add_js_document_vvvvvyp = jQuery("#jform_add_js_document input[type='radio']:checked").val();
|
||||
vvvvvyp(add_js_document_vvvvvyp);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_css listeners for add_css_vvvvvyo function
|
||||
// #jform_add_css listeners for add_css_vvvvvyq function
|
||||
jQuery('#jform_add_css').on('keyup',function()
|
||||
{
|
||||
var add_css_vvvvvyo = jQuery("#jform_add_css input[type='radio']:checked").val();
|
||||
vvvvvyo(add_css_vvvvvyo);
|
||||
var add_css_vvvvvyq = jQuery("#jform_add_css input[type='radio']:checked").val();
|
||||
vvvvvyq(add_css_vvvvvyq);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_css',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_css_vvvvvyo = jQuery("#jform_add_css input[type='radio']:checked").val();
|
||||
vvvvvyo(add_css_vvvvvyo);
|
||||
var add_css_vvvvvyq = jQuery("#jform_add_css input[type='radio']:checked").val();
|
||||
vvvvvyq(add_css_vvvvvyq);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_php_ajax listeners for add_php_ajax_vvvvvyp function
|
||||
// #jform_add_php_ajax listeners for add_php_ajax_vvvvvyr function
|
||||
jQuery('#jform_add_php_ajax').on('keyup',function()
|
||||
{
|
||||
var add_php_ajax_vvvvvyp = jQuery("#jform_add_php_ajax input[type='radio']:checked").val();
|
||||
vvvvvyp(add_php_ajax_vvvvvyp);
|
||||
var add_php_ajax_vvvvvyr = jQuery("#jform_add_php_ajax input[type='radio']:checked").val();
|
||||
vvvvvyr(add_php_ajax_vvvvvyr);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_php_ajax',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_php_ajax_vvvvvyp = jQuery("#jform_add_php_ajax input[type='radio']:checked").val();
|
||||
vvvvvyp(add_php_ajax_vvvvvyp);
|
||||
var add_php_ajax_vvvvvyr = jQuery("#jform_add_php_ajax input[type='radio']:checked").val();
|
||||
vvvvvyr(add_php_ajax_vvvvvyr);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_custom_button listeners for add_custom_button_vvvvvyq function
|
||||
// #jform_add_custom_button listeners for add_custom_button_vvvvvys function
|
||||
jQuery('#jform_add_custom_button').on('keyup',function()
|
||||
{
|
||||
var add_custom_button_vvvvvyq = jQuery("#jform_add_custom_button input[type='radio']:checked").val();
|
||||
vvvvvyq(add_custom_button_vvvvvyq);
|
||||
var add_custom_button_vvvvvys = jQuery("#jform_add_custom_button input[type='radio']:checked").val();
|
||||
vvvvvys(add_custom_button_vvvvvys);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_custom_button',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_custom_button_vvvvvyq = jQuery("#jform_add_custom_button input[type='radio']:checked").val();
|
||||
vvvvvyq(add_custom_button_vvvvvyq);
|
||||
var add_custom_button_vvvvvys = jQuery("#jform_add_custom_button input[type='radio']:checked").val();
|
||||
vvvvvys(add_custom_button_vvvvvys);
|
||||
|
||||
});
|
||||
|
||||
// #jform_button_position listeners for button_position_vvvvvyr function
|
||||
// #jform_button_position listeners for button_position_vvvvvyt function
|
||||
jQuery('#jform_button_position').on('keyup',function()
|
||||
{
|
||||
var button_position_vvvvvyr = jQuery("#jform_button_position").val();
|
||||
vvvvvyr(button_position_vvvvvyr);
|
||||
var button_position_vvvvvyt = jQuery("#jform_button_position").val();
|
||||
vvvvvyt(button_position_vvvvvyt);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_button_position',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var button_position_vvvvvyr = jQuery("#jform_button_position").val();
|
||||
vvvvvyr(button_position_vvvvvyr);
|
||||
var button_position_vvvvvyt = jQuery("#jform_button_position").val();
|
||||
vvvvvyt(button_position_vvvvvyt);
|
||||
|
||||
});
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewSite_view extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewSite_view extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewSite_view extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewSite_views extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('site_view');
|
||||
$this->canEdit = $this->canDo->get('core.edit');
|
||||
$this->canState = $this->canDo->get('core.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewSite_views extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,61 +93,61 @@ class ComponentbuilderViewSite_views extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_SITE_VIEWS'), 'palette');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=site_views');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('site_view.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('site_view.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('site_view.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('site_views.publish');
|
||||
JToolBarHelper::unpublishList('site_views.unpublish');
|
||||
JToolBarHelper::archiveList('site_views.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('site_views.publish');
|
||||
JToolBarHelper::unpublishList('site_views.unpublish');
|
||||
JToolBarHelper::archiveList('site_views.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('site_views.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('site_views.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'site_views.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('site_views.trash');
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'site_views.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('site_views.trash');
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.export') && $this->canDo->get('site_view.export'))
|
||||
{
|
||||
JToolBarHelper::custom('site_views.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($this->user->authorise('site_view.get_snippets', 'com_componentbuilder'))
|
||||
{
|
||||
// add Get Snippets button.
|
||||
@ -160,35 +159,35 @@ class ComponentbuilderViewSite_views extends JViewLegacy
|
||||
JToolBarHelper::custom('site_views.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false);
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('site_views');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('site_views');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -200,11 +199,11 @@ class ComponentbuilderViewSite_views extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -222,7 +221,7 @@ class ComponentbuilderViewSite_views extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/site_views.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -233,10 +232,10 @@ class ComponentbuilderViewSite_views extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -256,5 +255,5 @@ class ComponentbuilderViewSite_views extends JViewLegacy
|
||||
'a.description' => JText::_('COM_COMPONENTBUILDER_SITE_VIEW_DESCRIPTION_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewSnippet extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewSnippet extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewSnippet extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewSnippet_type extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewSnippet_type extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewSnippet_type extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewSnippet_types extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('snippet_type');
|
||||
$this->canEdit = $this->canDo->get('snippet_type.edit');
|
||||
$this->canState = $this->canDo->get('snippet_type.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewSnippet_types extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,86 +93,86 @@ class ComponentbuilderViewSnippet_types extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_SNIPPET_TYPES'), 'joomla');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=snippet_types');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('snippet_type.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('snippet_type.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('snippet_type.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('snippet_types.publish');
|
||||
JToolBarHelper::unpublishList('snippet_types.unpublish');
|
||||
JToolBarHelper::archiveList('snippet_types.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('snippet_types.publish');
|
||||
JToolBarHelper::unpublishList('snippet_types.unpublish');
|
||||
JToolBarHelper::archiveList('snippet_types.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('snippet_types.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('snippet_types.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'snippet_types.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('snippet_types.trash');
|
||||
}
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'snippet_types.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('snippet_types.trash');
|
||||
}
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('snippet_types');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('snippet_types');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -185,11 +184,11 @@ class ComponentbuilderViewSnippet_types extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -207,7 +206,7 @@ class ComponentbuilderViewSnippet_types extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/snippet_types.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -218,10 +217,10 @@ class ComponentbuilderViewSnippet_types extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -239,5 +238,5 @@ class ComponentbuilderViewSnippet_types extends JViewLegacy
|
||||
'a.description' => JText::_('COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewSnippets extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('snippet');
|
||||
$this->canEdit = $this->canDo->get('core.edit');
|
||||
$this->canState = $this->canDo->get('core.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewSnippets extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,66 +93,66 @@ class ComponentbuilderViewSnippets extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_SNIPPETS'), 'pin');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=snippets');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('snippet.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('snippet.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('snippet.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('snippets.publish');
|
||||
JToolBarHelper::unpublishList('snippets.unpublish');
|
||||
JToolBarHelper::archiveList('snippets.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('snippets.publish');
|
||||
JToolBarHelper::unpublishList('snippets.unpublish');
|
||||
JToolBarHelper::archiveList('snippets.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('snippets.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('snippets.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
if ($this->user->authorise('snippet.share_snippets', 'com_componentbuilder'))
|
||||
{
|
||||
// add Share Snippets button.
|
||||
JToolBarHelper::custom('snippets.shareSnippets', 'share', '', 'COM_COMPONENTBUILDER_SHARE_SNIPPETS', false);
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'snippets.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('snippets.trash');
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'snippets.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('snippets.trash');
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.export') && $this->canDo->get('snippet.export'))
|
||||
{
|
||||
JToolBarHelper::custom('snippets.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($this->user->authorise('snippet.get_snippets', 'com_componentbuilder'))
|
||||
{
|
||||
// add Get Snippets button.
|
||||
@ -165,35 +164,35 @@ class ComponentbuilderViewSnippets extends JViewLegacy
|
||||
JToolBarHelper::custom('snippets.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false);
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('snippets');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('snippets');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -205,11 +204,11 @@ class ComponentbuilderViewSnippets extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Set Type Name Selection
|
||||
$this->typeNameOptions = JFormHelper::loadFieldType('Snippettype')->getOptions();
|
||||
@ -271,7 +270,7 @@ class ComponentbuilderViewSnippets extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/snippets.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -282,10 +281,10 @@ class ComponentbuilderViewSnippets extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -306,5 +305,5 @@ class ComponentbuilderViewSnippets extends JViewLegacy
|
||||
'h.name' => JText::_('COM_COMPONENTBUILDER_SNIPPET_LIBRARY_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -139,18 +139,18 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_add_php_view listeners for add_php_view_vvvvvys function
|
||||
// #jform_add_php_view listeners for add_php_view_vvvvvyu function
|
||||
jQuery('#jform_add_php_view').on('keyup',function()
|
||||
{
|
||||
var add_php_view_vvvvvys = jQuery("#jform_add_php_view input[type='radio']:checked").val();
|
||||
vvvvvys(add_php_view_vvvvvys);
|
||||
var add_php_view_vvvvvyu = jQuery("#jform_add_php_view input[type='radio']:checked").val();
|
||||
vvvvvyu(add_php_view_vvvvvyu);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_php_view',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_php_view_vvvvvys = jQuery("#jform_add_php_view input[type='radio']:checked").val();
|
||||
vvvvvys(add_php_view_vvvvvys);
|
||||
var add_php_view_vvvvvyu = jQuery("#jform_add_php_view input[type='radio']:checked").val();
|
||||
vvvvvyu(add_php_view_vvvvvyu);
|
||||
|
||||
});
|
||||
|
||||
|
@ -53,15 +53,15 @@ class ComponentbuilderViewTemplate extends JViewLegacy
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$this->referral = '';
|
||||
if ($this->refid)
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
{
|
||||
// return to the item that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
|
||||
}
|
||||
elseif($this->ref)
|
||||
{
|
||||
// return to the list view that refered to this item
|
||||
$this->referral = '&ref='.(string)$this->ref;
|
||||
}
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
@ -163,7 +163,7 @@ class ComponentbuilderViewTemplate extends JViewLegacy
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -177,7 +177,7 @@ class ComponentbuilderViewTemplate extends JViewLegacy
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,7 @@ class ComponentbuilderViewTemplates extends JViewLegacy
|
||||
$this->user = JFactory::getUser();
|
||||
$this->listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$this->listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$this->saveOrder = $this->listOrder == 'ordering';
|
||||
// get global action permissions
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('template');
|
||||
$this->canEdit = $this->canDo->get('core.edit');
|
||||
$this->canState = $this->canDo->get('core.edit.state');
|
||||
@ -67,11 +66,11 @@ class ComponentbuilderViewTemplates extends JViewLegacy
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
// load the batch html
|
||||
if ($this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
$this->batchDisplay = JHtmlBatch_::render();
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
@ -94,61 +93,61 @@ class ComponentbuilderViewTemplates extends JViewLegacy
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_TEMPLATES'), 'brush');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=templates');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
|
||||
if ($this->canCreate)
|
||||
{
|
||||
{
|
||||
JToolBarHelper::addNew('template.add');
|
||||
}
|
||||
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
// Only load if there are items
|
||||
if (ComponentbuilderHelper::checkArray($this->items))
|
||||
{
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('template.edit');
|
||||
}
|
||||
if ($this->canEdit)
|
||||
{
|
||||
JToolBarHelper::editList('template.edit');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('templates.publish');
|
||||
JToolBarHelper::unpublishList('templates.unpublish');
|
||||
JToolBarHelper::archiveList('templates.archive');
|
||||
if ($this->canState)
|
||||
{
|
||||
JToolBarHelper::publishList('templates.publish');
|
||||
JToolBarHelper::unpublishList('templates.unpublish');
|
||||
JToolBarHelper::archiveList('templates.archive');
|
||||
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('templates.checkin');
|
||||
}
|
||||
}
|
||||
if ($this->canDo->get('core.admin'))
|
||||
{
|
||||
JToolBarHelper::checkin('templates.checkin');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
// set the batch button name
|
||||
$title = JText::_('JTOOLBAR_BATCH');
|
||||
// Instantiate a new JLayoutFile instance and render the batch button
|
||||
$layout = new JLayoutFile('joomla.toolbar.batch');
|
||||
// add the button to the page
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'templates.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('templates.trash');
|
||||
}
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'templates.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
}
|
||||
elseif ($this->canState && $this->canDelete)
|
||||
{
|
||||
JToolbarHelper::trash('templates.trash');
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.export') && $this->canDo->get('template.export'))
|
||||
{
|
||||
JToolBarHelper::custom('templates.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($this->user->authorise('template.get_snippets', 'com_componentbuilder'))
|
||||
{
|
||||
// add Get Snippets button.
|
||||
@ -160,35 +159,35 @@ class ComponentbuilderViewTemplates extends JViewLegacy
|
||||
JToolBarHelper::custom('templates.importData', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_DATA', false);
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('templates');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('templates');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
// add the options comp button
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
if ($this->canState)
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
// 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(
|
||||
@ -200,11 +199,11 @@ class ComponentbuilderViewTemplates extends JViewLegacy
|
||||
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')
|
||||
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -222,7 +221,7 @@ class ComponentbuilderViewTemplates extends JViewLegacy
|
||||
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/templates.css");
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
* @param mixed $var The output to escape.
|
||||
@ -233,10 +232,10 @@ class ComponentbuilderViewTemplates extends JViewLegacy
|
||||
{
|
||||
if(strlen($var) > 50)
|
||||
{
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
// use the helper htmlEscape method instead and shorten the string
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
|
||||
}
|
||||
// use the helper htmlEscape method instead.
|
||||
// use the helper htmlEscape method instead.
|
||||
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
|
||||
}
|
||||
|
||||
@ -255,5 +254,5 @@ class ComponentbuilderViewTemplates extends JViewLegacy
|
||||
'a.description' => JText::_('COM_COMPONENTBUILDER_TEMPLATE_DESCRIPTION_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user