Added the feature to add custom Joomla fields to your components, requested in gh-247. Added plugin events to the dynamic get area. Added the script to remove field build in relation to component when component gets uninstalled. Improved the getForm method in the model to allow the passing of options to the form. Made further improvements to the implementation of the return parameter across the component redirecting behavior. Made some changes to the list layout views using the field relations area.
This commit is contained in:
@@ -73,16 +73,31 @@ $edit = "index.php?option=com_componentbuilder&view=custom_admin_views&task=cust
|
||||
</div>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->name); ?>
|
||||
<div><?php echo JText::_('COM_COMPONENTBUILDER_NAME'); ?>: <b>
|
||||
<?php echo $this->escape($item->name); ?></b><br />
|
||||
<?php echo JText::_('COM_COMPONENTBUILDER_CODE'); ?>: <b>
|
||||
<?php echo $this->escape($item->codename); ?></b>
|
||||
</div>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->codename); ?>
|
||||
<div><em>
|
||||
<?php echo $this->escape($item->description); ?></em>
|
||||
<ul style="list-style: none">
|
||||
<li><?php echo JText::_("COM_COMPONENTBUILDER_CUSTOM_BUTTON"); ?>: <b>
|
||||
<?php echo JText::_($item->add_custom_button); ?></b></li>
|
||||
<li><?php echo JText::_("COM_COMPONENTBUILDER_AJAX"); ?>: <b>
|
||||
<?php echo JText::_($item->add_php_ajax); ?></b></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->description); ?>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->snippet_name); ?>
|
||||
<td class="nowrap">
|
||||
<div class="name">
|
||||
<?php if ($this->user->authorise('dynamic_get.edit', 'com_componentbuilder.dynamic_get.' . (int)$item->main_get)): ?>
|
||||
<a href="index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id=<?php echo $item->main_get; ?>&ref=custom_admin_views"><?php echo $this->escape($item->main_get_name); ?></a>
|
||||
<?php else: ?>
|
||||
<?php echo $this->escape($item->main_get_name); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php if ($canDo->get('core.edit.state')) : ?>
|
||||
|
@@ -14,5 +14,5 @@ defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="9"><?php echo $this->pagination->getListFooter(); ?></td>
|
||||
<td colspan="8"><?php echo $this->pagination->getListFooter(); ?></td>
|
||||
</tr>
|
@@ -33,16 +33,13 @@ defined('_JEXEC') or die('Restricted access');
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SYSTEM_NAME_LABEL', 'system_name', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NAME_LABEL', 'name', $this->listDirn, $this->listOrder); ?>
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_NAMES', 'name', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CODENAME_LABEL', 'codename', $this->listDirn, $this->listOrder); ?>
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_DETAILS', 'description', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DESCRIPTION_LABEL', 'description', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SNIPPET_LABEL'); ?>
|
||||
<th class="nowrap" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_LABEL', 'main_get_name', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<?php if ($this->canState): ?>
|
||||
<th width="10" class="nowrap center" >
|
||||
|
@@ -187,7 +187,73 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Set Main Get Name Selection
|
||||
$this->main_getNameOptions = JFormHelper::loadFieldType('Maingets')->getOptions();
|
||||
if ($this->main_getNameOptions)
|
||||
{
|
||||
// Main Get Name Filter
|
||||
JHtmlSidebar::addFilter(
|
||||
'- Select '.JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_LABEL').' -',
|
||||
'filter_main_get',
|
||||
JHtml::_('select.options', $this->main_getNameOptions, 'value', 'text', $this->state->get('filter.main_get'))
|
||||
);
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// Main Get Name Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_LABEL').' -',
|
||||
'batch[main_get]',
|
||||
JHtml::_('select.options', $this->main_getNameOptions, 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Set Add Php Ajax Selection
|
||||
$this->add_php_ajaxOptions = $this->getTheAdd_php_ajaxSelections();
|
||||
if ($this->add_php_ajaxOptions)
|
||||
{
|
||||
// Add Php Ajax Filter
|
||||
JHtmlSidebar::addFilter(
|
||||
'- Select '.JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_AJAX_LABEL').' -',
|
||||
'filter_add_php_ajax',
|
||||
JHtml::_('select.options', $this->add_php_ajaxOptions, 'value', 'text', $this->state->get('filter.add_php_ajax'))
|
||||
);
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// Add Php Ajax Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_PHP_AJAX_LABEL').' -',
|
||||
'batch[add_php_ajax]',
|
||||
JHtml::_('select.options', $this->add_php_ajaxOptions, 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Set Add Custom Button Selection
|
||||
$this->add_custom_buttonOptions = $this->getTheAdd_custom_buttonSelections();
|
||||
if ($this->add_custom_buttonOptions)
|
||||
{
|
||||
// Add Custom Button Filter
|
||||
JHtmlSidebar::addFilter(
|
||||
'- Select '.JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_CUSTOM_BUTTON_LABEL').' -',
|
||||
'filter_add_custom_button',
|
||||
JHtml::_('select.options', $this->add_custom_buttonOptions, 'value', 'text', $this->state->get('filter.add_custom_button'))
|
||||
);
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// Add Custom Button Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_ADD_CUSTOM_BUTTON_LABEL').' -',
|
||||
'batch[add_custom_button]',
|
||||
JHtml::_('select.options', $this->add_custom_buttonOptions, 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -235,9 +301,81 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.system_name' => JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SYSTEM_NAME_LABEL'),
|
||||
'a.name' => JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NAME_LABEL'),
|
||||
'a.codename' => JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_CODENAME_LABEL'),
|
||||
'a.description' => JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DESCRIPTION_LABEL'),
|
||||
'g.name' => JText::_('COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
|
||||
protected function getTheAdd_php_ajaxSelections()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('add_php_ajax'));
|
||||
$query->from($db->quoteName('#__componentbuilder_custom_admin_view'));
|
||||
$query->order($db->quoteName('add_php_ajax') . ' 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 $add_php_ajax)
|
||||
{
|
||||
// Translate the add_php_ajax selection
|
||||
$text = $model->selectionTranslation($add_php_ajax,'add_php_ajax');
|
||||
// Now add the add_php_ajax and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $add_php_ajax, JText::_($text));
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function getTheAdd_custom_buttonSelections()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('add_custom_button'));
|
||||
$query->from($db->quoteName('#__componentbuilder_custom_admin_view'));
|
||||
$query->order($db->quoteName('add_custom_button') . ' 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 $add_custom_button)
|
||||
{
|
||||
// Translate the add_custom_button selection
|
||||
$text = $model->selectionTranslation($add_custom_button,'add_custom_button');
|
||||
// Now add the add_custom_button and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $add_custom_button, JText::_($text));
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@@ -113,21 +113,6 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_target listeners for target_vvvvwac function
|
||||
jQuery('#jform_target').on('keyup',function()
|
||||
{
|
||||
var target_vvvvwac = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvwac(target_vvvvwac);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_target',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var target_vvvvwac = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvwac(target_vvvvwac);
|
||||
|
||||
});
|
||||
|
||||
// #jform_target listeners for target_vvvvwad function
|
||||
jQuery('#jform_target').on('keyup',function()
|
||||
{
|
||||
@@ -147,67 +132,82 @@ jQuery('#adminForm').on('change', '#jform_target',function (e)
|
||||
jQuery('#jform_target').on('keyup',function()
|
||||
{
|
||||
var target_vvvvwae = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
var type_vvvvwae = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvwae(target_vvvvwae,type_vvvvwae);
|
||||
vvvvwae(target_vvvvwae);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_target',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var target_vvvvwae = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
var type_vvvvwae = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvwae(target_vvvvwae,type_vvvvwae);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_vvvvwae function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var target_vvvvwae = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
var type_vvvvwae = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvwae(target_vvvvwae,type_vvvvwae);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var target_vvvvwae = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
var type_vvvvwae = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvwae(target_vvvvwae,type_vvvvwae);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_vvvvwaf function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_vvvvwaf = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
var target_vvvvwaf = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvwaf(type_vvvvwaf,target_vvvvwaf);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_vvvvwaf = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
var target_vvvvwaf = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvwaf(type_vvvvwaf,target_vvvvwaf);
|
||||
vvvvwae(target_vvvvwae);
|
||||
|
||||
});
|
||||
|
||||
// #jform_target listeners for target_vvvvwaf function
|
||||
jQuery('#jform_target').on('keyup',function()
|
||||
{
|
||||
var type_vvvvwaf = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
var target_vvvvwaf = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvwaf(type_vvvvwaf,target_vvvvwaf);
|
||||
var type_vvvvwaf = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvwaf(target_vvvvwaf,type_vvvvwaf);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_target',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_vvvvwaf = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
var target_vvvvwaf = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvwaf(type_vvvvwaf,target_vvvvwaf);
|
||||
var type_vvvvwaf = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvwaf(target_vvvvwaf,type_vvvvwaf);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_vvvvwaf function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var target_vvvvwaf = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
var type_vvvvwaf = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvwaf(target_vvvvwaf,type_vvvvwaf);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var target_vvvvwaf = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
var type_vvvvwaf = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvwaf(target_vvvvwaf,type_vvvvwaf);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_vvvvwag function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_vvvvwag = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
var target_vvvvwag = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvwag(type_vvvvwag,target_vvvvwag);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_vvvvwag = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
var target_vvvvwag = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvwag(type_vvvvwag,target_vvvvwag);
|
||||
|
||||
});
|
||||
|
||||
// #jform_target listeners for target_vvvvwag function
|
||||
jQuery('#jform_target').on('keyup',function()
|
||||
{
|
||||
var type_vvvvwag = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
var target_vvvvwag = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvwag(type_vvvvwag,target_vvvvwag);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_target',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_vvvvwag = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
var target_vvvvwag = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvwag(type_vvvvwag,target_vvvvwag);
|
||||
|
||||
});
|
||||
|
||||
|
@@ -51,9 +51,12 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'dynamic_getTab', 'main', JText::_('COM_COMPONENTBUILDER_DYNAMIC_GET_MAIN', true)); ?>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
<div class="span12">
|
||||
<div class="span6">
|
||||
<?php echo JLayoutHelper::render('dynamic_get.main_left', $this); ?>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<?php echo JLayoutHelper::render('dynamic_get.main_right', $this); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
<div class="span12">
|
||||
@@ -605,6 +608,21 @@ jQuery('#adminForm').on('change', '#jform_add_php_router_parse',function (e)
|
||||
|
||||
});
|
||||
|
||||
// #jform_gettype listeners for gettype_vvvvwac function
|
||||
jQuery('#jform_gettype').on('keyup',function()
|
||||
{
|
||||
var gettype_vvvvwac = jQuery("#jform_gettype").val();
|
||||
vvvvwac(gettype_vvvvwac);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_gettype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var gettype_vvvvwac = jQuery("#jform_gettype").val();
|
||||
vvvvwac(gettype_vvvvwac);
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
<?php $fieldNrs = range(0,50,1); ?>
|
||||
|
@@ -144,48 +144,33 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_datalenght listeners for datalenght_vvvvwao function
|
||||
// #jform_datalenght listeners for datalenght_vvvvwap function
|
||||
jQuery('#jform_datalenght').on('keyup',function()
|
||||
{
|
||||
var datalenght_vvvvwao = jQuery("#jform_datalenght").val();
|
||||
vvvvwao(datalenght_vvvvwao);
|
||||
var datalenght_vvvvwap = jQuery("#jform_datalenght").val();
|
||||
vvvvwap(datalenght_vvvvwap);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_datalenght',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var datalenght_vvvvwao = jQuery("#jform_datalenght").val();
|
||||
vvvvwao(datalenght_vvvvwao);
|
||||
var datalenght_vvvvwap = jQuery("#jform_datalenght").val();
|
||||
vvvvwap(datalenght_vvvvwap);
|
||||
|
||||
});
|
||||
|
||||
// #jform_datadefault listeners for datadefault_vvvvwap function
|
||||
// #jform_datadefault listeners for datadefault_vvvvwaq function
|
||||
jQuery('#jform_datadefault').on('keyup',function()
|
||||
{
|
||||
var datadefault_vvvvwap = jQuery("#jform_datadefault").val();
|
||||
vvvvwap(datadefault_vvvvwap);
|
||||
var datadefault_vvvvwaq = jQuery("#jform_datadefault").val();
|
||||
vvvvwaq(datadefault_vvvvwaq);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_datadefault',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var datadefault_vvvvwap = jQuery("#jform_datadefault").val();
|
||||
vvvvwap(datadefault_vvvvwap);
|
||||
|
||||
});
|
||||
|
||||
// #jform_datatype listeners for datatype_vvvvwaq function
|
||||
jQuery('#jform_datatype').on('keyup',function()
|
||||
{
|
||||
var datatype_vvvvwaq = jQuery("#jform_datatype").val();
|
||||
vvvvwaq(datatype_vvvvwaq);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_datatype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var datatype_vvvvwaq = jQuery("#jform_datatype").val();
|
||||
vvvvwaq(datatype_vvvvwaq);
|
||||
var datadefault_vvvvwaq = jQuery("#jform_datadefault").val();
|
||||
vvvvwaq(datadefault_vvvvwaq);
|
||||
|
||||
});
|
||||
|
||||
@@ -204,97 +189,112 @@ jQuery('#adminForm').on('change', '#jform_datatype',function (e)
|
||||
|
||||
});
|
||||
|
||||
// #jform_store listeners for store_vvvvwas function
|
||||
jQuery('#jform_store').on('keyup',function()
|
||||
{
|
||||
var store_vvvvwas = jQuery("#jform_store").val();
|
||||
var datatype_vvvvwas = jQuery("#jform_datatype").val();
|
||||
vvvvwas(store_vvvvwas,datatype_vvvvwas);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_store',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var store_vvvvwas = jQuery("#jform_store").val();
|
||||
var datatype_vvvvwas = jQuery("#jform_datatype").val();
|
||||
vvvvwas(store_vvvvwas,datatype_vvvvwas);
|
||||
|
||||
});
|
||||
|
||||
// #jform_datatype listeners for datatype_vvvvwas function
|
||||
jQuery('#jform_datatype').on('keyup',function()
|
||||
{
|
||||
var store_vvvvwas = jQuery("#jform_store").val();
|
||||
var datatype_vvvvwas = jQuery("#jform_datatype").val();
|
||||
vvvvwas(store_vvvvwas,datatype_vvvvwas);
|
||||
vvvvwas(datatype_vvvvwas);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_datatype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var store_vvvvwas = jQuery("#jform_store").val();
|
||||
var datatype_vvvvwas = jQuery("#jform_datatype").val();
|
||||
vvvvwas(store_vvvvwas,datatype_vvvvwas);
|
||||
vvvvwas(datatype_vvvvwas);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_css_view listeners for add_css_view_vvvvwau function
|
||||
// #jform_store listeners for store_vvvvwat function
|
||||
jQuery('#jform_store').on('keyup',function()
|
||||
{
|
||||
var store_vvvvwat = jQuery("#jform_store").val();
|
||||
var datatype_vvvvwat = jQuery("#jform_datatype").val();
|
||||
vvvvwat(store_vvvvwat,datatype_vvvvwat);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_store',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var store_vvvvwat = jQuery("#jform_store").val();
|
||||
var datatype_vvvvwat = jQuery("#jform_datatype").val();
|
||||
vvvvwat(store_vvvvwat,datatype_vvvvwat);
|
||||
|
||||
});
|
||||
|
||||
// #jform_datatype listeners for datatype_vvvvwat function
|
||||
jQuery('#jform_datatype').on('keyup',function()
|
||||
{
|
||||
var store_vvvvwat = jQuery("#jform_store").val();
|
||||
var datatype_vvvvwat = jQuery("#jform_datatype").val();
|
||||
vvvvwat(store_vvvvwat,datatype_vvvvwat);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_datatype',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var store_vvvvwat = jQuery("#jform_store").val();
|
||||
var datatype_vvvvwat = jQuery("#jform_datatype").val();
|
||||
vvvvwat(store_vvvvwat,datatype_vvvvwat);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_css_view listeners for add_css_view_vvvvwav function
|
||||
jQuery('#jform_add_css_view').on('keyup',function()
|
||||
{
|
||||
var add_css_view_vvvvwau = jQuery("#jform_add_css_view input[type='radio']:checked").val();
|
||||
vvvvwau(add_css_view_vvvvwau);
|
||||
var add_css_view_vvvvwav = jQuery("#jform_add_css_view input[type='radio']:checked").val();
|
||||
vvvvwav(add_css_view_vvvvwav);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_css_view',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_css_view_vvvvwau = jQuery("#jform_add_css_view input[type='radio']:checked").val();
|
||||
vvvvwau(add_css_view_vvvvwau);
|
||||
var add_css_view_vvvvwav = jQuery("#jform_add_css_view input[type='radio']:checked").val();
|
||||
vvvvwav(add_css_view_vvvvwav);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_css_views listeners for add_css_views_vvvvwav function
|
||||
// #jform_add_css_views listeners for add_css_views_vvvvwaw function
|
||||
jQuery('#jform_add_css_views').on('keyup',function()
|
||||
{
|
||||
var add_css_views_vvvvwav = jQuery("#jform_add_css_views input[type='radio']:checked").val();
|
||||
vvvvwav(add_css_views_vvvvwav);
|
||||
var add_css_views_vvvvwaw = jQuery("#jform_add_css_views input[type='radio']:checked").val();
|
||||
vvvvwaw(add_css_views_vvvvwaw);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_css_views',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_css_views_vvvvwav = jQuery("#jform_add_css_views input[type='radio']:checked").val();
|
||||
vvvvwav(add_css_views_vvvvwav);
|
||||
var add_css_views_vvvvwaw = jQuery("#jform_add_css_views input[type='radio']:checked").val();
|
||||
vvvvwaw(add_css_views_vvvvwaw);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_javascript_view_footer listeners for add_javascript_view_footer_vvvvwaw function
|
||||
// #jform_add_javascript_view_footer listeners for add_javascript_view_footer_vvvvwax function
|
||||
jQuery('#jform_add_javascript_view_footer').on('keyup',function()
|
||||
{
|
||||
var add_javascript_view_footer_vvvvwaw = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val();
|
||||
vvvvwaw(add_javascript_view_footer_vvvvwaw);
|
||||
var add_javascript_view_footer_vvvvwax = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val();
|
||||
vvvvwax(add_javascript_view_footer_vvvvwax);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_javascript_view_footer',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_javascript_view_footer_vvvvwaw = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val();
|
||||
vvvvwaw(add_javascript_view_footer_vvvvwaw);
|
||||
var add_javascript_view_footer_vvvvwax = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val();
|
||||
vvvvwax(add_javascript_view_footer_vvvvwax);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_javascript_views_footer listeners for add_javascript_views_footer_vvvvwax function
|
||||
// #jform_add_javascript_views_footer listeners for add_javascript_views_footer_vvvvway function
|
||||
jQuery('#jform_add_javascript_views_footer').on('keyup',function()
|
||||
{
|
||||
var add_javascript_views_footer_vvvvwax = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val();
|
||||
vvvvwax(add_javascript_views_footer_vvvvwax);
|
||||
var add_javascript_views_footer_vvvvway = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val();
|
||||
vvvvway(add_javascript_views_footer_vvvvway);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_javascript_views_footer',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_javascript_views_footer_vvvvwax = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val();
|
||||
vvvvwax(add_javascript_views_footer_vvvvwax);
|
||||
var add_javascript_views_footer_vvvvway = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val();
|
||||
vvvvway(add_javascript_views_footer_vvvvway);
|
||||
|
||||
});
|
||||
|
||||
|
@@ -113,21 +113,6 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_location listeners for location_vvvvwbi function
|
||||
jQuery('#jform_location').on('keyup',function()
|
||||
{
|
||||
var location_vvvvwbi = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
vvvvwbi(location_vvvvwbi);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_location',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var location_vvvvwbi = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
vvvvwbi(location_vvvvwbi);
|
||||
|
||||
});
|
||||
|
||||
// #jform_location listeners for location_vvvvwbj function
|
||||
jQuery('#jform_location').on('keyup',function()
|
||||
{
|
||||
@@ -143,18 +128,18 @@ jQuery('#adminForm').on('change', '#jform_location',function (e)
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_vvvvwbk function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
// #jform_location listeners for location_vvvvwbk function
|
||||
jQuery('#jform_location').on('keyup',function()
|
||||
{
|
||||
var type_vvvvwbk = jQuery("#jform_type").val();
|
||||
vvvvwbk(type_vvvvwbk);
|
||||
var location_vvvvwbk = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
vvvvwbk(location_vvvvwbk);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
jQuery('#adminForm').on('change', '#jform_location',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_vvvvwbk = jQuery("#jform_type").val();
|
||||
vvvvwbk(type_vvvvwbk);
|
||||
var location_vvvvwbk = jQuery("#jform_location input[type='radio']:checked").val();
|
||||
vvvvwbk(location_vvvvwbk);
|
||||
|
||||
});
|
||||
|
||||
@@ -188,18 +173,33 @@ jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
|
||||
});
|
||||
|
||||
// #jform_target listeners for target_vvvvwbn function
|
||||
// #jform_type listeners for type_vvvvwbn function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_vvvvwbn = jQuery("#jform_type").val();
|
||||
vvvvwbn(type_vvvvwbn);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_vvvvwbn = jQuery("#jform_type").val();
|
||||
vvvvwbn(type_vvvvwbn);
|
||||
|
||||
});
|
||||
|
||||
// #jform_target listeners for target_vvvvwbo function
|
||||
jQuery('#jform_target').on('keyup',function()
|
||||
{
|
||||
var target_vvvvwbn = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvwbn(target_vvvvwbn);
|
||||
var target_vvvvwbo = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvwbo(target_vvvvwbo);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_target',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var target_vvvvwbn = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvwbn(target_vvvvwbn);
|
||||
var target_vvvvwbo = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
vvvvwbo(target_vvvvwbo);
|
||||
|
||||
});
|
||||
|
||||
|
@@ -82,4 +82,30 @@ if ($this->saveOrder)
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</form>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
// layouts footer script
|
||||
|
||||
jQuery.fn.selText = function() {
|
||||
var obj = this[0];
|
||||
if (jQuery.browser.msie) {
|
||||
var range = obj.offsetParent.createTextRange();
|
||||
range.moveToElementText(obj);
|
||||
range.select();
|
||||
} else if (jQuery.browser.mozilla || $.browser.opera) {
|
||||
var selection = obj.ownerDocument.defaultView.getSelection();
|
||||
var range = obj.ownerDocument.createRange();
|
||||
range.selectNodeContents(obj);
|
||||
selection.removeAllRanges();
|
||||
selection.addRange(range);
|
||||
} else if (jQuery.browser.safari) {
|
||||
var selection = obj.ownerDocument.defaultView.getSelection();
|
||||
selection.setBaseAndExtent(obj, 0, obj, 1);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
// make sure the code bocks are active
|
||||
jQuery("code").click(function() {
|
||||
jQuery(this).selText().addClass("selected");
|
||||
});
|
||||
</script>
|
@@ -61,22 +61,26 @@ $edit = "index.php?option=com_componentbuilder&view=layouts&task=layout.edit";
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="nowrap">
|
||||
<div class="name">
|
||||
<?php if ($canDo->get('core.edit')): ?>
|
||||
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->name); ?></a>
|
||||
<?php if ($item->checked_out): ?>
|
||||
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'layouts.', $canCheckin); ?>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php echo $this->escape($item->name); ?>
|
||||
<div>
|
||||
<?php if ($canDo->get('core.edit')): ?>
|
||||
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->name); ?></a>
|
||||
<?php if ($item->checked_out): ?>
|
||||
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'layouts.', $canCheckin); ?>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php echo $this->escape($item->name); ?>
|
||||
<?php endif; ?><br />
|
||||
<code><?php echo JLayoutHelper::render('<?php echo ComponentbuilderHelper::safeString($item->alias); ?>', [?]); ?></code>
|
||||
</div>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->alias); ?>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->description); ?>
|
||||
<div><em>
|
||||
<?php echo $this->escape($item->description); ?></em>
|
||||
<ul style="list-style: none">
|
||||
<li><?php echo JText::_("COM_COMPONENTBUILDER_CUSTOM_PHP"); ?>: <b>
|
||||
<?php echo JText::_($item->add_php_view); ?></b></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td class="nowrap">
|
||||
<div class="name">
|
||||
|
@@ -14,5 +14,5 @@ defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="8"><?php echo $this->pagination->getListFooter(); ?></td>
|
||||
<td colspan="7"><?php echo $this->pagination->getListFooter(); ?></td>
|
||||
</tr>
|
@@ -30,13 +30,10 @@ defined('_JEXEC') or die('Restricted access');
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
<th class="nowrap" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LAYOUT_NAME_LABEL', 'name', $this->listDirn, $this->listOrder); ?>
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LAYOUTS_NAMES', 'name', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LAYOUT_ALIAS_LABEL', 'alias', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LAYOUT_DESCRIPTION_LABEL', 'description', $this->listDirn, $this->listOrder); ?>
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LAYOUTS_DETAILS', 'description', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_LAYOUT_DYNAMIC_GET_LABEL', 'dynamic_get_name', $this->listDirn, $this->listOrder); ?>
|
||||
|
@@ -209,6 +209,28 @@ class ComponentbuilderViewLayouts extends JViewLegacy
|
||||
JHtml::_('select.options', $this->dynamic_getNameOptions, 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Set Add Php View Selection
|
||||
$this->add_php_viewOptions = $this->getTheAdd_php_viewSelections();
|
||||
if ($this->add_php_viewOptions)
|
||||
{
|
||||
// Add Php View Filter
|
||||
JHtmlSidebar::addFilter(
|
||||
'- Select '.JText::_('COM_COMPONENTBUILDER_LAYOUT_ADD_PHP_VIEW_LABEL').' -',
|
||||
'filter_add_php_view',
|
||||
JHtml::_('select.options', $this->add_php_viewOptions, 'value', 'text', $this->state->get('filter.add_php_view'))
|
||||
);
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// Add Php View Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_COMPONENTBUILDER_LAYOUT_ADD_PHP_VIEW_LABEL').' -',
|
||||
'batch[add_php_view]',
|
||||
JHtml::_('select.options', $this->add_php_viewOptions, 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,10 +278,45 @@ class ComponentbuilderViewLayouts extends JViewLegacy
|
||||
'a.sorting' => JText::_('JGRID_HEADING_ORDERING'),
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.name' => JText::_('COM_COMPONENTBUILDER_LAYOUT_NAME_LABEL'),
|
||||
'a.alias' => JText::_('COM_COMPONENTBUILDER_LAYOUT_ALIAS_LABEL'),
|
||||
'a.description' => JText::_('COM_COMPONENTBUILDER_LAYOUT_DESCRIPTION_LABEL'),
|
||||
'g.name' => JText::_('COM_COMPONENTBUILDER_LAYOUT_DYNAMIC_GET_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
|
||||
protected function getTheAdd_php_viewSelections()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('add_php_view'));
|
||||
$query->from($db->quoteName('#__componentbuilder_layout'));
|
||||
$query->order($db->quoteName('add_php_view') . ' 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 $add_php_view)
|
||||
{
|
||||
// Translate the add_php_view selection
|
||||
$text = $model->selectionTranslation($add_php_view,'add_php_view');
|
||||
// Now add the add_php_view and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $add_php_view, JText::_($text));
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@@ -143,21 +143,6 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_how listeners for how_vvvvwag function
|
||||
jQuery('#jform_how').on('keyup',function()
|
||||
{
|
||||
var how_vvvvwag = jQuery("#jform_how").val();
|
||||
vvvvwag(how_vvvvwag);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_how',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var how_vvvvwag = jQuery("#jform_how").val();
|
||||
vvvvwag(how_vvvvwag);
|
||||
|
||||
});
|
||||
|
||||
// #jform_how listeners for how_vvvvwah function
|
||||
jQuery('#jform_how').on('keyup',function()
|
||||
{
|
||||
@@ -248,18 +233,33 @@ jQuery('#adminForm').on('change', '#jform_how',function (e)
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_vvvvwan function
|
||||
// #jform_how listeners for how_vvvvwan function
|
||||
jQuery('#jform_how').on('keyup',function()
|
||||
{
|
||||
var how_vvvvwan = jQuery("#jform_how").val();
|
||||
vvvvwan(how_vvvvwan);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_how',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var how_vvvvwan = jQuery("#jform_how").val();
|
||||
vvvvwan(how_vvvvwan);
|
||||
|
||||
});
|
||||
|
||||
// #jform_type listeners for type_vvvvwao function
|
||||
jQuery('#jform_type').on('keyup',function()
|
||||
{
|
||||
var type_vvvvwan = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvwan(type_vvvvwan);
|
||||
var type_vvvvwao = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvwao(type_vvvvwao);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type_vvvvwan = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvwan(type_vvvvwan);
|
||||
var type_vvvvwao = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvwao(type_vvvvwao);
|
||||
|
||||
});
|
||||
|
||||
|
@@ -122,21 +122,6 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// #jform_protocol listeners for protocol_vvvvway function
|
||||
jQuery('#jform_protocol').on('keyup',function()
|
||||
{
|
||||
var protocol_vvvvway = jQuery("#jform_protocol").val();
|
||||
vvvvway(protocol_vvvvway);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_protocol',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var protocol_vvvvway = jQuery("#jform_protocol").val();
|
||||
vvvvway(protocol_vvvvway);
|
||||
|
||||
});
|
||||
|
||||
// #jform_protocol listeners for protocol_vvvvwaz function
|
||||
jQuery('#jform_protocol').on('keyup',function()
|
||||
{
|
||||
@@ -156,135 +141,150 @@ jQuery('#adminForm').on('change', '#jform_protocol',function (e)
|
||||
jQuery('#jform_protocol').on('keyup',function()
|
||||
{
|
||||
var protocol_vvvvwba = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwba = jQuery("#jform_authentication").val();
|
||||
vvvvwba(protocol_vvvvwba,authentication_vvvvwba);
|
||||
vvvvwba(protocol_vvvvwba);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_protocol',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var protocol_vvvvwba = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwba = jQuery("#jform_authentication").val();
|
||||
vvvvwba(protocol_vvvvwba,authentication_vvvvwba);
|
||||
vvvvwba(protocol_vvvvwba);
|
||||
|
||||
});
|
||||
|
||||
// #jform_authentication listeners for authentication_vvvvwba function
|
||||
jQuery('#jform_authentication').on('keyup',function()
|
||||
{
|
||||
var protocol_vvvvwba = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwba = jQuery("#jform_authentication").val();
|
||||
vvvvwba(protocol_vvvvwba,authentication_vvvvwba);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_authentication',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var protocol_vvvvwba = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwba = jQuery("#jform_authentication").val();
|
||||
vvvvwba(protocol_vvvvwba,authentication_vvvvwba);
|
||||
|
||||
});
|
||||
|
||||
// #jform_protocol listeners for protocol_vvvvwbc function
|
||||
// #jform_protocol listeners for protocol_vvvvwbb function
|
||||
jQuery('#jform_protocol').on('keyup',function()
|
||||
{
|
||||
var protocol_vvvvwbc = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbc = jQuery("#jform_authentication").val();
|
||||
vvvvwbc(protocol_vvvvwbc,authentication_vvvvwbc);
|
||||
var protocol_vvvvwbb = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbb = jQuery("#jform_authentication").val();
|
||||
vvvvwbb(protocol_vvvvwbb,authentication_vvvvwbb);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_protocol',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var protocol_vvvvwbc = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbc = jQuery("#jform_authentication").val();
|
||||
vvvvwbc(protocol_vvvvwbc,authentication_vvvvwbc);
|
||||
var protocol_vvvvwbb = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbb = jQuery("#jform_authentication").val();
|
||||
vvvvwbb(protocol_vvvvwbb,authentication_vvvvwbb);
|
||||
|
||||
});
|
||||
|
||||
// #jform_authentication listeners for authentication_vvvvwbc function
|
||||
// #jform_authentication listeners for authentication_vvvvwbb function
|
||||
jQuery('#jform_authentication').on('keyup',function()
|
||||
{
|
||||
var protocol_vvvvwbc = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbc = jQuery("#jform_authentication").val();
|
||||
vvvvwbc(protocol_vvvvwbc,authentication_vvvvwbc);
|
||||
var protocol_vvvvwbb = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbb = jQuery("#jform_authentication").val();
|
||||
vvvvwbb(protocol_vvvvwbb,authentication_vvvvwbb);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_authentication',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var protocol_vvvvwbc = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbc = jQuery("#jform_authentication").val();
|
||||
vvvvwbc(protocol_vvvvwbc,authentication_vvvvwbc);
|
||||
var protocol_vvvvwbb = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbb = jQuery("#jform_authentication").val();
|
||||
vvvvwbb(protocol_vvvvwbb,authentication_vvvvwbb);
|
||||
|
||||
});
|
||||
|
||||
// #jform_protocol listeners for protocol_vvvvwbe function
|
||||
// #jform_protocol listeners for protocol_vvvvwbd function
|
||||
jQuery('#jform_protocol').on('keyup',function()
|
||||
{
|
||||
var protocol_vvvvwbe = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbe = jQuery("#jform_authentication").val();
|
||||
vvvvwbe(protocol_vvvvwbe,authentication_vvvvwbe);
|
||||
var protocol_vvvvwbd = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbd = jQuery("#jform_authentication").val();
|
||||
vvvvwbd(protocol_vvvvwbd,authentication_vvvvwbd);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_protocol',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var protocol_vvvvwbe = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbe = jQuery("#jform_authentication").val();
|
||||
vvvvwbe(protocol_vvvvwbe,authentication_vvvvwbe);
|
||||
var protocol_vvvvwbd = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbd = jQuery("#jform_authentication").val();
|
||||
vvvvwbd(protocol_vvvvwbd,authentication_vvvvwbd);
|
||||
|
||||
});
|
||||
|
||||
// #jform_authentication listeners for authentication_vvvvwbe function
|
||||
// #jform_authentication listeners for authentication_vvvvwbd function
|
||||
jQuery('#jform_authentication').on('keyup',function()
|
||||
{
|
||||
var protocol_vvvvwbe = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbe = jQuery("#jform_authentication").val();
|
||||
vvvvwbe(protocol_vvvvwbe,authentication_vvvvwbe);
|
||||
var protocol_vvvvwbd = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbd = jQuery("#jform_authentication").val();
|
||||
vvvvwbd(protocol_vvvvwbd,authentication_vvvvwbd);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_authentication',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var protocol_vvvvwbe = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbe = jQuery("#jform_authentication").val();
|
||||
vvvvwbe(protocol_vvvvwbe,authentication_vvvvwbe);
|
||||
var protocol_vvvvwbd = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbd = jQuery("#jform_authentication").val();
|
||||
vvvvwbd(protocol_vvvvwbd,authentication_vvvvwbd);
|
||||
|
||||
});
|
||||
|
||||
// #jform_protocol listeners for protocol_vvvvwbg function
|
||||
// #jform_protocol listeners for protocol_vvvvwbf function
|
||||
jQuery('#jform_protocol').on('keyup',function()
|
||||
{
|
||||
var protocol_vvvvwbg = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbg = jQuery("#jform_authentication").val();
|
||||
vvvvwbg(protocol_vvvvwbg,authentication_vvvvwbg);
|
||||
var protocol_vvvvwbf = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbf = jQuery("#jform_authentication").val();
|
||||
vvvvwbf(protocol_vvvvwbf,authentication_vvvvwbf);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_protocol',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var protocol_vvvvwbg = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbg = jQuery("#jform_authentication").val();
|
||||
vvvvwbg(protocol_vvvvwbg,authentication_vvvvwbg);
|
||||
var protocol_vvvvwbf = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbf = jQuery("#jform_authentication").val();
|
||||
vvvvwbf(protocol_vvvvwbf,authentication_vvvvwbf);
|
||||
|
||||
});
|
||||
|
||||
// #jform_authentication listeners for authentication_vvvvwbg function
|
||||
// #jform_authentication listeners for authentication_vvvvwbf function
|
||||
jQuery('#jform_authentication').on('keyup',function()
|
||||
{
|
||||
var protocol_vvvvwbg = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbg = jQuery("#jform_authentication").val();
|
||||
vvvvwbg(protocol_vvvvwbg,authentication_vvvvwbg);
|
||||
var protocol_vvvvwbf = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbf = jQuery("#jform_authentication").val();
|
||||
vvvvwbf(protocol_vvvvwbf,authentication_vvvvwbf);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_authentication',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var protocol_vvvvwbg = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbg = jQuery("#jform_authentication").val();
|
||||
vvvvwbg(protocol_vvvvwbg,authentication_vvvvwbg);
|
||||
var protocol_vvvvwbf = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbf = jQuery("#jform_authentication").val();
|
||||
vvvvwbf(protocol_vvvvwbf,authentication_vvvvwbf);
|
||||
|
||||
});
|
||||
|
||||
// #jform_protocol listeners for protocol_vvvvwbh function
|
||||
jQuery('#jform_protocol').on('keyup',function()
|
||||
{
|
||||
var protocol_vvvvwbh = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbh = jQuery("#jform_authentication").val();
|
||||
vvvvwbh(protocol_vvvvwbh,authentication_vvvvwbh);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_protocol',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var protocol_vvvvwbh = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbh = jQuery("#jform_authentication").val();
|
||||
vvvvwbh(protocol_vvvvwbh,authentication_vvvvwbh);
|
||||
|
||||
});
|
||||
|
||||
// #jform_authentication listeners for authentication_vvvvwbh function
|
||||
jQuery('#jform_authentication').on('keyup',function()
|
||||
{
|
||||
var protocol_vvvvwbh = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbh = jQuery("#jform_authentication").val();
|
||||
vvvvwbh(protocol_vvvvwbh,authentication_vvvvwbh);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_authentication',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var protocol_vvvvwbh = jQuery("#jform_protocol").val();
|
||||
var authentication_vvvvwbh = jQuery("#jform_authentication").val();
|
||||
vvvvwbh(protocol_vvvvwbh,authentication_vvvvwbh);
|
||||
|
||||
});
|
||||
|
||||
|
@@ -73,16 +73,35 @@ $edit = "index.php?option=com_componentbuilder&view=site_views&task=site_view.ed
|
||||
</div>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->name); ?>
|
||||
<div><?php echo JText::_('COM_COMPONENTBUILDER_NAME'); ?>: <b>
|
||||
<?php echo $this->escape($item->name); ?></b><br />
|
||||
<?php echo JText::_('COM_COMPONENTBUILDER_CODE'); ?>: <b>
|
||||
<?php echo $this->escape($item->codename); ?></b><br />
|
||||
<?php if (ComponentbuilderHelper::checkString($item->context)): ?>
|
||||
<?php echo JText::_('COM_COMPONENTBUILDER_CONTEXT'); ?>: <b>
|
||||
<?php echo $this->escape($item->context); ?></b>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->codename); ?>
|
||||
<div><em>
|
||||
<?php echo $this->escape($item->description); ?></em>
|
||||
<ul style="list-style: none">
|
||||
<li><?php echo JText::_("COM_COMPONENTBUILDER_CUSTOM_BUTTON"); ?>: <b>
|
||||
<?php echo JText::_($item->add_custom_button); ?></b></li>
|
||||
<li><?php echo JText::_("COM_COMPONENTBUILDER_AJAX"); ?>: <b>
|
||||
<?php echo JText::_($item->add_php_ajax); ?></b></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->description); ?>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->snippet_name); ?>
|
||||
<td class="nowrap">
|
||||
<div class="name">
|
||||
<?php if ($this->user->authorise('dynamic_get.edit', 'com_componentbuilder.dynamic_get.' . (int)$item->main_get)): ?>
|
||||
<a href="index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id=<?php echo $item->main_get; ?>&ref=site_views"><?php echo $this->escape($item->main_get_name); ?></a>
|
||||
<?php else: ?>
|
||||
<?php echo $this->escape($item->main_get_name); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php if ($canDo->get('core.edit.state')) : ?>
|
||||
|
@@ -14,5 +14,5 @@ defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="9"><?php echo $this->pagination->getListFooter(); ?></td>
|
||||
<td colspan="8"><?php echo $this->pagination->getListFooter(); ?></td>
|
||||
</tr>
|
@@ -33,16 +33,13 @@ defined('_JEXEC') or die('Restricted access');
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_SITE_VIEW_SYSTEM_NAME_LABEL', 'system_name', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_SITE_VIEW_NAME_LABEL', 'name', $this->listDirn, $this->listOrder); ?>
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_SITE_VIEWS_NAMES', 'name', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_SITE_VIEW_CODENAME_LABEL', 'codename', $this->listDirn, $this->listOrder); ?>
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_SITE_VIEWS_DETAILS', 'description', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_SITE_VIEW_DESCRIPTION_LABEL', 'description', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JText::_('COM_COMPONENTBUILDER_SITE_VIEW_SNIPPET_LABEL'); ?>
|
||||
<th class="nowrap" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_LABEL', 'main_get_name', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<?php if ($this->canState): ?>
|
||||
<th width="10" class="nowrap center" >
|
||||
|
@@ -187,7 +187,73 @@ class ComponentbuilderViewSite_views extends JViewLegacy
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Set Main Get Name Selection
|
||||
$this->main_getNameOptions = JFormHelper::loadFieldType('Maingets')->getOptions();
|
||||
if ($this->main_getNameOptions)
|
||||
{
|
||||
// Main Get Name Filter
|
||||
JHtmlSidebar::addFilter(
|
||||
'- Select '.JText::_('COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_LABEL').' -',
|
||||
'filter_main_get',
|
||||
JHtml::_('select.options', $this->main_getNameOptions, 'value', 'text', $this->state->get('filter.main_get'))
|
||||
);
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// Main Get Name Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_LABEL').' -',
|
||||
'batch[main_get]',
|
||||
JHtml::_('select.options', $this->main_getNameOptions, 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Set Add Php Ajax Selection
|
||||
$this->add_php_ajaxOptions = $this->getTheAdd_php_ajaxSelections();
|
||||
if ($this->add_php_ajaxOptions)
|
||||
{
|
||||
// Add Php Ajax Filter
|
||||
JHtmlSidebar::addFilter(
|
||||
'- Select '.JText::_('COM_COMPONENTBUILDER_SITE_VIEW_ADD_PHP_AJAX_LABEL').' -',
|
||||
'filter_add_php_ajax',
|
||||
JHtml::_('select.options', $this->add_php_ajaxOptions, 'value', 'text', $this->state->get('filter.add_php_ajax'))
|
||||
);
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// Add Php Ajax Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_COMPONENTBUILDER_SITE_VIEW_ADD_PHP_AJAX_LABEL').' -',
|
||||
'batch[add_php_ajax]',
|
||||
JHtml::_('select.options', $this->add_php_ajaxOptions, 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Set Add Custom Button Selection
|
||||
$this->add_custom_buttonOptions = $this->getTheAdd_custom_buttonSelections();
|
||||
if ($this->add_custom_buttonOptions)
|
||||
{
|
||||
// Add Custom Button Filter
|
||||
JHtmlSidebar::addFilter(
|
||||
'- Select '.JText::_('COM_COMPONENTBUILDER_SITE_VIEW_ADD_CUSTOM_BUTTON_LABEL').' -',
|
||||
'filter_add_custom_button',
|
||||
JHtml::_('select.options', $this->add_custom_buttonOptions, 'value', 'text', $this->state->get('filter.add_custom_button'))
|
||||
);
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// Add Custom Button Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_COMPONENTBUILDER_SITE_VIEW_ADD_CUSTOM_BUTTON_LABEL').' -',
|
||||
'batch[add_custom_button]',
|
||||
JHtml::_('select.options', $this->add_custom_buttonOptions, 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -235,9 +301,82 @@ class ComponentbuilderViewSite_views extends JViewLegacy
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.system_name' => JText::_('COM_COMPONENTBUILDER_SITE_VIEW_SYSTEM_NAME_LABEL'),
|
||||
'a.name' => JText::_('COM_COMPONENTBUILDER_SITE_VIEW_NAME_LABEL'),
|
||||
'a.codename' => JText::_('COM_COMPONENTBUILDER_SITE_VIEW_CODENAME_LABEL'),
|
||||
'a.description' => JText::_('COM_COMPONENTBUILDER_SITE_VIEW_DESCRIPTION_LABEL'),
|
||||
'g.name' => JText::_('COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_LABEL'),
|
||||
'a.context' => JText::_('COM_COMPONENTBUILDER_SITE_VIEW_CONTEXT_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
|
||||
protected function getTheAdd_php_ajaxSelections()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('add_php_ajax'));
|
||||
$query->from($db->quoteName('#__componentbuilder_site_view'));
|
||||
$query->order($db->quoteName('add_php_ajax') . ' 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 $add_php_ajax)
|
||||
{
|
||||
// Translate the add_php_ajax selection
|
||||
$text = $model->selectionTranslation($add_php_ajax,'add_php_ajax');
|
||||
// Now add the add_php_ajax and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $add_php_ajax, JText::_($text));
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function getTheAdd_custom_buttonSelections()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('add_custom_button'));
|
||||
$query->from($db->quoteName('#__componentbuilder_site_view'));
|
||||
$query->order($db->quoteName('add_custom_button') . ' 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 $add_custom_button)
|
||||
{
|
||||
// Translate the add_custom_button selection
|
||||
$text = $model->selectionTranslation($add_custom_button,'add_custom_button');
|
||||
// Now add the add_custom_button and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $add_custom_button, JText::_($text));
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@@ -82,4 +82,30 @@ if ($this->saveOrder)
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</form>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
// templates footer script
|
||||
|
||||
jQuery.fn.selText = function() {
|
||||
var obj = this[0];
|
||||
if (jQuery.browser.msie) {
|
||||
var range = obj.offsetParent.createTextRange();
|
||||
range.moveToElementText(obj);
|
||||
range.select();
|
||||
} else if (jQuery.browser.mozilla || $.browser.opera) {
|
||||
var selection = obj.ownerDocument.defaultView.getSelection();
|
||||
var range = obj.ownerDocument.createRange();
|
||||
range.selectNodeContents(obj);
|
||||
selection.removeAllRanges();
|
||||
selection.addRange(range);
|
||||
} else if (jQuery.browser.safari) {
|
||||
var selection = obj.ownerDocument.defaultView.getSelection();
|
||||
selection.setBaseAndExtent(obj, 0, obj, 1);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
// make sure the code bocks are active
|
||||
jQuery("code").click(function() {
|
||||
jQuery(this).selText().addClass("selected");
|
||||
});
|
||||
</script>
|
@@ -61,25 +61,35 @@ $edit = "index.php?option=com_componentbuilder&view=templates&task=template.edit
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="nowrap">
|
||||
<div class="name">
|
||||
<?php if ($canDo->get('core.edit')): ?>
|
||||
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->name); ?></a>
|
||||
<?php if ($item->checked_out): ?>
|
||||
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'templates.', $canCheckin); ?>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php echo $this->escape($item->name); ?>
|
||||
<div>
|
||||
<?php if ($canDo->get('core.edit')): ?>
|
||||
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->name); ?></a>
|
||||
<?php if ($item->checked_out): ?>
|
||||
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'templates.', $canCheckin); ?>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php echo $this->escape($item->name); ?>
|
||||
<?php endif; ?><br />
|
||||
<code><?php echo $this->loadTemplate('<?php echo ComponentbuilderHelper::safeString($item->alias); ?>'); ?></code>
|
||||
</div>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->alias); ?>
|
||||
<div><em>
|
||||
<?php echo $this->escape($item->description); ?></em>
|
||||
<ul style="list-style: none">
|
||||
<li><?php echo JText::_("COM_COMPONENTBUILDER_CUSTOM_PHP"); ?>: <b>
|
||||
<?php echo JText::_($item->add_php_view); ?></b></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->description); ?>
|
||||
</td>
|
||||
<td class="hidden-phone">
|
||||
<?php echo $this->escape($item->snippet_name); ?>
|
||||
<td class="nowrap">
|
||||
<div class="name">
|
||||
<?php if ($this->user->authorise('dynamic_get.edit', 'com_componentbuilder.dynamic_get.' . (int)$item->dynamic_get)): ?>
|
||||
<a href="index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id=<?php echo $item->dynamic_get; ?>&ref=templates"><?php echo $this->escape($item->dynamic_get_name); ?></a>
|
||||
<?php else: ?>
|
||||
<?php echo $this->escape($item->dynamic_get_name); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php if ($canDo->get('core.edit.state')) : ?>
|
||||
|
@@ -14,5 +14,5 @@ defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="8"><?php echo $this->pagination->getListFooter(); ?></td>
|
||||
<td colspan="7"><?php echo $this->pagination->getListFooter(); ?></td>
|
||||
</tr>
|
@@ -30,16 +30,13 @@ defined('_JEXEC') or die('Restricted access');
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
<th class="nowrap" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_TEMPLATE_NAME_LABEL', 'name', $this->listDirn, $this->listOrder); ?>
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_TEMPLATES_NAMES', 'name', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_TEMPLATE_ALIAS_LABEL', 'alias', $this->listDirn, $this->listOrder); ?>
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_TEMPLATES_DETAILS', 'description', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_TEMPLATE_DESCRIPTION_LABEL', 'description', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap hidden-phone" >
|
||||
<?php echo JText::_('COM_COMPONENTBUILDER_TEMPLATE_SNIPPET_LABEL'); ?>
|
||||
<th class="nowrap" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_TEMPLATE_DYNAMIC_GET_LABEL', 'dynamic_get_name', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<?php if ($this->canState): ?>
|
||||
<th width="10" class="nowrap center" >
|
||||
|
@@ -187,7 +187,51 @@ class ComponentbuilderViewTemplates extends JViewLegacy
|
||||
'batch[access]',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Set Dynamic Get Name Selection
|
||||
$this->dynamic_getNameOptions = JFormHelper::loadFieldType('Dynamicget')->getOptions();
|
||||
if ($this->dynamic_getNameOptions)
|
||||
{
|
||||
// Dynamic Get Name Filter
|
||||
JHtmlSidebar::addFilter(
|
||||
'- Select '.JText::_('COM_COMPONENTBUILDER_TEMPLATE_DYNAMIC_GET_LABEL').' -',
|
||||
'filter_dynamic_get',
|
||||
JHtml::_('select.options', $this->dynamic_getNameOptions, 'value', 'text', $this->state->get('filter.dynamic_get'))
|
||||
);
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// Dynamic Get Name Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_COMPONENTBUILDER_TEMPLATE_DYNAMIC_GET_LABEL').' -',
|
||||
'batch[dynamic_get]',
|
||||
JHtml::_('select.options', $this->dynamic_getNameOptions, 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Set Add Php View Selection
|
||||
$this->add_php_viewOptions = $this->getTheAdd_php_viewSelections();
|
||||
if ($this->add_php_viewOptions)
|
||||
{
|
||||
// Add Php View Filter
|
||||
JHtmlSidebar::addFilter(
|
||||
'- Select '.JText::_('COM_COMPONENTBUILDER_TEMPLATE_ADD_PHP_VIEW_LABEL').' -',
|
||||
'filter_add_php_view',
|
||||
JHtml::_('select.options', $this->add_php_viewOptions, 'value', 'text', $this->state->get('filter.add_php_view'))
|
||||
);
|
||||
|
||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||
{
|
||||
// Add Php View Batch Selection
|
||||
JHtmlBatch_::addListSelection(
|
||||
'- Keep Original '.JText::_('COM_COMPONENTBUILDER_TEMPLATE_ADD_PHP_VIEW_LABEL').' -',
|
||||
'batch[add_php_view]',
|
||||
JHtml::_('select.options', $this->add_php_viewOptions, 'value', 'text')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -234,9 +278,45 @@ class ComponentbuilderViewTemplates extends JViewLegacy
|
||||
'a.sorting' => JText::_('JGRID_HEADING_ORDERING'),
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.name' => JText::_('COM_COMPONENTBUILDER_TEMPLATE_NAME_LABEL'),
|
||||
'a.alias' => JText::_('COM_COMPONENTBUILDER_TEMPLATE_ALIAS_LABEL'),
|
||||
'a.description' => JText::_('COM_COMPONENTBUILDER_TEMPLATE_DESCRIPTION_LABEL'),
|
||||
'g.name' => JText::_('COM_COMPONENTBUILDER_TEMPLATE_DYNAMIC_GET_LABEL'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
|
||||
protected function getTheAdd_php_viewSelections()
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
// Select the text.
|
||||
$query->select($db->quoteName('add_php_view'));
|
||||
$query->from($db->quoteName('#__componentbuilder_template'));
|
||||
$query->order($db->quoteName('add_php_view') . ' 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 $add_php_view)
|
||||
{
|
||||
// Translate the add_php_view selection
|
||||
$text = $model->selectionTranslation($add_php_view,'add_php_view');
|
||||
// Now add the add_php_view and its text to the options array
|
||||
$_filter[] = JHtml::_('select.option', $add_php_view, JText::_($text));
|
||||
}
|
||||
return $_filter;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user