Added the option to random order the dynamic get result set. gh-348

This commit is contained in:
2018-09-29 02:57:11 +02:00
parent 1447e06dd7
commit fdd1cf7390
9 changed files with 22 additions and 11 deletions

View File

@ -2233,7 +2233,7 @@ class ComponentbuilderModelAjax extends JModelList
/**
* Get the keys of the values to search custom code in
*
* @param string $targe The table targeted
* @param string $target The table targeted
* @param string $type The type of get
*
* @return array The query options

View File

@ -243,7 +243,7 @@ function setCustomCodePlaceholder() {
jQuery('#jcb-placeholder').html('<code>[not ready]</code>');
jQuery('#jcb-placeholder-arg').html('<code>[not ready]</code>');
} else if (functioName.length > 2) {
jQuery('#jcb-placeholder').html('<code><code>[CUSTO'+'MCODE='+functioName+']</code>');
jQuery('#jcb-placeholder').html('<code>[CUSTO'+'MCODE='+functioName+']</code>');
jQuery('#jcb-placeholder-arg').html('<code>[CUSTO'+'MCODE='+functioName+'&#43;value1,value2]</code>');
} else {
jQuery('#jcb-placeholder').html('<code>[save to see]</code>');

View File

@ -954,6 +954,8 @@
COM_COMPONENTBUILDER_DYNAMIC_GET_ASCENDING</option>
<option value="DESC">
COM_COMPONENTBUILDER_DYNAMIC_GET_DESCENDING</option>
<option value="RAND">
COM_COMPONENTBUILDER_DYNAMIC_GET_RANDOM</option>
</field>
</form>
</field>

View File

@ -1680,7 +1680,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
/**
* Get the keys of the values to search custom code in
*
* @param string $targe The table targeted
* @param string $target The table targeted
* @param string $type The type of get
*
* @return array The query options