2018-05-18 06:28:27 +00:00
|
|
|
/**
|
|
|
|
* @package Joomla.Component.Builder
|
|
|
|
*
|
|
|
|
* @created 30th April, 2015
|
|
|
|
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
|
|
|
|
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
2019-02-23 13:28:54 +00:00
|
|
|
* @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
|
2018-05-18 06:28:27 +00:00
|
|
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
|
|
|
*/
|
2017-11-11 22:18:13 +00:00
|
|
|
|
2017-11-26 00:29:08 +00:00
|
|
|
// Some Global Values
|
2019-10-16 20:34:36 +00:00
|
|
|
jform_vvvvwbnvxj_required = false;
|
|
|
|
jform_vvvvwbzvxk_required = false;
|
|
|
|
jform_vvvvwcbvxl_required = false;
|
|
|
|
jform_vvvvwcbvxm_required = false;
|
2017-11-26 00:29:08 +00:00
|
|
|
|
|
|
|
// Initial Script
|
|
|
|
jQuery(document).ready(function()
|
|
|
|
{
|
2019-07-28 21:48:42 +00:00
|
|
|
var how_vvvvwbl = jQuery("#jform_how").val();
|
2019-10-16 20:34:36 +00:00
|
|
|
var target_vvvvwbl = jQuery("#jform_target input[type='radio']:checked").val();
|
|
|
|
vvvvwbl(how_vvvvwbl,target_vvvvwbl);
|
2019-07-15 20:00:46 +00:00
|
|
|
|
2019-07-28 21:48:42 +00:00
|
|
|
var how_vvvvwbn = jQuery("#jform_how").val();
|
2019-10-16 20:34:36 +00:00
|
|
|
var target_vvvvwbn = jQuery("#jform_target input[type='radio']:checked").val();
|
|
|
|
vvvvwbn(how_vvvvwbn,target_vvvvwbn);
|
2019-07-19 02:17:15 +00:00
|
|
|
|
2019-07-28 21:48:42 +00:00
|
|
|
var how_vvvvwbp = jQuery("#jform_how").val();
|
2019-10-16 20:34:36 +00:00
|
|
|
var target_vvvvwbp = jQuery("#jform_target input[type='radio']:checked").val();
|
|
|
|
vvvvwbp(how_vvvvwbp,target_vvvvwbp);
|
2019-07-19 02:17:15 +00:00
|
|
|
|
2019-08-08 15:35:58 +00:00
|
|
|
var how_vvvvwbr = jQuery("#jform_how").val();
|
2019-10-16 20:34:36 +00:00
|
|
|
var target_vvvvwbr = jQuery("#jform_target input[type='radio']:checked").val();
|
|
|
|
vvvvwbr(how_vvvvwbr,target_vvvvwbr);
|
|
|
|
|
|
|
|
var how_vvvvwbt = jQuery("#jform_how").val();
|
|
|
|
var target_vvvvwbt = jQuery("#jform_target input[type='radio']:checked").val();
|
|
|
|
vvvvwbt(how_vvvvwbt,target_vvvvwbt);
|
|
|
|
|
|
|
|
var target_vvvvwbu = jQuery("#jform_target input[type='radio']:checked").val();
|
|
|
|
var how_vvvvwbu = jQuery("#jform_how").val();
|
|
|
|
vvvvwbu(target_vvvvwbu,how_vvvvwbu);
|
|
|
|
|
|
|
|
var how_vvvvwbv = jQuery("#jform_how").val();
|
|
|
|
var target_vvvvwbv = jQuery("#jform_target input[type='radio']:checked").val();
|
|
|
|
vvvvwbv(how_vvvvwbv,target_vvvvwbv);
|
|
|
|
|
|
|
|
var target_vvvvwbw = jQuery("#jform_target input[type='radio']:checked").val();
|
|
|
|
var how_vvvvwbw = jQuery("#jform_how").val();
|
|
|
|
vvvvwbw(target_vvvvwbw,how_vvvvwbw);
|
|
|
|
|
|
|
|
var how_vvvvwbx = jQuery("#jform_how").val();
|
|
|
|
var target_vvvvwbx = jQuery("#jform_target input[type='radio']:checked").val();
|
|
|
|
vvvvwbx(how_vvvvwbx,target_vvvvwbx);
|
|
|
|
|
|
|
|
var target_vvvvwby = jQuery("#jform_target input[type='radio']:checked").val();
|
|
|
|
var how_vvvvwby = jQuery("#jform_how").val();
|
|
|
|
vvvvwby(target_vvvvwby,how_vvvvwby);
|
|
|
|
|
|
|
|
var target_vvvvwbz = jQuery("#jform_target input[type='radio']:checked").val();
|
|
|
|
var type_vvvvwbz = jQuery("#jform_type input[type='radio']:checked").val();
|
|
|
|
vvvvwbz(target_vvvvwbz,type_vvvvwbz);
|
2018-08-14 08:25:46 +00:00
|
|
|
|
2019-10-16 20:34:36 +00:00
|
|
|
var target_vvvvwcb = jQuery("#jform_target input[type='radio']:checked").val();
|
|
|
|
vvvvwcb(target_vvvvwcb);
|
2019-08-08 15:35:58 +00:00
|
|
|
});
|
2018-08-14 08:25:46 +00:00
|
|
|
|
2019-07-28 21:48:42 +00:00
|
|
|
// the vvvvwbl function
|
2019-10-16 20:34:36 +00:00
|
|
|
function vvvvwbl(how_vvvvwbl,target_vvvvwbl)
|
2018-08-14 08:25:46 +00:00
|
|
|
{
|
2019-07-28 21:48:42 +00:00
|
|
|
if (isSet(how_vvvvwbl) && how_vvvvwbl.constructor !== Array)
|
2018-08-14 08:25:46 +00:00
|
|
|
{
|
2019-07-28 21:48:42 +00:00
|
|
|
var temp_vvvvwbl = how_vvvvwbl;
|
|
|
|
var how_vvvvwbl = [];
|
|
|
|
how_vvvvwbl.push(temp_vvvvwbl);
|
2018-08-14 08:25:46 +00:00
|
|
|
}
|
2019-07-28 21:48:42 +00:00
|
|
|
else if (!isSet(how_vvvvwbl))
|
2018-08-14 08:25:46 +00:00
|
|
|
{
|
2019-07-28 21:48:42 +00:00
|
|
|
var how_vvvvwbl = [];
|
2018-08-14 08:25:46 +00:00
|
|
|
}
|
2019-07-28 21:48:42 +00:00
|
|
|
var how = how_vvvvwbl.some(how_vvvvwbl_SomeFunc);
|
2018-08-14 08:25:46 +00:00
|
|
|
|
2019-10-16 20:34:36 +00:00
|
|
|
if (isSet(target_vvvvwbl) && target_vvvvwbl.constructor !== Array)
|
|
|
|
{
|
|
|
|
var temp_vvvvwbl = target_vvvvwbl;
|
|
|
|
var target_vvvvwbl = [];
|
|
|
|
target_vvvvwbl.push(temp_vvvvwbl);
|
|
|
|
}
|
|
|
|
else if (!isSet(target_vvvvwbl))
|
|
|
|
{
|
|
|
|
var target_vvvvwbl = [];
|
|
|
|
}
|
|
|
|
var target = target_vvvvwbl.some(target_vvvvwbl_SomeFunc);
|
|
|
|
|
2018-08-14 08:25:46 +00:00
|
|
|
|
2018-08-23 01:37:42 +00:00
|
|
|
// set this function logic
|
2019-10-16 20:34:36 +00:00
|
|
|
if (how && target)
|
2018-08-23 01:37:42 +00:00
|
|
|
{
|
2019-08-08 15:35:58 +00:00
|
|
|
jQuery('#jform_addconditions-lbl').closest('.control-group').show();
|
2018-08-23 01:37:42 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2019-08-08 15:35:58 +00:00
|
|
|
jQuery('#jform_addconditions-lbl').closest('.control-group').hide();
|
2018-08-23 01:37:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-07-28 21:48:42 +00:00
|
|
|
// the vvvvwbl Some function
|
|
|
|
function how_vvvvwbl_SomeFunc(how_vvvvwbl)
|
2018-08-23 01:37:42 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2019-08-08 15:35:58 +00:00
|
|
|
if (how_vvvvwbl == 2)
|
2018-08-23 01:37:42 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2019-10-16 20:34:36 +00:00
|
|
|
// the vvvvwbl Some function
|
|
|
|
function target_vvvvwbl_SomeFunc(target_vvvvwbl)
|
2018-08-23 01:37:42 +00:00
|
|
|
{
|
2019-10-16 20:34:36 +00:00
|
|
|
// set the function logic
|
|
|
|
if (target_vvvvwbl == 1)
|
2018-08-23 01:37:42 +00:00
|
|
|
{
|
2019-10-16 20:34:36 +00:00
|
|
|
return true;
|
2018-08-23 01:37:42 +00:00
|
|
|
}
|
2019-10-16 20:34:36 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// the vvvvwbn function
|
|
|
|
function vvvvwbn(how_vvvvwbn,target_vvvvwbn)
|
|
|
|
{
|
|
|
|
if (isSet(how_vvvvwbn) && how_vvvvwbn.constructor !== Array)
|
2018-08-23 01:37:42 +00:00
|
|
|
{
|
2019-10-16 20:34:36 +00:00
|
|
|
var temp_vvvvwbn = how_vvvvwbn;
|
|
|
|
var how_vvvvwbn = [];
|
|
|
|
how_vvvvwbn.push(temp_vvvvwbn);
|
2018-08-23 01:37:42 +00:00
|
|
|
}
|
2019-10-16 20:34:36 +00:00
|
|
|
else if (!isSet(how_vvvvwbn))
|
|
|
|
{
|
|
|
|
var how_vvvvwbn = [];
|
|
|
|
}
|
|
|
|
var how = how_vvvvwbn.some(how_vvvvwbn_SomeFunc);
|
|
|
|
|
|
|
|
if (isSet(target_vvvvwbn) && target_vvvvwbn.constructor !== Array)
|
|
|
|
{
|
|
|
|
var temp_vvvvwbn = target_vvvvwbn;
|
|
|
|
var target_vvvvwbn = [];
|
|
|
|
target_vvvvwbn.push(temp_vvvvwbn);
|
|
|
|
}
|
|
|
|
else if (!isSet(target_vvvvwbn))
|
|
|
|
{
|
|
|
|
var target_vvvvwbn = [];
|
|
|
|
}
|
|
|
|
var target = target_vvvvwbn.some(target_vvvvwbn_SomeFunc);
|
2018-08-23 01:37:42 +00:00
|
|
|
|
|
|
|
|
2019-01-29 14:43:27 +00:00
|
|
|
// set this function logic
|
2019-10-16 20:34:36 +00:00
|
|
|
if (how && target)
|
2019-01-29 14:43:27 +00:00
|
|
|
{
|
2019-08-08 15:35:58 +00:00
|
|
|
jQuery('#jform_php_setdocument').closest('.control-group').show();
|
|
|
|
// add required attribute to php_setdocument field
|
2019-10-16 20:34:36 +00:00
|
|
|
if (jform_vvvvwbnvxj_required)
|
2019-08-08 15:35:58 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('php_setdocument',0);
|
|
|
|
jQuery('#jform_php_setdocument').prop('required','required');
|
|
|
|
jQuery('#jform_php_setdocument').attr('aria-required',true);
|
|
|
|
jQuery('#jform_php_setdocument').addClass('required');
|
2019-10-16 20:34:36 +00:00
|
|
|
jform_vvvvwbnvxj_required = false;
|
2019-08-08 15:35:58 +00:00
|
|
|
}
|
2019-01-29 14:43:27 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2019-08-08 15:35:58 +00:00
|
|
|
jQuery('#jform_php_setdocument').closest('.control-group').hide();
|
|
|
|
// remove required attribute from php_setdocument field
|
2019-10-16 20:34:36 +00:00
|
|
|
if (!jform_vvvvwbnvxj_required)
|
2019-08-08 15:35:58 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('php_setdocument',1);
|
|
|
|
jQuery('#jform_php_setdocument').removeAttr('required');
|
|
|
|
jQuery('#jform_php_setdocument').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_php_setdocument').removeClass('required');
|
2019-10-16 20:34:36 +00:00
|
|
|
jform_vvvvwbnvxj_required = true;
|
2019-08-08 15:35:58 +00:00
|
|
|
}
|
2019-01-29 14:43:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-10-16 20:34:36 +00:00
|
|
|
// the vvvvwbn Some function
|
|
|
|
function how_vvvvwbn_SomeFunc(how_vvvvwbn)
|
2019-01-29 14:43:27 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2019-10-16 20:34:36 +00:00
|
|
|
if (how_vvvvwbn == 3)
|
2019-01-29 14:43:27 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2019-10-16 20:34:36 +00:00
|
|
|
// the vvvvwbn Some function
|
|
|
|
function target_vvvvwbn_SomeFunc(target_vvvvwbn)
|
2019-01-29 14:43:27 +00:00
|
|
|
{
|
2019-10-16 20:34:36 +00:00
|
|
|
// set the function logic
|
|
|
|
if (target_vvvvwbn == 1)
|
2019-01-29 14:43:27 +00:00
|
|
|
{
|
2019-10-16 20:34:36 +00:00
|
|
|
return true;
|
2019-01-29 14:43:27 +00:00
|
|
|
}
|
2019-10-16 20:34:36 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// the vvvvwbp function
|
|
|
|
function vvvvwbp(how_vvvvwbp,target_vvvvwbp)
|
|
|
|
{
|
|
|
|
if (isSet(how_vvvvwbp) && how_vvvvwbp.constructor !== Array)
|
2019-01-29 14:43:27 +00:00
|
|
|
{
|
2019-10-16 20:34:36 +00:00
|
|
|
var temp_vvvvwbp = how_vvvvwbp;
|
|
|
|
var how_vvvvwbp = [];
|
|
|
|
how_vvvvwbp.push(temp_vvvvwbp);
|
2019-01-29 14:43:27 +00:00
|
|
|
}
|
2019-10-16 20:34:36 +00:00
|
|
|
else if (!isSet(how_vvvvwbp))
|
|
|
|
{
|
|
|
|
var how_vvvvwbp = [];
|
|
|
|
}
|
|
|
|
var how = how_vvvvwbp.some(how_vvvvwbp_SomeFunc);
|
|
|
|
|
|
|
|
if (isSet(target_vvvvwbp) && target_vvvvwbp.constructor !== Array)
|
|
|
|
{
|
|
|
|
var temp_vvvvwbp = target_vvvvwbp;
|
|
|
|
var target_vvvvwbp = [];
|
|
|
|
target_vvvvwbp.push(temp_vvvvwbp);
|
|
|
|
}
|
|
|
|
else if (!isSet(target_vvvvwbp))
|
|
|
|
{
|
|
|
|
var target_vvvvwbp = [];
|
|
|
|
}
|
|
|
|
var target = target_vvvvwbp.some(target_vvvvwbp_SomeFunc);
|
2019-01-29 14:43:27 +00:00
|
|
|
|
|
|
|
|
2019-05-15 17:39:27 +00:00
|
|
|
// set this function logic
|
2019-10-16 20:34:36 +00:00
|
|
|
if (how && target)
|
2019-05-15 17:39:27 +00:00
|
|
|
{
|
2019-08-08 15:35:58 +00:00
|
|
|
jQuery('.note_display_library_config').closest('.control-group').show();
|
2019-05-15 17:39:27 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2019-08-08 15:35:58 +00:00
|
|
|
jQuery('.note_display_library_config').closest('.control-group').hide();
|
2019-05-15 17:39:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-10-16 20:34:36 +00:00
|
|
|
// the vvvvwbp Some function
|
|
|
|
function how_vvvvwbp_SomeFunc(how_vvvvwbp)
|
2019-05-15 17:39:27 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2019-10-16 20:34:36 +00:00
|
|
|
if (how_vvvvwbp == 2 || how_vvvvwbp == 3)
|
2019-05-15 17:39:27 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2019-10-16 20:34:36 +00:00
|
|
|
// the vvvvwbp Some function
|
|
|
|
function target_vvvvwbp_SomeFunc(target_vvvvwbp)
|
2019-05-15 17:39:27 +00:00
|
|
|
{
|
2019-10-16 20:34:36 +00:00
|
|
|
// set the function logic
|
|
|
|
if (target_vvvvwbp == 1)
|
2019-05-15 17:39:27 +00:00
|
|
|
{
|
2019-10-16 20:34:36 +00:00
|
|
|
return true;
|
2019-05-15 17:39:27 +00:00
|
|
|
}
|
2019-10-16 20:34:36 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// the vvvvwbr function
|
|
|
|
function vvvvwbr(how_vvvvwbr,target_vvvvwbr)
|
|
|
|
{
|
|
|
|
if (isSet(how_vvvvwbr) && how_vvvvwbr.constructor !== Array)
|
2019-05-15 17:39:27 +00:00
|
|
|
{
|
2019-10-16 20:34:36 +00:00
|
|
|
var temp_vvvvwbr = how_vvvvwbr;
|
|
|
|
var how_vvvvwbr = [];
|
|
|
|
how_vvvvwbr.push(temp_vvvvwbr);
|
2019-05-15 17:39:27 +00:00
|
|
|
}
|
2019-10-16 20:34:36 +00:00
|
|
|
else if (!isSet(how_vvvvwbr))
|
|
|
|
{
|
|
|
|
var how_vvvvwbr = [];
|
|
|
|
}
|
|
|
|
var how = how_vvvvwbr.some(how_vvvvwbr_SomeFunc);
|
|
|
|
|
|
|
|
if (isSet(target_vvvvwbr) && target_vvvvwbr.constructor !== Array)
|
|
|
|
{
|
|
|
|
var temp_vvvvwbr = target_vvvvwbr;
|
|
|
|
var target_vvvvwbr = [];
|
|
|
|
target_vvvvwbr.push(temp_vvvvwbr);
|
|
|
|
}
|
|
|
|
else if (!isSet(target_vvvvwbr))
|
|
|
|
{
|
|
|
|
var target_vvvvwbr = [];
|
|
|
|
}
|
|
|
|
var target = target_vvvvwbr.some(target_vvvvwbr_SomeFunc);
|
2019-05-15 17:39:27 +00:00
|
|
|
|
|
|
|
|
2019-06-12 20:06:19 +00:00
|
|
|
// set this function logic
|
2019-10-16 20:34:36 +00:00
|
|
|
if (how && target)
|
2019-06-12 20:06:19 +00:00
|
|
|
{
|
2019-08-08 15:35:58 +00:00
|
|
|
jQuery('.note_display_library_files_folders_urls').closest('.control-group').show();
|
2019-06-12 20:06:19 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2019-08-08 15:35:58 +00:00
|
|
|
jQuery('.note_display_library_files_folders_urls').closest('.control-group').hide();
|
2019-06-12 20:06:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-10-16 20:34:36 +00:00
|
|
|
// the vvvvwbr Some function
|
|
|
|
function how_vvvvwbr_SomeFunc(how_vvvvwbr)
|
|
|
|
{
|
|
|
|
// set the function logic
|
|
|
|
if (how_vvvvwbr == 1 || how_vvvvwbr == 2 || how_vvvvwbr == 3)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// the vvvvwbr Some function
|
|
|
|
function target_vvvvwbr_SomeFunc(target_vvvvwbr)
|
2019-06-12 20:06:19 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2019-10-16 20:34:36 +00:00
|
|
|
if (target_vvvvwbr == 1)
|
2019-06-12 20:06:19 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2019-10-16 20:34:36 +00:00
|
|
|
// the vvvvwbt function
|
|
|
|
function vvvvwbt(how_vvvvwbt,target_vvvvwbt)
|
2019-06-12 20:06:19 +00:00
|
|
|
{
|
2019-10-16 20:34:36 +00:00
|
|
|
if (isSet(how_vvvvwbt) && how_vvvvwbt.constructor !== Array)
|
2019-06-12 20:06:19 +00:00
|
|
|
{
|
2019-10-16 20:34:36 +00:00
|
|
|
var temp_vvvvwbt = how_vvvvwbt;
|
|
|
|
var how_vvvvwbt = [];
|
|
|
|
how_vvvvwbt.push(temp_vvvvwbt);
|
2019-06-12 20:06:19 +00:00
|
|
|
}
|
2019-10-16 20:34:36 +00:00
|
|
|
else if (!isSet(how_vvvvwbt))
|
2019-06-12 20:06:19 +00:00
|
|
|
{
|
2019-10-16 20:34:36 +00:00
|
|
|
var how_vvvvwbt = [];
|
2019-06-12 20:06:19 +00:00
|
|
|
}
|
2019-10-16 20:34:36 +00:00
|
|
|
var how = how_vvvvwbt.some(how_vvvvwbt_SomeFunc);
|
|
|
|
|
|
|
|
if (isSet(target_vvvvwbt) && target_vvvvwbt.constructor !== Array)
|
|
|
|
{
|
|
|
|
var temp_vvvvwbt = target_vvvvwbt;
|
|
|
|
var target_vvvvwbt = [];
|
|
|
|
target_vvvvwbt.push(temp_vvvvwbt);
|
|
|
|
}
|
|
|
|
else if (!isSet(target_vvvvwbt))
|
|
|
|
{
|
|
|
|
var target_vvvvwbt = [];
|
|
|
|
}
|
|
|
|
var target = target_vvvvwbt.some(target_vvvvwbt_SomeFunc);
|
2019-06-12 20:06:19 +00:00
|
|
|
|
|
|
|
|
2019-06-12 20:36:05 +00:00
|
|
|
// set this function logic
|
2019-10-16 20:34:36 +00:00
|
|
|
if (how && target)
|
2019-06-12 20:36:05 +00:00
|
|
|
{
|
2019-08-08 15:35:58 +00:00
|
|
|
jQuery('.note_no_behaviour_one').closest('.control-group').show();
|
|
|
|
jQuery('.note_no_behaviour_three').closest('.control-group').show();
|
|
|
|
jQuery('.note_no_behaviour_two').closest('.control-group').show();
|
2019-06-12 20:36:05 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2019-08-08 15:35:58 +00:00
|
|
|
jQuery('.note_no_behaviour_one').closest('.control-group').hide();
|
|
|
|
jQuery('.note_no_behaviour_three').closest('.control-group').hide();
|
|
|
|
jQuery('.note_no_behaviour_two').closest('.control-group').hide();
|
2019-06-12 20:36:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-10-16 20:34:36 +00:00
|
|
|
// the vvvvwbt Some function
|
|
|
|
function how_vvvvwbt_SomeFunc(how_vvvvwbt)
|
|
|
|
{
|
|
|
|
// set the function logic
|
|
|
|
if (how_vvvvwbt == 0)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// the vvvvwbt Some function
|
|
|
|
function target_vvvvwbt_SomeFunc(target_vvvvwbt)
|
|
|
|
{
|
|
|
|
// set the function logic
|
|
|
|
if (target_vvvvwbt == 1)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// the vvvvwbu function
|
|
|
|
function vvvvwbu(target_vvvvwbu,how_vvvvwbu)
|
|
|
|
{
|
|
|
|
if (isSet(target_vvvvwbu) && target_vvvvwbu.constructor !== Array)
|
|
|
|
{
|
|
|
|
var temp_vvvvwbu = target_vvvvwbu;
|
|
|
|
var target_vvvvwbu = [];
|
|
|
|
target_vvvvwbu.push(temp_vvvvwbu);
|
|
|
|
}
|
|
|
|
else if (!isSet(target_vvvvwbu))
|
|
|
|
{
|
|
|
|
var target_vvvvwbu = [];
|
|
|
|
}
|
|
|
|
var target = target_vvvvwbu.some(target_vvvvwbu_SomeFunc);
|
|
|
|
|
|
|
|
if (isSet(how_vvvvwbu) && how_vvvvwbu.constructor !== Array)
|
|
|
|
{
|
|
|
|
var temp_vvvvwbu = how_vvvvwbu;
|
|
|
|
var how_vvvvwbu = [];
|
|
|
|
how_vvvvwbu.push(temp_vvvvwbu);
|
|
|
|
}
|
|
|
|
else if (!isSet(how_vvvvwbu))
|
|
|
|
{
|
|
|
|
var how_vvvvwbu = [];
|
|
|
|
}
|
|
|
|
var how = how_vvvvwbu.some(how_vvvvwbu_SomeFunc);
|
|
|
|
|
|
|
|
|
|
|
|
// set this function logic
|
|
|
|
if (target && how)
|
|
|
|
{
|
|
|
|
jQuery('.note_no_behaviour_one').closest('.control-group').show();
|
|
|
|
jQuery('.note_no_behaviour_three').closest('.control-group').show();
|
|
|
|
jQuery('.note_no_behaviour_two').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('.note_no_behaviour_one').closest('.control-group').hide();
|
|
|
|
jQuery('.note_no_behaviour_three').closest('.control-group').hide();
|
|
|
|
jQuery('.note_no_behaviour_two').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// the vvvvwbu Some function
|
|
|
|
function target_vvvvwbu_SomeFunc(target_vvvvwbu)
|
2019-06-12 20:36:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2019-10-16 20:34:36 +00:00
|
|
|
if (target_vvvvwbu == 1)
|
2019-06-12 20:36:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2019-10-16 20:34:36 +00:00
|
|
|
// the vvvvwbu Some function
|
|
|
|
function how_vvvvwbu_SomeFunc(how_vvvvwbu)
|
2019-06-12 20:36:05 +00:00
|
|
|
{
|
2019-10-16 20:34:36 +00:00
|
|
|
// set the function logic
|
|
|
|
if (how_vvvvwbu == 0)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// the vvvvwbv function
|
|
|
|
function vvvvwbv(how_vvvvwbv,target_vvvvwbv)
|
|
|
|
{
|
|
|
|
if (isSet(how_vvvvwbv) && how_vvvvwbv.constructor !== Array)
|
2019-06-12 20:36:05 +00:00
|
|
|
{
|
2019-10-16 20:34:36 +00:00
|
|
|
var temp_vvvvwbv = how_vvvvwbv;
|
|
|
|
var how_vvvvwbv = [];
|
|
|
|
how_vvvvwbv.push(temp_vvvvwbv);
|
2019-06-12 20:36:05 +00:00
|
|
|
}
|
2019-10-16 20:34:36 +00:00
|
|
|
else if (!isSet(how_vvvvwbv))
|
2019-06-12 20:36:05 +00:00
|
|
|
{
|
2019-10-16 20:34:36 +00:00
|
|
|
var how_vvvvwbv = [];
|
2019-06-12 20:36:05 +00:00
|
|
|
}
|
2019-10-16 20:34:36 +00:00
|
|
|
var how = how_vvvvwbv.some(how_vvvvwbv_SomeFunc);
|
|
|
|
|
|
|
|
if (isSet(target_vvvvwbv) && target_vvvvwbv.constructor !== Array)
|
|
|
|
{
|
|
|
|
var temp_vvvvwbv = target_vvvvwbv;
|
|
|
|
var target_vvvvwbv = [];
|
|
|
|
target_vvvvwbv.push(temp_vvvvwbv);
|
|
|
|
}
|
|
|
|
else if (!isSet(target_vvvvwbv))
|
|
|
|
{
|
|
|
|
var target_vvvvwbv = [];
|
|
|
|
}
|
|
|
|
var target = target_vvvvwbv.some(target_vvvvwbv_SomeFunc);
|
2019-06-12 20:36:05 +00:00
|
|
|
|
|
|
|
|
2019-08-08 15:35:58 +00:00
|
|
|
// set this function logic
|
2019-10-16 20:34:36 +00:00
|
|
|
if (how && target)
|
2019-08-08 15:35:58 +00:00
|
|
|
{
|
|
|
|
jQuery('.note_yes_behaviour_one').closest('.control-group').show();
|
|
|
|
jQuery('.note_yes_behaviour_two').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('.note_yes_behaviour_one').closest('.control-group').hide();
|
|
|
|
jQuery('.note_yes_behaviour_two').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-10-16 20:34:36 +00:00
|
|
|
// the vvvvwbv Some function
|
|
|
|
function how_vvvvwbv_SomeFunc(how_vvvvwbv)
|
2019-08-08 15:35:58 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2019-10-16 20:34:36 +00:00
|
|
|
if (how_vvvvwbv == 1)
|
2019-08-08 15:35:58 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2019-10-16 20:34:36 +00:00
|
|
|
// the vvvvwbv Some function
|
|
|
|
function target_vvvvwbv_SomeFunc(target_vvvvwbv)
|
2019-08-08 15:35:58 +00:00
|
|
|
{
|
2019-10-16 20:34:36 +00:00
|
|
|
// set the function logic
|
|
|
|
if (target_vvvvwbv == 1)
|
2019-08-08 15:35:58 +00:00
|
|
|
{
|
2019-10-16 20:34:36 +00:00
|
|
|
return true;
|
2019-08-08 15:35:58 +00:00
|
|
|
}
|
2019-10-16 20:34:36 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// the vvvvwbw function
|
|
|
|
function vvvvwbw(target_vvvvwbw,how_vvvvwbw)
|
|
|
|
{
|
|
|
|
if (isSet(target_vvvvwbw) && target_vvvvwbw.constructor !== Array)
|
2019-08-08 15:35:58 +00:00
|
|
|
{
|
2019-10-16 20:34:36 +00:00
|
|
|
var temp_vvvvwbw = target_vvvvwbw;
|
|
|
|
var target_vvvvwbw = [];
|
|
|
|
target_vvvvwbw.push(temp_vvvvwbw);
|
2019-08-08 15:35:58 +00:00
|
|
|
}
|
2019-10-16 20:34:36 +00:00
|
|
|
else if (!isSet(target_vvvvwbw))
|
|
|
|
{
|
|
|
|
var target_vvvvwbw = [];
|
|
|
|
}
|
|
|
|
var target = target_vvvvwbw.some(target_vvvvwbw_SomeFunc);
|
|
|
|
|
|
|
|
if (isSet(how_vvvvwbw) && how_vvvvwbw.constructor !== Array)
|
|
|
|
{
|
|
|
|
var temp_vvvvwbw = how_vvvvwbw;
|
|
|
|
var how_vvvvwbw = [];
|
|
|
|
how_vvvvwbw.push(temp_vvvvwbw);
|
|
|
|
}
|
|
|
|
else if (!isSet(how_vvvvwbw))
|
|
|
|
{
|
|
|
|
var how_vvvvwbw = [];
|
|
|
|
}
|
|
|
|
var how = how_vvvvwbw.some(how_vvvvwbw_SomeFunc);
|
2019-08-08 15:35:58 +00:00
|
|
|
|
|
|
|
|
2017-12-10 19:17:26 +00:00
|
|
|
// set this function logic
|
2019-10-16 20:34:36 +00:00
|
|
|
if (target && how)
|
|
|
|
{
|
|
|
|
jQuery('.note_yes_behaviour_one').closest('.control-group').show();
|
|
|
|
jQuery('.note_yes_behaviour_two').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('.note_yes_behaviour_one').closest('.control-group').hide();
|
|
|
|
jQuery('.note_yes_behaviour_two').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// the vvvvwbw Some function
|
|
|
|
function target_vvvvwbw_SomeFunc(target_vvvvwbw)
|
|
|
|
{
|
|
|
|
// set the function logic
|
|
|
|
if (target_vvvvwbw == 1)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// the vvvvwbw Some function
|
|
|
|
function how_vvvvwbw_SomeFunc(how_vvvvwbw)
|
|
|
|
{
|
|
|
|
// set the function logic
|
|
|
|
if (how_vvvvwbw == 1)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// the vvvvwbx function
|
|
|
|
function vvvvwbx(how_vvvvwbx,target_vvvvwbx)
|
|
|
|
{
|
|
|
|
if (isSet(how_vvvvwbx) && how_vvvvwbx.constructor !== Array)
|
|
|
|
{
|
|
|
|
var temp_vvvvwbx = how_vvvvwbx;
|
|
|
|
var how_vvvvwbx = [];
|
|
|
|
how_vvvvwbx.push(temp_vvvvwbx);
|
|
|
|
}
|
|
|
|
else if (!isSet(how_vvvvwbx))
|
|
|
|
{
|
|
|
|
var how_vvvvwbx = [];
|
|
|
|
}
|
|
|
|
var how = how_vvvvwbx.some(how_vvvvwbx_SomeFunc);
|
|
|
|
|
|
|
|
if (isSet(target_vvvvwbx) && target_vvvvwbx.constructor !== Array)
|
|
|
|
{
|
|
|
|
var temp_vvvvwbx = target_vvvvwbx;
|
|
|
|
var target_vvvvwbx = [];
|
|
|
|
target_vvvvwbx.push(temp_vvvvwbx);
|
|
|
|
}
|
|
|
|
else if (!isSet(target_vvvvwbx))
|
|
|
|
{
|
|
|
|
var target_vvvvwbx = [];
|
|
|
|
}
|
|
|
|
var target = target_vvvvwbx.some(target_vvvvwbx_SomeFunc);
|
|
|
|
|
|
|
|
|
|
|
|
// set this function logic
|
|
|
|
if (how && target)
|
2017-12-10 19:17:26 +00:00
|
|
|
{
|
|
|
|
jQuery('.note_build_in_behaviour_one').closest('.control-group').show();
|
|
|
|
jQuery('.note_build_in_behaviour_three').closest('.control-group').show();
|
|
|
|
jQuery('.note_build_in_behaviour_two').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('.note_build_in_behaviour_one').closest('.control-group').hide();
|
|
|
|
jQuery('.note_build_in_behaviour_three').closest('.control-group').hide();
|
|
|
|
jQuery('.note_build_in_behaviour_two').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-10-16 20:34:36 +00:00
|
|
|
// the vvvvwbx Some function
|
|
|
|
function how_vvvvwbx_SomeFunc(how_vvvvwbx)
|
|
|
|
{
|
|
|
|
// set the function logic
|
|
|
|
if (how_vvvvwbx == 4)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// the vvvvwbx Some function
|
|
|
|
function target_vvvvwbx_SomeFunc(target_vvvvwbx)
|
|
|
|
{
|
|
|
|
// set the function logic
|
|
|
|
if (target_vvvvwbx == 1)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// the vvvvwby function
|
|
|
|
function vvvvwby(target_vvvvwby,how_vvvvwby)
|
|
|
|
{
|
|
|
|
if (isSet(target_vvvvwby) && target_vvvvwby.constructor !== Array)
|
|
|
|
{
|
|
|
|
var temp_vvvvwby = target_vvvvwby;
|
|
|
|
var target_vvvvwby = [];
|
|
|
|
target_vvvvwby.push(temp_vvvvwby);
|
|
|
|
}
|
|
|
|
else if (!isSet(target_vvvvwby))
|
|
|
|
{
|
|
|
|
var target_vvvvwby = [];
|
|
|
|
}
|
|
|
|
var target = target_vvvvwby.some(target_vvvvwby_SomeFunc);
|
|
|
|
|
|
|
|
if (isSet(how_vvvvwby) && how_vvvvwby.constructor !== Array)
|
|
|
|
{
|
|
|
|
var temp_vvvvwby = how_vvvvwby;
|
|
|
|
var how_vvvvwby = [];
|
|
|
|
how_vvvvwby.push(temp_vvvvwby);
|
|
|
|
}
|
|
|
|
else if (!isSet(how_vvvvwby))
|
|
|
|
{
|
|
|
|
var how_vvvvwby = [];
|
|
|
|
}
|
|
|
|
var how = how_vvvvwby.some(how_vvvvwby_SomeFunc);
|
|
|
|
|
|
|
|
|
|
|
|
// set this function logic
|
|
|
|
if (target && how)
|
|
|
|
{
|
|
|
|
jQuery('.note_build_in_behaviour_one').closest('.control-group').show();
|
|
|
|
jQuery('.note_build_in_behaviour_three').closest('.control-group').show();
|
|
|
|
jQuery('.note_build_in_behaviour_two').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('.note_build_in_behaviour_one').closest('.control-group').hide();
|
|
|
|
jQuery('.note_build_in_behaviour_three').closest('.control-group').hide();
|
|
|
|
jQuery('.note_build_in_behaviour_two').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// the vvvvwby Some function
|
|
|
|
function target_vvvvwby_SomeFunc(target_vvvvwby)
|
|
|
|
{
|
|
|
|
// set the function logic
|
|
|
|
if (target_vvvvwby == 1)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// the vvvvwby Some function
|
|
|
|
function how_vvvvwby_SomeFunc(how_vvvvwby)
|
2017-12-10 19:17:26 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2019-10-16 20:34:36 +00:00
|
|
|
if (how_vvvvwby == 4)
|
2017-12-10 19:17:26 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2019-10-16 20:34:36 +00:00
|
|
|
// the vvvvwbz function
|
|
|
|
function vvvvwbz(target_vvvvwbz,type_vvvvwbz)
|
2017-12-03 18:09:04 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2019-10-16 20:34:36 +00:00
|
|
|
if (target_vvvvwbz == 1 && type_vvvvwbz == 2)
|
2017-12-03 18:09:04 +00:00
|
|
|
{
|
|
|
|
jQuery('#jform_libraries').closest('.control-group').show();
|
2018-09-10 11:04:52 +00:00
|
|
|
// add required attribute to libraries field
|
2019-10-16 20:34:36 +00:00
|
|
|
if (jform_vvvvwbzvxk_required)
|
2017-12-03 18:09:04 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('libraries',0);
|
|
|
|
jQuery('#jform_libraries').prop('required','required');
|
|
|
|
jQuery('#jform_libraries').attr('aria-required',true);
|
|
|
|
jQuery('#jform_libraries').addClass('required');
|
2019-10-16 20:34:36 +00:00
|
|
|
jform_vvvvwbzvxk_required = false;
|
2017-12-03 18:09:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_libraries').closest('.control-group').hide();
|
2018-09-10 11:04:52 +00:00
|
|
|
// remove required attribute from libraries field
|
2019-10-16 20:34:36 +00:00
|
|
|
if (!jform_vvvvwbzvxk_required)
|
2017-12-03 18:09:04 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('libraries',1);
|
|
|
|
jQuery('#jform_libraries').removeAttr('required');
|
|
|
|
jQuery('#jform_libraries').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_libraries').removeClass('required');
|
2019-10-16 20:34:36 +00:00
|
|
|
jform_vvvvwbzvxk_required = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// the vvvvwcb function
|
|
|
|
function vvvvwcb(target_vvvvwcb)
|
|
|
|
{
|
|
|
|
// set the function logic
|
|
|
|
if (target_vvvvwcb == 1)
|
|
|
|
{
|
|
|
|
jQuery('#jform_how').closest('.control-group').show();
|
|
|
|
// add required attribute to how field
|
|
|
|
if (jform_vvvvwcbvxl_required)
|
|
|
|
{
|
|
|
|
updateFieldRequired('how',0);
|
|
|
|
jQuery('#jform_how').prop('required','required');
|
|
|
|
jQuery('#jform_how').attr('aria-required',true);
|
|
|
|
jQuery('#jform_how').addClass('required');
|
|
|
|
jform_vvvvwcbvxl_required = false;
|
|
|
|
}
|
|
|
|
jQuery('#jform_type').closest('.control-group').show();
|
|
|
|
// add required attribute to type field
|
|
|
|
if (jform_vvvvwcbvxm_required)
|
|
|
|
{
|
|
|
|
updateFieldRequired('type',0);
|
|
|
|
jQuery('#jform_type').prop('required','required');
|
|
|
|
jQuery('#jform_type').attr('aria-required',true);
|
|
|
|
jQuery('#jform_type').addClass('required');
|
|
|
|
jform_vvvvwcbvxm_required = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_how').closest('.control-group').hide();
|
|
|
|
// remove required attribute from how field
|
|
|
|
if (!jform_vvvvwcbvxl_required)
|
|
|
|
{
|
|
|
|
updateFieldRequired('how',1);
|
|
|
|
jQuery('#jform_how').removeAttr('required');
|
|
|
|
jQuery('#jform_how').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_how').removeClass('required');
|
|
|
|
jform_vvvvwcbvxl_required = true;
|
|
|
|
}
|
|
|
|
jQuery('#jform_type').closest('.control-group').hide();
|
|
|
|
// remove required attribute from type field
|
|
|
|
if (!jform_vvvvwcbvxm_required)
|
|
|
|
{
|
|
|
|
updateFieldRequired('type',1);
|
|
|
|
jQuery('#jform_type').removeAttr('required');
|
|
|
|
jQuery('#jform_type').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_type').removeClass('required');
|
|
|
|
jform_vvvvwcbvxm_required = true;
|
2017-12-03 18:09:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-26 00:29:08 +00:00
|
|
|
// 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;
|
|
|
|
}
|
|
|
|
|
2018-03-11 02:44:43 +00:00
|
|
|
|
2017-11-26 00:29:08 +00:00
|
|
|
jQuery(document).ready(function()
|
|
|
|
{
|
2018-01-15 15:54:05 +00:00
|
|
|
// get the linked details
|
|
|
|
getLinked();
|
2017-11-26 00:29:08 +00:00
|
|
|
// now load the displays
|
|
|
|
getAjaxDisplay('library_config');
|
|
|
|
getAjaxDisplay('library_files_folders_urls');
|
2019-01-31 21:44:21 +00:00
|
|
|
|
|
|
|
// check and load all the customcode edit buttons
|
|
|
|
setTimeout(getEditCustomCodeButtons, 300);
|
2017-11-26 00:29:08 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
function addData(result,where){
|
|
|
|
jQuery(result).insertAfter(jQuery(where).closest('.control-group'));
|
|
|
|
}
|
2019-01-31 21:44:21 +00:00
|
|
|
|
|
|
|
function getAjaxDisplay(type){
|
|
|
|
getAjaxDisplay_server(type).done(function(result) {
|
|
|
|
if (result) {
|
|
|
|
jQuery('#display_'+type).html(result);
|
|
|
|
}
|
|
|
|
// set button
|
|
|
|
addButtonID(type,'header_'+type+'_buttons', 2); // <-- little edit button
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function getAjaxDisplay_server(type){
|
2019-07-08 16:05:54 +00:00
|
|
|
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getAjaxDisplay&format=json&raw=true&vdm="+vastDevMod);
|
2019-01-31 21:44:21 +00:00
|
|
|
if (token.length > 0 && type.length > 0) {
|
2019-07-08 16:05:54 +00:00
|
|
|
var request = token+'=1&type=' + type;
|
2019-01-31 21:44:21 +00:00
|
|
|
}
|
|
|
|
return jQuery.ajax({
|
|
|
|
type: 'GET',
|
|
|
|
url: getUrl,
|
|
|
|
dataType: 'json',
|
|
|
|
data: request,
|
|
|
|
jsonp: false
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function getFieldSelectOptions_server(fieldId){
|
2019-07-08 16:05:54 +00:00
|
|
|
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.fieldSelectOptions&format=json&raw=true");
|
2019-01-31 21:44:21 +00:00
|
|
|
if (token.length > 0 && fieldId > 0) {
|
2019-07-08 16:05:54 +00:00
|
|
|
var request = token+'=1&id='+fieldId;
|
2019-01-31 21:44:21 +00:00
|
|
|
}
|
|
|
|
return jQuery.ajax({
|
|
|
|
type: 'GET',
|
|
|
|
url: getUrl,
|
|
|
|
dataType: 'json',
|
|
|
|
data: request,
|
|
|
|
jsonp: false
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function getFieldSelectOptions(fieldKey){
|
|
|
|
// first check if the field is set
|
|
|
|
if(jQuery("#jform_addconditions__addconditions"+fieldKey+"__option_field").length) {
|
|
|
|
var fieldId = jQuery("#jform_addconditions__addconditions"+fieldKey+"__option_field option:selected").val();
|
|
|
|
getFieldSelectOptions_server(fieldId).done(function(result) {
|
|
|
|
if(result) {
|
|
|
|
jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__field_options').val(result);
|
|
|
|
} else {
|
|
|
|
jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__field_options').val('');
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function getEditCustomCodeButtons_server(id){
|
2019-07-08 16:05:54 +00:00
|
|
|
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
|
2019-01-31 21:44:21 +00:00
|
|
|
if(token.length > 0 && id > 0){
|
2019-07-08 16:05:54 +00:00
|
|
|
var request = token+'=1&id='+id+'&return_here='+return_here;
|
2019-01-31 21:44:21 +00:00
|
|
|
}
|
|
|
|
return jQuery.ajax({
|
|
|
|
type: 'GET',
|
|
|
|
url: getUrl,
|
|
|
|
dataType: 'json',
|
|
|
|
data: request,
|
|
|
|
jsonp: false
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function getEditCustomCodeButtons(){
|
|
|
|
// get the id
|
|
|
|
id = jQuery("#jform_id").val();
|
|
|
|
getEditCustomCodeButtons_server(id).done(function(result) {
|
|
|
|
if(isObject(result)){
|
|
|
|
jQuery.each(result, function( field, buttons ) {
|
2019-05-15 22:50:45 +00:00
|
|
|
jQuery('<div class="control-group"><div class="control-label"><label>Add/Edit Customcode</label></div><div class="controls control-customcode-buttons-'+field+'"></div></div>').insertBefore(".control-wrapper-"+ field);
|
2019-01-31 21:44:21 +00:00
|
|
|
jQuery.each(buttons, function( name, button ) {
|
|
|
|
jQuery(".control-customcode-buttons-"+field).append(button);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// check object is not empty
|
|
|
|
function isObject(obj) {
|
|
|
|
for(var prop in obj) {
|
|
|
|
if (Object.prototype.hasOwnProperty.call(obj, prop)) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
2018-02-27 12:17:38 +00:00
|
|
|
|
2017-11-26 00:29:08 +00:00
|
|
|
function addButtonID_server(type, size){
|
2018-12-29 14:56:06 +00:00
|
|
|
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&raw=true&vdm="+vastDevMod);
|
2017-11-26 00:29:08 +00:00
|
|
|
if(token.length > 0 && type.length > 0 && size > 0){
|
2019-07-08 16:05:54 +00:00
|
|
|
var request = token+'=1&type='+type+'&size='+size;
|
2017-11-26 00:29:08 +00:00
|
|
|
}
|
|
|
|
return jQuery.ajax({
|
|
|
|
type: 'GET',
|
|
|
|
url: getUrl,
|
2018-12-29 14:56:06 +00:00
|
|
|
dataType: 'json',
|
2017-11-26 00:29:08 +00:00
|
|
|
data: request,
|
2018-12-29 14:56:06 +00:00
|
|
|
jsonp: false
|
2017-11-26 00:29:08 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
function addButtonID(type, where, size){
|
|
|
|
addButtonID_server(type, size).done(function(result) {
|
|
|
|
if(result){
|
|
|
|
if (2 == size) {
|
|
|
|
jQuery('#'+where).html(result);
|
|
|
|
} else {
|
|
|
|
addData(result, '#jform_'+where);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
2018-02-27 12:17:38 +00:00
|
|
|
}
|
|
|
|
|
2018-03-28 09:46:14 +00:00
|
|
|
function addButton_server(type, size){
|
2018-12-29 14:56:06 +00:00
|
|
|
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod);
|
2017-11-26 00:29:08 +00:00
|
|
|
if(token.length > 0 && type.length > 0){
|
2019-07-08 16:05:54 +00:00
|
|
|
var request = token+'=1&type='+type+'&size='+size;
|
2017-11-26 00:29:08 +00:00
|
|
|
}
|
|
|
|
return jQuery.ajax({
|
|
|
|
type: 'GET',
|
|
|
|
url: getUrl,
|
2018-12-29 14:56:06 +00:00
|
|
|
dataType: 'json',
|
2017-11-26 00:29:08 +00:00
|
|
|
data: request,
|
2018-12-29 14:56:06 +00:00
|
|
|
jsonp: false
|
2017-11-26 00:29:08 +00:00
|
|
|
});
|
|
|
|
}
|
2018-03-28 09:46:14 +00:00
|
|
|
function addButton(type, where, size){
|
|
|
|
// just to insure that default behaviour still works
|
|
|
|
size = typeof size !== 'undefined' ? size : 1;
|
|
|
|
addButton_server(type, size).done(function(result) {
|
2017-11-26 00:29:08 +00:00
|
|
|
if(result){
|
2018-03-28 09:46:14 +00:00
|
|
|
if (2 == size) {
|
|
|
|
jQuery('#'+where).html(result);
|
|
|
|
} else {
|
|
|
|
addData(result, '#jform_'+where);
|
|
|
|
}
|
2017-11-26 00:29:08 +00:00
|
|
|
}
|
|
|
|
})
|
2018-02-27 12:17:38 +00:00
|
|
|
}
|
|
|
|
|
2018-01-15 15:54:05 +00:00
|
|
|
function getLinked_server(type){
|
2019-07-08 16:05:54 +00:00
|
|
|
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&raw=true&vdm="+vastDevMod);
|
2018-01-15 15:54:05 +00:00
|
|
|
if(token.length > 0 && type > 0){
|
2019-07-08 16:05:54 +00:00
|
|
|
var request = token+'=1&type='+type;
|
2018-01-15 15:54:05 +00:00
|
|
|
}
|
|
|
|
return jQuery.ajax({
|
|
|
|
type: 'GET',
|
|
|
|
url: getUrl,
|
2018-12-29 14:56:06 +00:00
|
|
|
dataType: 'json',
|
2018-01-15 15:54:05 +00:00
|
|
|
data: request,
|
2018-12-29 14:56:06 +00:00
|
|
|
jsonp: false
|
2018-01-15 15:54:05 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function getLinked(){
|
|
|
|
getLinked_server(1).done(function(result) {
|
|
|
|
if(result){
|
|
|
|
jQuery('#display_linked_to').html(result);
|
|
|
|
}
|
|
|
|
});
|
2017-11-26 00:29:08 +00:00
|
|
|
}
|