Component-Builder/admin/models/forms/dynamic_get.js

1409 lines
40 KiB
JavaScript
Raw Normal View History

2016-01-30 20:28:43 +00:00
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
2016-01-30 20:28:43 +00:00
@version 2.6.x
@created 30th April, 2015
2016-01-30 20:28:43 +00:00
@package Component Builder
@subpackage dynamic_get.js
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
2016-01-30 20:28:43 +00:00
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// Some Global Values
jform_vvvvvyuvys_required = false;
jform_vvvvvyvvyt_required = false;
jform_vvvvvywvyu_required = false;
jform_vvvvvyxvyv_required = false;
jform_vvvvvyyvyw_required = false;
jform_vvvvvyzvyx_required = false;
jform_vvvvvzevyy_required = false;
jform_vvvvvzgvyz_required = false;
jform_vvvvvzhvza_required = false;
jform_vvvvvzjvzb_required = false;
jform_vvvvvzjvzc_required = false;
jform_vvvvvzkvzd_required = false;
jform_vvvvvzlvze_required = false;
jform_vvvvvzmvzf_required = false;
jform_vvvvvzovzg_required = false;
jform_vvvvvzovzh_required = false;
jform_vvvvvzovzi_required = false;
jform_vvvvvzpvzj_required = false;
2016-01-30 20:28:43 +00:00
// Initial Script
jQuery(document).ready(function()
{
var gettype_vvvvvyu = jQuery("#jform_gettype").val();
vvvvvyu(gettype_vvvvvyu);
var main_source_vvvvvyv = jQuery("#jform_main_source").val();
vvvvvyv(main_source_vvvvvyv);
var main_source_vvvvvyw = jQuery("#jform_main_source").val();
vvvvvyw(main_source_vvvvvyw);
var main_source_vvvvvyx = jQuery("#jform_main_source").val();
vvvvvyx(main_source_vvvvvyx);
var main_source_vvvvvyy = jQuery("#jform_main_source").val();
vvvvvyy(main_source_vvvvvyy);
var addcalculation_vvvvvyz = jQuery("#jform_addcalculation input[type='radio']:checked").val();
vvvvvyz(addcalculation_vvvvvyz);
var addcalculation_vvvvvza = jQuery("#jform_addcalculation input[type='radio']:checked").val();
var gettype_vvvvvza = jQuery("#jform_gettype").val();
vvvvvza(addcalculation_vvvvvza,gettype_vvvvvza);
var addcalculation_vvvvvzb = jQuery("#jform_addcalculation input[type='radio']:checked").val();
var gettype_vvvvvzb = jQuery("#jform_gettype").val();
vvvvvzb(addcalculation_vvvvvzb,gettype_vvvvvzb);
var main_source_vvvvvze = jQuery("#jform_main_source").val();
vvvvvze(main_source_vvvvvze);
var main_source_vvvvvzf = jQuery("#jform_main_source").val();
vvvvvzf(main_source_vvvvvzf);
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_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 gettype_vvvvvzj = jQuery("#jform_gettype").val();
vvvvvzj(gettype_vvvvvzj);
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);
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);
var add_php_after_getitems_vvvvvzm = jQuery("#jform_add_php_after_getitems input[type='radio']:checked").val();
var gettype_vvvvvzm = jQuery("#jform_gettype").val();
vvvvvzm(add_php_after_getitems_vvvvvzm,gettype_vvvvvzm);
var gettype_vvvvvzo = jQuery("#jform_gettype").val();
vvvvvzo(gettype_vvvvvzo);
var gettype_vvvvvzp = jQuery("#jform_gettype").val();
vvvvvzp(gettype_vvvvvzp);
2016-01-30 20:28:43 +00:00
});
// the vvvvvyu function
function vvvvvyu(gettype_vvvvvyu)
2016-01-30 20:28:43 +00:00
{
if (isSet(gettype_vvvvvyu) && gettype_vvvvvyu.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvyu = gettype_vvvvvyu;
var gettype_vvvvvyu = [];
gettype_vvvvvyu.push(temp_vvvvvyu);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(gettype_vvvvvyu))
2016-01-30 20:28:43 +00:00
{
var gettype_vvvvvyu = [];
2016-01-30 20:28:43 +00:00
}
var gettype = gettype_vvvvvyu.some(gettype_vvvvvyu_SomeFunc);
2016-01-30 20:28:43 +00:00
// set this function logic
if (gettype)
{
jQuery('#jform_getcustom').closest('.control-group').show();
if (jform_vvvvvyuvys_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('getcustom',0);
jQuery('#jform_getcustom').prop('required','required');
jQuery('#jform_getcustom').attr('aria-required',true);
jQuery('#jform_getcustom').addClass('required');
jform_vvvvvyuvys_required = false;
2016-01-30 20:28:43 +00:00
}
}
else
{
jQuery('#jform_getcustom').closest('.control-group').hide();
if (!jform_vvvvvyuvys_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('getcustom',1);
jQuery('#jform_getcustom').removeAttr('required');
jQuery('#jform_getcustom').removeAttr('aria-required');
jQuery('#jform_getcustom').removeClass('required');
jform_vvvvvyuvys_required = true;
2016-01-30 20:28:43 +00:00
}
}
}
// the vvvvvyu Some function
function gettype_vvvvvyu_SomeFunc(gettype_vvvvvyu)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (gettype_vvvvvyu == 3 || gettype_vvvvvyu == 4)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvyv function
function vvvvvyv(main_source_vvvvvyv)
2016-01-30 20:28:43 +00:00
{
if (isSet(main_source_vvvvvyv) && main_source_vvvvvyv.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvyv = main_source_vvvvvyv;
var main_source_vvvvvyv = [];
main_source_vvvvvyv.push(temp_vvvvvyv);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(main_source_vvvvvyv))
2016-01-30 20:28:43 +00:00
{
var main_source_vvvvvyv = [];
2016-01-30 20:28:43 +00:00
}
var main_source = main_source_vvvvvyv.some(main_source_vvvvvyv_SomeFunc);
2016-01-30 20:28:43 +00:00
// set this function logic
if (main_source)
{
jQuery('#jform_view_table_main').closest('.control-group').show();
if (jform_vvvvvyvvyt_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('view_table_main',0);
jQuery('#jform_view_table_main').prop('required','required');
jQuery('#jform_view_table_main').attr('aria-required',true);
jQuery('#jform_view_table_main').addClass('required');
jform_vvvvvyvvyt_required = false;
2016-01-30 20:28:43 +00:00
}
}
else
{
jQuery('#jform_view_table_main').closest('.control-group').hide();
if (!jform_vvvvvyvvyt_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('view_table_main',1);
jQuery('#jform_view_table_main').removeAttr('required');
jQuery('#jform_view_table_main').removeAttr('aria-required');
jQuery('#jform_view_table_main').removeClass('required');
jform_vvvvvyvvyt_required = true;
2016-01-30 20:28:43 +00:00
}
}
}
// the vvvvvyv Some function
function main_source_vvvvvyv_SomeFunc(main_source_vvvvvyv)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (main_source_vvvvvyv == 1)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvyw function
function vvvvvyw(main_source_vvvvvyw)
2016-01-30 20:28:43 +00:00
{
if (isSet(main_source_vvvvvyw) && main_source_vvvvvyw.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvyw = main_source_vvvvvyw;
var main_source_vvvvvyw = [];
main_source_vvvvvyw.push(temp_vvvvvyw);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(main_source_vvvvvyw))
2016-01-30 20:28:43 +00:00
{
var main_source_vvvvvyw = [];
2016-01-30 20:28:43 +00:00
}
var main_source = main_source_vvvvvyw.some(main_source_vvvvvyw_SomeFunc);
2016-01-30 20:28:43 +00:00
// set this function logic
if (main_source)
{
jQuery('#jform_view_selection').closest('.control-group').show();
if (jform_vvvvvywvyu_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('view_selection',0);
jQuery('#jform_view_selection').prop('required','required');
jQuery('#jform_view_selection').attr('aria-required',true);
jQuery('#jform_view_selection').addClass('required');
jform_vvvvvywvyu_required = false;
2016-01-30 20:28:43 +00:00
}
}
else
{
jQuery('#jform_view_selection').closest('.control-group').hide();
if (!jform_vvvvvywvyu_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('view_selection',1);
jQuery('#jform_view_selection').removeAttr('required');
jQuery('#jform_view_selection').removeAttr('aria-required');
jQuery('#jform_view_selection').removeClass('required');
jform_vvvvvywvyu_required = true;
2016-01-30 20:28:43 +00:00
}
}
}
// the vvvvvyw Some function
function main_source_vvvvvyw_SomeFunc(main_source_vvvvvyw)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (main_source_vvvvvyw == 1)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvyx function
function vvvvvyx(main_source_vvvvvyx)
2016-01-30 20:28:43 +00:00
{
if (isSet(main_source_vvvvvyx) && main_source_vvvvvyx.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvyx = main_source_vvvvvyx;
var main_source_vvvvvyx = [];
main_source_vvvvvyx.push(temp_vvvvvyx);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(main_source_vvvvvyx))
2016-01-30 20:28:43 +00:00
{
var main_source_vvvvvyx = [];
2016-01-30 20:28:43 +00:00
}
var main_source = main_source_vvvvvyx.some(main_source_vvvvvyx_SomeFunc);
2016-01-30 20:28:43 +00:00
// set this function logic
if (main_source)
{
jQuery('#jform_db_table_main').closest('.control-group').show();
if (jform_vvvvvyxvyv_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('db_table_main',0);
jQuery('#jform_db_table_main').prop('required','required');
jQuery('#jform_db_table_main').attr('aria-required',true);
jQuery('#jform_db_table_main').addClass('required');
jform_vvvvvyxvyv_required = false;
2016-01-30 20:28:43 +00:00
}
}
else
{
jQuery('#jform_db_table_main').closest('.control-group').hide();
if (!jform_vvvvvyxvyv_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('db_table_main',1);
jQuery('#jform_db_table_main').removeAttr('required');
jQuery('#jform_db_table_main').removeAttr('aria-required');
jQuery('#jform_db_table_main').removeClass('required');
jform_vvvvvyxvyv_required = true;
2016-01-30 20:28:43 +00:00
}
}
}
// the vvvvvyx Some function
function main_source_vvvvvyx_SomeFunc(main_source_vvvvvyx)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (main_source_vvvvvyx == 2)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvyy function
function vvvvvyy(main_source_vvvvvyy)
2016-01-30 20:28:43 +00:00
{
if (isSet(main_source_vvvvvyy) && main_source_vvvvvyy.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvyy = main_source_vvvvvyy;
var main_source_vvvvvyy = [];
main_source_vvvvvyy.push(temp_vvvvvyy);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(main_source_vvvvvyy))
2016-01-30 20:28:43 +00:00
{
var main_source_vvvvvyy = [];
2016-01-30 20:28:43 +00:00
}
var main_source = main_source_vvvvvyy.some(main_source_vvvvvyy_SomeFunc);
2016-01-30 20:28:43 +00:00
// set this function logic
if (main_source)
{
jQuery('#jform_db_selection').closest('.control-group').show();
if (jform_vvvvvyyvyw_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('db_selection',0);
jQuery('#jform_db_selection').prop('required','required');
jQuery('#jform_db_selection').attr('aria-required',true);
jQuery('#jform_db_selection').addClass('required');
jform_vvvvvyyvyw_required = false;
2016-01-30 20:28:43 +00:00
}
}
else
{
jQuery('#jform_db_selection').closest('.control-group').hide();
if (!jform_vvvvvyyvyw_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('db_selection',1);
jQuery('#jform_db_selection').removeAttr('required');
jQuery('#jform_db_selection').removeAttr('aria-required');
jQuery('#jform_db_selection').removeClass('required');
jform_vvvvvyyvyw_required = true;
2016-01-30 20:28:43 +00:00
}
}
}
// the vvvvvyy Some function
function main_source_vvvvvyy_SomeFunc(main_source_vvvvvyy)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (main_source_vvvvvyy == 2)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvyz function
function vvvvvyz(addcalculation_vvvvvyz)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (addcalculation_vvvvvyz == 1)
2016-01-30 20:28:43 +00:00
{
jQuery('#jform_php_calculation').closest('.control-group').show();
if (jform_vvvvvyzvyx_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('php_calculation',0);
jQuery('#jform_php_calculation').prop('required','required');
jQuery('#jform_php_calculation').attr('aria-required',true);
jQuery('#jform_php_calculation').addClass('required');
jform_vvvvvyzvyx_required = false;
2016-01-30 20:28:43 +00:00
}
}
else
{
jQuery('#jform_php_calculation').closest('.control-group').hide();
if (!jform_vvvvvyzvyx_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('php_calculation',1);
jQuery('#jform_php_calculation').removeAttr('required');
jQuery('#jform_php_calculation').removeAttr('aria-required');
jQuery('#jform_php_calculation').removeClass('required');
jform_vvvvvyzvyx_required = true;
2016-01-30 20:28:43 +00:00
}
}
}
// the vvvvvza function
function vvvvvza(addcalculation_vvvvvza,gettype_vvvvvza)
2016-01-30 20:28:43 +00:00
{
if (isSet(addcalculation_vvvvvza) && addcalculation_vvvvvza.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvza = addcalculation_vvvvvza;
var addcalculation_vvvvvza = [];
addcalculation_vvvvvza.push(temp_vvvvvza);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(addcalculation_vvvvvza))
2016-01-30 20:28:43 +00:00
{
var addcalculation_vvvvvza = [];
2016-01-30 20:28:43 +00:00
}
var addcalculation = addcalculation_vvvvvza.some(addcalculation_vvvvvza_SomeFunc);
2016-01-30 20:28:43 +00:00
if (isSet(gettype_vvvvvza) && gettype_vvvvvza.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvza = gettype_vvvvvza;
var gettype_vvvvvza = [];
gettype_vvvvvza.push(temp_vvvvvza);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(gettype_vvvvvza))
2016-01-30 20:28:43 +00:00
{
var gettype_vvvvvza = [];
2016-01-30 20:28:43 +00:00
}
var gettype = gettype_vvvvvza.some(gettype_vvvvvza_SomeFunc);
2016-01-30 20:28:43 +00:00
// set this function logic
if (addcalculation && gettype)
{
jQuery('.note_calculation_item').closest('.control-group').show();
}
else
{
jQuery('.note_calculation_item').closest('.control-group').hide();
}
}
// the vvvvvza Some function
function addcalculation_vvvvvza_SomeFunc(addcalculation_vvvvvza)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (addcalculation_vvvvvza == 1)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvza Some function
function gettype_vvvvvza_SomeFunc(gettype_vvvvvza)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (gettype_vvvvvza == 1 || gettype_vvvvvza == 3)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvzb function
function vvvvvzb(addcalculation_vvvvvzb,gettype_vvvvvzb)
2016-01-30 20:28:43 +00:00
{
if (isSet(addcalculation_vvvvvzb) && addcalculation_vvvvvzb.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvzb = addcalculation_vvvvvzb;
var addcalculation_vvvvvzb = [];
addcalculation_vvvvvzb.push(temp_vvvvvzb);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(addcalculation_vvvvvzb))
2016-01-30 20:28:43 +00:00
{
var addcalculation_vvvvvzb = [];
2016-01-30 20:28:43 +00:00
}
var addcalculation = addcalculation_vvvvvzb.some(addcalculation_vvvvvzb_SomeFunc);
2016-01-30 20:28:43 +00:00
if (isSet(gettype_vvvvvzb) && gettype_vvvvvzb.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvzb = gettype_vvvvvzb;
var gettype_vvvvvzb = [];
gettype_vvvvvzb.push(temp_vvvvvzb);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(gettype_vvvvvzb))
2016-01-30 20:28:43 +00:00
{
var gettype_vvvvvzb = [];
2016-01-30 20:28:43 +00:00
}
var gettype = gettype_vvvvvzb.some(gettype_vvvvvzb_SomeFunc);
2016-01-30 20:28:43 +00:00
// set this function logic
if (addcalculation && gettype)
{
jQuery('.note_calculation_items').closest('.control-group').show();
}
else
{
jQuery('.note_calculation_items').closest('.control-group').hide();
}
}
// the vvvvvzb Some function
function addcalculation_vvvvvzb_SomeFunc(addcalculation_vvvvvzb)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (addcalculation_vvvvvzb == 1)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvzb Some function
function gettype_vvvvvzb_SomeFunc(gettype_vvvvvzb)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (gettype_vvvvvzb == 2 || gettype_vvvvvzb == 4)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvze function
function vvvvvze(main_source_vvvvvze)
2016-01-30 20:28:43 +00:00
{
if (isSet(main_source_vvvvvze) && main_source_vvvvvze.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvze = main_source_vvvvvze;
var main_source_vvvvvze = [];
main_source_vvvvvze.push(temp_vvvvvze);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(main_source_vvvvvze))
2016-01-30 20:28:43 +00:00
{
var main_source_vvvvvze = [];
2016-01-30 20:28:43 +00:00
}
var main_source = main_source_vvvvvze.some(main_source_vvvvvze_SomeFunc);
2016-01-30 20:28:43 +00:00
// set this function logic
if (main_source)
{
jQuery('#jform_php_custom_get').closest('.control-group').show();
if (jform_vvvvvzevyy_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('php_custom_get',0);
jQuery('#jform_php_custom_get').prop('required','required');
jQuery('#jform_php_custom_get').attr('aria-required',true);
jQuery('#jform_php_custom_get').addClass('required');
jform_vvvvvzevyy_required = false;
2016-01-30 20:28:43 +00:00
}
}
else
{
jQuery('#jform_php_custom_get').closest('.control-group').hide();
if (!jform_vvvvvzevyy_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('php_custom_get',1);
jQuery('#jform_php_custom_get').removeAttr('required');
jQuery('#jform_php_custom_get').removeAttr('aria-required');
jQuery('#jform_php_custom_get').removeClass('required');
jform_vvvvvzevyy_required = true;
2016-01-30 20:28:43 +00:00
}
}
}
// the vvvvvze Some function
function main_source_vvvvvze_SomeFunc(main_source_vvvvvze)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (main_source_vvvvvze == 3)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvzf function
function vvvvvzf(main_source_vvvvvzf)
2016-01-30 20:28:43 +00:00
{
if (isSet(main_source_vvvvvzf) && main_source_vvvvvzf.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvzf = main_source_vvvvvzf;
var main_source_vvvvvzf = [];
main_source_vvvvvzf.push(temp_vvvvvzf);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(main_source_vvvvvzf))
2016-01-30 20:28:43 +00:00
{
var main_source_vvvvvzf = [];
2016-01-30 20:28:43 +00:00
}
var main_source = main_source_vvvvvzf.some(main_source_vvvvvzf_SomeFunc);
2016-01-30 20:28:43 +00:00
// set this function logic
if (main_source)
{
jQuery('#jform_filter-lbl').closest('.control-group').show();
jQuery('#jform_global-lbl').closest('.control-group').show();
jQuery('#jform_order-lbl').closest('.control-group').show();
jQuery('#jform_where-lbl').closest('.control-group').show();
jQuery('#jform_join_db_table-lbl').closest('.control-group').show();
jQuery('#jform_join_view_table-lbl').closest('.control-group').show();
2016-01-30 20:28:43 +00:00
}
else
{
jQuery('#jform_filter-lbl').closest('.control-group').hide();
jQuery('#jform_global-lbl').closest('.control-group').hide();
jQuery('#jform_order-lbl').closest('.control-group').hide();
jQuery('#jform_where-lbl').closest('.control-group').hide();
jQuery('#jform_join_db_table-lbl').closest('.control-group').hide();
jQuery('#jform_join_view_table-lbl').closest('.control-group').hide();
2016-01-30 20:28:43 +00:00
}
}
// the vvvvvzf Some function
function main_source_vvvvvzf_SomeFunc(main_source_vvvvvzf)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (main_source_vvvvvzf == 1 || main_source_vvvvvzf == 2)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvzg function
function vvvvvzg(add_php_before_getitem_vvvvvzg,gettype_vvvvvzg)
2016-01-30 20:28:43 +00:00
{
if (isSet(add_php_before_getitem_vvvvvzg) && add_php_before_getitem_vvvvvzg.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvzg = add_php_before_getitem_vvvvvzg;
var add_php_before_getitem_vvvvvzg = [];
add_php_before_getitem_vvvvvzg.push(temp_vvvvvzg);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(add_php_before_getitem_vvvvvzg))
2016-01-30 20:28:43 +00:00
{
var add_php_before_getitem_vvvvvzg = [];
2016-01-30 20:28:43 +00:00
}
var add_php_before_getitem = add_php_before_getitem_vvvvvzg.some(add_php_before_getitem_vvvvvzg_SomeFunc);
2016-01-30 20:28:43 +00:00
if (isSet(gettype_vvvvvzg) && gettype_vvvvvzg.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvzg = gettype_vvvvvzg;
var gettype_vvvvvzg = [];
gettype_vvvvvzg.push(temp_vvvvvzg);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(gettype_vvvvvzg))
2016-01-30 20:28:43 +00:00
{
var gettype_vvvvvzg = [];
2016-01-30 20:28:43 +00:00
}
var gettype = gettype_vvvvvzg.some(gettype_vvvvvzg_SomeFunc);
2016-01-30 20:28:43 +00:00
// set this function logic
if (add_php_before_getitem && gettype)
{
jQuery('#jform_php_before_getitem').closest('.control-group').show();
if (jform_vvvvvzgvyz_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('php_before_getitem',0);
jQuery('#jform_php_before_getitem').prop('required','required');
jQuery('#jform_php_before_getitem').attr('aria-required',true);
jQuery('#jform_php_before_getitem').addClass('required');
jform_vvvvvzgvyz_required = false;
2016-01-30 20:28:43 +00:00
}
}
else
{
jQuery('#jform_php_before_getitem').closest('.control-group').hide();
if (!jform_vvvvvzgvyz_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('php_before_getitem',1);
jQuery('#jform_php_before_getitem').removeAttr('required');
jQuery('#jform_php_before_getitem').removeAttr('aria-required');
jQuery('#jform_php_before_getitem').removeClass('required');
jform_vvvvvzgvyz_required = true;
2016-01-30 20:28:43 +00:00
}
}
}
// the vvvvvzg Some function
function add_php_before_getitem_vvvvvzg_SomeFunc(add_php_before_getitem_vvvvvzg)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (add_php_before_getitem_vvvvvzg == 1)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvzg Some function
function gettype_vvvvvzg_SomeFunc(gettype_vvvvvzg)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (gettype_vvvvvzg == 1 || gettype_vvvvvzg == 3)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvzh function
function vvvvvzh(add_php_after_getitem_vvvvvzh,gettype_vvvvvzh)
2016-01-30 20:28:43 +00:00
{
if (isSet(add_php_after_getitem_vvvvvzh) && add_php_after_getitem_vvvvvzh.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvzh = add_php_after_getitem_vvvvvzh;
var add_php_after_getitem_vvvvvzh = [];
add_php_after_getitem_vvvvvzh.push(temp_vvvvvzh);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(add_php_after_getitem_vvvvvzh))
2016-01-30 20:28:43 +00:00
{
var add_php_after_getitem_vvvvvzh = [];
2016-01-30 20:28:43 +00:00
}
var add_php_after_getitem = add_php_after_getitem_vvvvvzh.some(add_php_after_getitem_vvvvvzh_SomeFunc);
2016-01-30 20:28:43 +00:00
if (isSet(gettype_vvvvvzh) && gettype_vvvvvzh.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvzh = gettype_vvvvvzh;
var gettype_vvvvvzh = [];
gettype_vvvvvzh.push(temp_vvvvvzh);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(gettype_vvvvvzh))
2016-01-30 20:28:43 +00:00
{
var gettype_vvvvvzh = [];
2016-01-30 20:28:43 +00:00
}
var gettype = gettype_vvvvvzh.some(gettype_vvvvvzh_SomeFunc);
2016-01-30 20:28:43 +00:00
// set this function logic
if (add_php_after_getitem && gettype)
{
jQuery('#jform_php_after_getitem').closest('.control-group').show();
if (jform_vvvvvzhvza_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('php_after_getitem',0);
jQuery('#jform_php_after_getitem').prop('required','required');
jQuery('#jform_php_after_getitem').attr('aria-required',true);
jQuery('#jform_php_after_getitem').addClass('required');
jform_vvvvvzhvza_required = false;
2016-01-30 20:28:43 +00:00
}
}
else
{
jQuery('#jform_php_after_getitem').closest('.control-group').hide();
if (!jform_vvvvvzhvza_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('php_after_getitem',1);
jQuery('#jform_php_after_getitem').removeAttr('required');
jQuery('#jform_php_after_getitem').removeAttr('aria-required');
jQuery('#jform_php_after_getitem').removeClass('required');
jform_vvvvvzhvza_required = true;
2016-01-30 20:28:43 +00:00
}
}
}
// the vvvvvzh Some function
function add_php_after_getitem_vvvvvzh_SomeFunc(add_php_after_getitem_vvvvvzh)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (add_php_after_getitem_vvvvvzh == 1)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvzh Some function
function gettype_vvvvvzh_SomeFunc(gettype_vvvvvzh)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (gettype_vvvvvzh == 1 || gettype_vvvvvzh == 3)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvzj function
function vvvvvzj(gettype_vvvvvzj)
2016-01-30 20:28:43 +00:00
{
if (isSet(gettype_vvvvvzj) && gettype_vvvvvzj.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvzj = gettype_vvvvvzj;
var gettype_vvvvvzj = [];
gettype_vvvvvzj.push(temp_vvvvvzj);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(gettype_vvvvvzj))
2016-01-30 20:28:43 +00:00
{
var gettype_vvvvvzj = [];
2016-01-30 20:28:43 +00:00
}
var gettype = gettype_vvvvvzj.some(gettype_vvvvvzj_SomeFunc);
2016-01-30 20:28:43 +00:00
// set this function logic
if (gettype)
{
jQuery('#jform_add_php_after_getitem').closest('.control-group').show();
if (jform_vvvvvzjvzb_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('add_php_after_getitem',0);
jQuery('#jform_add_php_after_getitem').prop('required','required');
jQuery('#jform_add_php_after_getitem').attr('aria-required',true);
jQuery('#jform_add_php_after_getitem').addClass('required');
jform_vvvvvzjvzb_required = false;
2016-01-30 20:28:43 +00:00
}
jQuery('#jform_add_php_before_getitem').closest('.control-group').show();
if (jform_vvvvvzjvzc_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('add_php_before_getitem',0);
jQuery('#jform_add_php_before_getitem').prop('required','required');
jQuery('#jform_add_php_before_getitem').attr('aria-required',true);
jQuery('#jform_add_php_before_getitem').addClass('required');
jform_vvvvvzjvzc_required = false;
2016-01-30 20:28:43 +00:00
}
}
else
{
jQuery('#jform_add_php_after_getitem').closest('.control-group').hide();
if (!jform_vvvvvzjvzb_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('add_php_after_getitem',1);
jQuery('#jform_add_php_after_getitem').removeAttr('required');
jQuery('#jform_add_php_after_getitem').removeAttr('aria-required');
jQuery('#jform_add_php_after_getitem').removeClass('required');
jform_vvvvvzjvzb_required = true;
2016-01-30 20:28:43 +00:00
}
jQuery('#jform_add_php_before_getitem').closest('.control-group').hide();
if (!jform_vvvvvzjvzc_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('add_php_before_getitem',1);
jQuery('#jform_add_php_before_getitem').removeAttr('required');
jQuery('#jform_add_php_before_getitem').removeAttr('aria-required');
jQuery('#jform_add_php_before_getitem').removeClass('required');
jform_vvvvvzjvzc_required = true;
2016-01-30 20:28:43 +00:00
}
}
}
// the vvvvvzj Some function
function gettype_vvvvvzj_SomeFunc(gettype_vvvvvzj)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (gettype_vvvvvzj == 1 || gettype_vvvvvzj == 3)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvzk function
function vvvvvzk(add_php_getlistquery_vvvvvzk,gettype_vvvvvzk)
2016-01-30 20:28:43 +00:00
{
if (isSet(add_php_getlistquery_vvvvvzk) && add_php_getlistquery_vvvvvzk.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvzk = add_php_getlistquery_vvvvvzk;
var add_php_getlistquery_vvvvvzk = [];
add_php_getlistquery_vvvvvzk.push(temp_vvvvvzk);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(add_php_getlistquery_vvvvvzk))
2016-01-30 20:28:43 +00:00
{
var add_php_getlistquery_vvvvvzk = [];
2016-01-30 20:28:43 +00:00
}
var add_php_getlistquery = add_php_getlistquery_vvvvvzk.some(add_php_getlistquery_vvvvvzk_SomeFunc);
2016-01-30 20:28:43 +00:00
if (isSet(gettype_vvvvvzk) && gettype_vvvvvzk.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvzk = gettype_vvvvvzk;
var gettype_vvvvvzk = [];
gettype_vvvvvzk.push(temp_vvvvvzk);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(gettype_vvvvvzk))
2016-01-30 20:28:43 +00:00
{
var gettype_vvvvvzk = [];
2016-01-30 20:28:43 +00:00
}
var gettype = gettype_vvvvvzk.some(gettype_vvvvvzk_SomeFunc);
2016-01-30 20:28:43 +00:00
// set this function logic
if (add_php_getlistquery && gettype)
{
jQuery('#jform_php_getlistquery').closest('.control-group').show();
if (jform_vvvvvzkvzd_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('php_getlistquery',0);
jQuery('#jform_php_getlistquery').prop('required','required');
jQuery('#jform_php_getlistquery').attr('aria-required',true);
jQuery('#jform_php_getlistquery').addClass('required');
jform_vvvvvzkvzd_required = false;
2016-01-30 20:28:43 +00:00
}
}
else
{
jQuery('#jform_php_getlistquery').closest('.control-group').hide();
if (!jform_vvvvvzkvzd_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('php_getlistquery',1);
jQuery('#jform_php_getlistquery').removeAttr('required');
jQuery('#jform_php_getlistquery').removeAttr('aria-required');
jQuery('#jform_php_getlistquery').removeClass('required');
jform_vvvvvzkvzd_required = true;
2016-01-30 20:28:43 +00:00
}
}
}
// the vvvvvzk Some function
function add_php_getlistquery_vvvvvzk_SomeFunc(add_php_getlistquery_vvvvvzk)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (add_php_getlistquery_vvvvvzk == 1)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvzk Some function
function gettype_vvvvvzk_SomeFunc(gettype_vvvvvzk)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (gettype_vvvvvzk == 2 || gettype_vvvvvzk == 4)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvzl function
function vvvvvzl(add_php_before_getitems_vvvvvzl,gettype_vvvvvzl)
2016-01-30 20:28:43 +00:00
{
if (isSet(add_php_before_getitems_vvvvvzl) && add_php_before_getitems_vvvvvzl.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvzl = add_php_before_getitems_vvvvvzl;
var add_php_before_getitems_vvvvvzl = [];
add_php_before_getitems_vvvvvzl.push(temp_vvvvvzl);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(add_php_before_getitems_vvvvvzl))
2016-01-30 20:28:43 +00:00
{
var add_php_before_getitems_vvvvvzl = [];
2016-01-30 20:28:43 +00:00
}
var add_php_before_getitems = add_php_before_getitems_vvvvvzl.some(add_php_before_getitems_vvvvvzl_SomeFunc);
2016-01-30 20:28:43 +00:00
if (isSet(gettype_vvvvvzl) && gettype_vvvvvzl.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvzl = gettype_vvvvvzl;
var gettype_vvvvvzl = [];
gettype_vvvvvzl.push(temp_vvvvvzl);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(gettype_vvvvvzl))
2016-01-30 20:28:43 +00:00
{
var gettype_vvvvvzl = [];
2016-01-30 20:28:43 +00:00
}
var gettype = gettype_vvvvvzl.some(gettype_vvvvvzl_SomeFunc);
2016-01-30 20:28:43 +00:00
// set this function logic
if (add_php_before_getitems && gettype)
{
jQuery('#jform_php_before_getitems').closest('.control-group').show();
if (jform_vvvvvzlvze_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('php_before_getitems',0);
jQuery('#jform_php_before_getitems').prop('required','required');
jQuery('#jform_php_before_getitems').attr('aria-required',true);
jQuery('#jform_php_before_getitems').addClass('required');
jform_vvvvvzlvze_required = false;
2016-01-30 20:28:43 +00:00
}
}
else
{
jQuery('#jform_php_before_getitems').closest('.control-group').hide();
if (!jform_vvvvvzlvze_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('php_before_getitems',1);
jQuery('#jform_php_before_getitems').removeAttr('required');
jQuery('#jform_php_before_getitems').removeAttr('aria-required');
jQuery('#jform_php_before_getitems').removeClass('required');
jform_vvvvvzlvze_required = true;
2016-01-30 20:28:43 +00:00
}
}
}
// the vvvvvzl Some function
function add_php_before_getitems_vvvvvzl_SomeFunc(add_php_before_getitems_vvvvvzl)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (add_php_before_getitems_vvvvvzl == 1)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvzl Some function
function gettype_vvvvvzl_SomeFunc(gettype_vvvvvzl)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (gettype_vvvvvzl == 2 || gettype_vvvvvzl == 4)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvzm function
function vvvvvzm(add_php_after_getitems_vvvvvzm,gettype_vvvvvzm)
2016-01-30 20:28:43 +00:00
{
if (isSet(add_php_after_getitems_vvvvvzm) && add_php_after_getitems_vvvvvzm.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvzm = add_php_after_getitems_vvvvvzm;
var add_php_after_getitems_vvvvvzm = [];
add_php_after_getitems_vvvvvzm.push(temp_vvvvvzm);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(add_php_after_getitems_vvvvvzm))
2016-01-30 20:28:43 +00:00
{
var add_php_after_getitems_vvvvvzm = [];
2016-01-30 20:28:43 +00:00
}
var add_php_after_getitems = add_php_after_getitems_vvvvvzm.some(add_php_after_getitems_vvvvvzm_SomeFunc);
2016-01-30 20:28:43 +00:00
if (isSet(gettype_vvvvvzm) && gettype_vvvvvzm.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvzm = gettype_vvvvvzm;
var gettype_vvvvvzm = [];
gettype_vvvvvzm.push(temp_vvvvvzm);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(gettype_vvvvvzm))
2016-01-30 20:28:43 +00:00
{
var gettype_vvvvvzm = [];
2016-01-30 20:28:43 +00:00
}
var gettype = gettype_vvvvvzm.some(gettype_vvvvvzm_SomeFunc);
2016-01-30 20:28:43 +00:00
// set this function logic
if (add_php_after_getitems && gettype)
{
jQuery('#jform_php_after_getitems').closest('.control-group').show();
if (jform_vvvvvzmvzf_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('php_after_getitems',0);
jQuery('#jform_php_after_getitems').prop('required','required');
jQuery('#jform_php_after_getitems').attr('aria-required',true);
jQuery('#jform_php_after_getitems').addClass('required');
jform_vvvvvzmvzf_required = false;
2016-01-30 20:28:43 +00:00
}
}
else
{
jQuery('#jform_php_after_getitems').closest('.control-group').hide();
if (!jform_vvvvvzmvzf_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('php_after_getitems',1);
jQuery('#jform_php_after_getitems').removeAttr('required');
jQuery('#jform_php_after_getitems').removeAttr('aria-required');
jQuery('#jform_php_after_getitems').removeClass('required');
jform_vvvvvzmvzf_required = true;
2016-01-30 20:28:43 +00:00
}
}
}
// the vvvvvzm Some function
function add_php_after_getitems_vvvvvzm_SomeFunc(add_php_after_getitems_vvvvvzm)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (add_php_after_getitems_vvvvvzm == 1)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvzm Some function
function gettype_vvvvvzm_SomeFunc(gettype_vvvvvzm)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (gettype_vvvvvzm == 2 || gettype_vvvvvzm == 4)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvzo function
function vvvvvzo(gettype_vvvvvzo)
2016-01-30 20:28:43 +00:00
{
if (isSet(gettype_vvvvvzo) && gettype_vvvvvzo.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvzo = gettype_vvvvvzo;
var gettype_vvvvvzo = [];
gettype_vvvvvzo.push(temp_vvvvvzo);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(gettype_vvvvvzo))
2016-01-30 20:28:43 +00:00
{
var gettype_vvvvvzo = [];
2016-01-30 20:28:43 +00:00
}
var gettype = gettype_vvvvvzo.some(gettype_vvvvvzo_SomeFunc);
2016-01-30 20:28:43 +00:00
// set this function logic
if (gettype)
{
jQuery('#jform_add_php_after_getitems').closest('.control-group').show();
if (jform_vvvvvzovzg_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('add_php_after_getitems',0);
jQuery('#jform_add_php_after_getitems').prop('required','required');
jQuery('#jform_add_php_after_getitems').attr('aria-required',true);
jQuery('#jform_add_php_after_getitems').addClass('required');
jform_vvvvvzovzg_required = false;
2016-01-30 20:28:43 +00:00
}
jQuery('#jform_add_php_before_getitems').closest('.control-group').show();
if (jform_vvvvvzovzh_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('add_php_before_getitems',0);
jQuery('#jform_add_php_before_getitems').prop('required','required');
jQuery('#jform_add_php_before_getitems').attr('aria-required',true);
jQuery('#jform_add_php_before_getitems').addClass('required');
jform_vvvvvzovzh_required = false;
2016-01-30 20:28:43 +00:00
}
jQuery('#jform_add_php_getlistquery').closest('.control-group').show();
if (jform_vvvvvzovzi_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('add_php_getlistquery',0);
jQuery('#jform_add_php_getlistquery').prop('required','required');
jQuery('#jform_add_php_getlistquery').attr('aria-required',true);
jQuery('#jform_add_php_getlistquery').addClass('required');
jform_vvvvvzovzi_required = false;
2016-01-30 20:28:43 +00:00
}
}
else
{
jQuery('#jform_add_php_after_getitems').closest('.control-group').hide();
if (!jform_vvvvvzovzg_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('add_php_after_getitems',1);
jQuery('#jform_add_php_after_getitems').removeAttr('required');
jQuery('#jform_add_php_after_getitems').removeAttr('aria-required');
jQuery('#jform_add_php_after_getitems').removeClass('required');
jform_vvvvvzovzg_required = true;
2016-01-30 20:28:43 +00:00
}
jQuery('#jform_add_php_before_getitems').closest('.control-group').hide();
if (!jform_vvvvvzovzh_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('add_php_before_getitems',1);
jQuery('#jform_add_php_before_getitems').removeAttr('required');
jQuery('#jform_add_php_before_getitems').removeAttr('aria-required');
jQuery('#jform_add_php_before_getitems').removeClass('required');
jform_vvvvvzovzh_required = true;
2016-01-30 20:28:43 +00:00
}
jQuery('#jform_add_php_getlistquery').closest('.control-group').hide();
if (!jform_vvvvvzovzi_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('add_php_getlistquery',1);
jQuery('#jform_add_php_getlistquery').removeAttr('required');
jQuery('#jform_add_php_getlistquery').removeAttr('aria-required');
jQuery('#jform_add_php_getlistquery').removeClass('required');
jform_vvvvvzovzi_required = true;
2016-01-30 20:28:43 +00:00
}
}
}
// the vvvvvzo Some function
function gettype_vvvvvzo_SomeFunc(gettype_vvvvvzo)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (gettype_vvvvvzo == 2 || gettype_vvvvvzo == 4)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// the vvvvvzp function
function vvvvvzp(gettype_vvvvvzp)
2016-01-30 20:28:43 +00:00
{
if (isSet(gettype_vvvvvzp) && gettype_vvvvvzp.constructor !== Array)
2016-01-30 20:28:43 +00:00
{
var temp_vvvvvzp = gettype_vvvvvzp;
var gettype_vvvvvzp = [];
gettype_vvvvvzp.push(temp_vvvvvzp);
2016-01-30 20:28:43 +00:00
}
else if (!isSet(gettype_vvvvvzp))
2016-01-30 20:28:43 +00:00
{
var gettype_vvvvvzp = [];
2016-01-30 20:28:43 +00:00
}
var gettype = gettype_vvvvvzp.some(gettype_vvvvvzp_SomeFunc);
2016-01-30 20:28:43 +00:00
// set this function logic
if (gettype)
{
jQuery('#jform_pagination').closest('.control-group').show();
if (jform_vvvvvzpvzj_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('pagination',0);
jQuery('#jform_pagination').prop('required','required');
jQuery('#jform_pagination').attr('aria-required',true);
jQuery('#jform_pagination').addClass('required');
jform_vvvvvzpvzj_required = false;
2016-01-30 20:28:43 +00:00
}
}
else
{
jQuery('#jform_pagination').closest('.control-group').hide();
if (!jform_vvvvvzpvzj_required)
2016-01-30 20:28:43 +00:00
{
updateFieldRequired('pagination',1);
jQuery('#jform_pagination').removeAttr('required');
jQuery('#jform_pagination').removeAttr('aria-required');
jQuery('#jform_pagination').removeClass('required');
jform_vvvvvzpvzj_required = true;
2016-01-30 20:28:43 +00:00
}
}
}
// the vvvvvzp Some function
function gettype_vvvvvzp_SomeFunc(gettype_vvvvvzp)
2016-01-30 20:28:43 +00:00
{
// set the function logic
if (gettype_vvvvvzp == 2)
2016-01-30 20:28:43 +00:00
{
return true;
}
return false;
}
// update required fields
function updateFieldRequired(name,status)
{
var not_required = jQuery('#jform_not_required').val();
if(status == 1)
{
if (isSet(not_required) && not_required != 0)
{
not_required = not_required+','+name;
}
else
{
not_required = ','+name;
}
}
else
{
if (isSet(not_required) && not_required != 0)
{
not_required = not_required.replace(','+name,'');
}
}
jQuery('#jform_not_required').val(not_required);
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !== val.length){
return true;
}
return false;
}
function getViewTableColumns_server(viewId,asKey,rowType)
{
var getUrl = "index.php?option=com_componentbuilder&task=ajax.viewTableColumns&format=json";
if (token.length > 0 && viewId > 0 && asKey.length > 0)
{
var request = 'token='+token+'&as='+asKey+'&type='+rowType+'&id='+viewId;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'jsonp',
data: request,
jsonp: 'callback'
});
}
function getViewTableColumns(id,asKey,key,rowType,main, table_, nr_)
2016-01-30 20:28:43 +00:00
{
getViewTableColumns_server(id,asKey,rowType).done(function(result) {
if (result)
{
loadSelectionData(result, 'view', key, main, table_, nr_);
2016-01-30 20:28:43 +00:00
}
else
{
loadSelectionData(false, 'view', key, main, table_, nr_);
2016-01-30 20:28:43 +00:00
}
})
}
function getDbTableColumns_server(name,asKey,rowType)
{
var getUrl = "index.php?option=com_componentbuilder&task=ajax.dbTableColumns&format=json";
if (token.length > 0 && name.length > 0 && asKey.length > 0)
{
var request = 'token='+token+'&as='+asKey+'&type='+rowType+'&name='+name;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'jsonp',
data: request,
jsonp: 'callback'
});
}
function getDbTableColumns(name, asKey, key, rowType, main, table_, nr_)
2016-01-30 20:28:43 +00:00
{
getDbTableColumns_server(name,asKey,rowType).done(function(result) {
if (result)
{
loadSelectionData(result, 'db', key, main, table_, nr_);
2016-01-30 20:28:43 +00:00
}
else
{
loadSelectionData(false, 'db', key, main, table_, nr_);
2016-01-30 20:28:43 +00:00
}
})
}
function loadSelectionData(result, type, key, main, table_, nr_)
2016-01-30 20:28:43 +00:00
{
if (main)
{
var textArea = 'textarea#jform_'+key+'_selection';
}
else
{
var textArea = 'textarea#jform_join_'+type+'_table'+table_+'_join_'+type+'_table'+key+nr_+'_selection';
2016-01-30 20:28:43 +00:00
}
// no update the text area
if (result)
{
jQuery(textArea).val(result);
}
else
{
jQuery(textArea).val('');
}
}
function updateSubItems(fieldName, fieldNr, table_, nr_){
if(jQuery('#jform_join_'+fieldName+'_table'+table_+'_join_'+fieldName+'_table'+fieldNr+nr_+'_'+fieldName+'_table').length) {
jQuery('#adminForm').on('change', '#jform_join_'+fieldName+'_table'+table_+'_join_'+fieldName+'_table'+fieldNr+nr_+'_'+fieldName+'_table',function (e) {
e.preventDefault();
// get options
var value1 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_"+fieldName+"_table option:selected").val();
var as_value2 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_as option:selected").val();
var row_value1 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_row_type option:selected").val();
if (fieldName === 'view') {
getViewTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_);
} else {
getDbTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_);
}
});
jQuery('#adminForm').on('change', '#jform_join_'+fieldName+'_table'+table_+'_join_'+fieldName+'_table'+fieldNr+nr_+'_as',function (e) {
e.preventDefault();
// get options
var value1 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_"+fieldName+"_table option:selected").val();
var as_value2 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_as option:selected").val();
var row_value1 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_row_type option:selected").val();
if (fieldName === 'view') {
getViewTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_);
} else {
getDbTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_);
}
});
jQuery('#adminForm').on('change', '#jform_join_'+fieldName+'_table'+table_+'_join_'+fieldName+'_table'+fieldNr+nr_+'_row_type',function (e) {
e.preventDefault();
// get options
var value1 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_"+fieldName+"_table option:selected").val();
var as_value2 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_as option:selected").val();
var row_value1 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_row_type option:selected").val();
if (fieldName === 'view') {
getViewTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_);
} else {
getDbTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_);
}
});
}
2016-01-30 20:28:43 +00:00
}