Moved the phpseclib files to their own folder in libraries. Improved the composer autoloader in JCB. Improved the phpseclib class implementation. Added a new Expert Mode to field modeling under the database tab in the field area.
This commit is contained in:
@ -104,7 +104,7 @@ $edit = "index.php?option=com_componentbuilder&view=libraries&task=library.edit"
|
||||
</div>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->description); ?>
|
||||
<?php echo JText::_($item->target); ?>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->how); ?>
|
||||
@ -112,6 +112,9 @@ $edit = "index.php?option=com_componentbuilder&view=libraries&task=library.edit"
|
||||
<td class="hidden-phone">
|
||||
<?php echo JText::_($item->type); ?>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->description); ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php if ($canDo->get('library.edit.state')) : ?>
|
||||
<?php if ($item->checked_out) : ?>
|
||||
|
@ -14,5 +14,5 @@ defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="8"><?php echo $this->pagination->getListFooter(); ?></td>
|
||||
<td colspan="9"><?php echo $this->pagination->getListFooter(); ?></td>
|
||||
</tr>
|
@ -33,7 +33,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LIBRARY_NAME_LABEL', 'name', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LIBRARY_DESCRIPTION_LABEL', 'description', $this->listDirn, $this->listOrder); ?>
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LIBRARY_TARGET_LABEL', 'target', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JText::_('COM_COMPONENTBUILDER_LIBRARY_HOW_LABEL'); ?>
|
||||
@ -41,6 +41,9 @@ defined('_JEXEC') or die('Restricted access');
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LIBRARY_TYPE_LABEL', 'type', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LIBRARY_DESCRIPTION_LABEL', 'description', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<?php if ($this->canState): ?>
|
||||
<th width="10" class="nowrap center" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LIBRARY_STATUS', 'published', $this->listDirn, $this->listOrder); ?>
|
||||
|
@ -181,6 +181,36 @@ class ComponentbuilderViewLibraries extends JViewLegacy
|
||||
);
|
||||
}
|
||||
|
||||
// Set Target Selection
|
||||
$this->targetOptions = $this->getTheTargetSelections();
|
||||
// We do some sanitation for Target filter
|
||||
if (ComponentbuilderHelper::checkArray($this->targetOptions) &&
|
||||
isset($this->targetOptions[0]->value) &&
|
||||
!ComponentbuilderHelper::checkString($this->targetOptions[0]->value))
|
||||
{
|
||||
unset($this->targetOptions[0]);
|
||||
}
|
||||
// Only load Target filter if it has values
|
||||
if (ComponentbuilderHelper::checkArray($this->targetOptions))
|
||||
{
|
||||
// Target Filter
|
||||
JHtmlSidebar::addFilter(
|
||||
'- Select '.JText::_('COM_COMPONENTBUILDER_LIBRARY_TARGET_LABEL').' -',
|
||||
'filter_target',
|
||||
JHtml::_('select.options', $this->targetOptions, 'value', 'text', $this->state->get('filter.target'))
|
||||
);
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// Target Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_COMPONENTBUILDER_LIBRARY_TARGET_LABEL').' -',
|
||||
'batch[target]',
|
||||
JHtml::_('select.options', $this->targetOptions, 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Set How Selection
|
||||
$this->howOptions = JFormHelper::loadFieldType('Filebehaviour')->options;
|
||||
// We do some sanitation for How filter
|
||||
@ -286,12 +316,49 @@ class ComponentbuilderViewLibraries extends JViewLegacy
|
||||
'a.sorting' => JText::_('JGRID_HEADING_ORDERING'),
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.name' => JText::_('COM_COMPONENTBUILDER_LIBRARY_NAME_LABEL'),
|
||||
'a.description' => JText::_('COM_COMPONENTBUILDER_LIBRARY_DESCRIPTION_LABEL'),
|
||||
'a.target' => JText::_('COM_COMPONENTBUILDER_LIBRARY_TARGET_LABEL'),
|
||||
'a.type' => JText::_('COM_COMPONENTBUILDER_LIBRARY_TYPE_LABEL'),
|
||||
'a.description' => JText::_('COM_COMPONENTBUILDER_LIBRARY_DESCRIPTION_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
|
||||
protected function getTheTargetSelections()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('target'));
|
||||
$query->from($db->quoteName('#__componentbuilder_library'));
|
||||
$query->order($db->quoteName('target') . ' ASC');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$db->setQuery($query);
|
||||
|
||||
$results = $db->loadColumn();
|
||||
|
||||
if ($results)
|
||||
{
|
||||
// get model
|
||||
$model = $this->getModel();
|
||||
$results = array_unique($results);
|
||||
$_filter = array();
|
||||
foreach ($results as $target)
|
||||
{
|
||||
// Translate the target selection
|
||||
$text = $model->selectionTranslation($target,'target');
|
||||
// Now add the target and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $target, JText::_($text));
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function getTheTypeSelections()
|
||||
{
|
||||
// Get a db connection.
|
||||
|
Reference in New Issue
Block a user