2015-12-23 12:44:56 +00:00
|
|
|
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
|
|
|
__ __ _ _____ _ _ __ __ _ _ _
|
|
|
|
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
|
|
|
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
|
|
|
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
|
|
|
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
|
|
|
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
|
|
|
| |
|
|
|
|
|_|
|
|
|
|
/-------------------------------------------------------------------------------------------------------------------------------/
|
2015-11-30 21:30:54 +00:00
|
|
|
|
2015-12-23 12:44:56 +00:00
|
|
|
@version 1.3.0
|
2016-01-05 07:05:55 +00:00
|
|
|
@build 5th January, 2016
|
2015-11-30 21:30:54 +00:00
|
|
|
@created 22nd October, 2015
|
|
|
|
@package Sermon Distributor
|
|
|
|
@subpackage sermon.js
|
|
|
|
@author Llewellyn van der Merwe <https://www.vdm.io/>
|
|
|
|
@copyright Copyright (C) 2015. All Rights Reserved
|
2015-12-23 12:44:56 +00:00
|
|
|
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
|
|
|
|
|
|
|
A sermon distributor that links to Dropbox.
|
|
|
|
|
|
|
|
/-----------------------------------------------------------------------------------------------------------------------------*/
|
2015-11-30 21:30:54 +00:00
|
|
|
|
|
|
|
// Some Global Values
|
2016-01-05 07:05:55 +00:00
|
|
|
jform_FEFzgVWDPW_required = false;
|
|
|
|
jform_pXwBipvOab_required = false;
|
|
|
|
jform_njVgKMfRGW_required = false;
|
|
|
|
jform_BGnLThLamW_required = false;
|
|
|
|
jform_kwSAfbWIQX_required = false;
|
2015-11-30 21:30:54 +00:00
|
|
|
|
|
|
|
// Initial Script
|
|
|
|
jQuery(document).ready(function()
|
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
var source_FEFzgVW = jQuery("#jform_source").val();
|
|
|
|
FEFzgVW(source_FEFzgVW);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
var source_kXSJVyd = jQuery("#jform_source").val();
|
|
|
|
var build_kXSJVyd = jQuery("#jform_build input[type='radio']:checked").val();
|
|
|
|
kXSJVyd(source_kXSJVyd,build_kXSJVyd);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
var source_pXwBipv = jQuery("#jform_source").val();
|
|
|
|
var build_pXwBipv = jQuery("#jform_build input[type='radio']:checked").val();
|
|
|
|
pXwBipv(source_pXwBipv,build_pXwBipv);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
var build_njVgKMf = jQuery("#jform_build input[type='radio']:checked").val();
|
|
|
|
var source_njVgKMf = jQuery("#jform_source").val();
|
|
|
|
njVgKMf(build_njVgKMf,source_njVgKMf);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
var source_BGnLThL = jQuery("#jform_source").val();
|
|
|
|
BGnLThL(source_BGnLThL);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
var source_kwSAfbW = jQuery("#jform_source").val();
|
|
|
|
kwSAfbW(source_kwSAfbW);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
var link_type_KcgziOs = jQuery("#jform_link_type input[type='radio']:checked").val();
|
|
|
|
KcgziOs(link_type_KcgziOs);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
var link_type_mIYnoFx = jQuery("#jform_link_type input[type='radio']:checked").val();
|
|
|
|
mIYnoFx(link_type_mIYnoFx);
|
2015-11-30 21:30:54 +00:00
|
|
|
});
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// the FEFzgVW function
|
|
|
|
function FEFzgVW(source_FEFzgVW)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
if (isSet(source_FEFzgVW) && source_FEFzgVW.constructor !== Array)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
var temp_FEFzgVW = source_FEFzgVW;
|
|
|
|
var source_FEFzgVW = [];
|
|
|
|
source_FEFzgVW.push(temp_FEFzgVW);
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-05 07:05:55 +00:00
|
|
|
else if (!isSet(source_FEFzgVW))
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
var source_FEFzgVW = [];
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-05 07:05:55 +00:00
|
|
|
var source = source_FEFzgVW.some(source_FEFzgVW_SomeFunc);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8247] set this function logic
|
2015-11-30 21:30:54 +00:00
|
|
|
if (source)
|
|
|
|
{
|
|
|
|
jQuery('#jform_build').closest('.control-group').show();
|
2016-01-05 07:05:55 +00:00
|
|
|
if (jform_FEFzgVWDPW_required)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('build',0);
|
|
|
|
jQuery('#jform_build').prop('required','required');
|
|
|
|
jQuery('#jform_build').attr('aria-required',true);
|
|
|
|
jQuery('#jform_build').addClass('required');
|
2016-01-05 07:05:55 +00:00
|
|
|
jform_FEFzgVWDPW_required = false;
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_build').closest('.control-group').hide();
|
2016-01-05 07:05:55 +00:00
|
|
|
if (!jform_FEFzgVWDPW_required)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('build',1);
|
|
|
|
jQuery('#jform_build').removeAttr('required');
|
|
|
|
jQuery('#jform_build').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_build').removeClass('required');
|
2016-01-05 07:05:55 +00:00
|
|
|
jform_FEFzgVWDPW_required = true;
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// the FEFzgVW Some function
|
|
|
|
function source_FEFzgVW_SomeFunc(source_FEFzgVW)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8234] set the function logic
|
|
|
|
if (source_FEFzgVW == 2)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// the kXSJVyd function
|
|
|
|
function kXSJVyd(source_kXSJVyd,build_kXSJVyd)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
if (isSet(source_kXSJVyd) && source_kXSJVyd.constructor !== Array)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
var temp_kXSJVyd = source_kXSJVyd;
|
|
|
|
var source_kXSJVyd = [];
|
|
|
|
source_kXSJVyd.push(temp_kXSJVyd);
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-05 07:05:55 +00:00
|
|
|
else if (!isSet(source_kXSJVyd))
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
var source_kXSJVyd = [];
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-05 07:05:55 +00:00
|
|
|
var source = source_kXSJVyd.some(source_kXSJVyd_SomeFunc);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
if (isSet(build_kXSJVyd) && build_kXSJVyd.constructor !== Array)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
var temp_kXSJVyd = build_kXSJVyd;
|
|
|
|
var build_kXSJVyd = [];
|
|
|
|
build_kXSJVyd.push(temp_kXSJVyd);
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-05 07:05:55 +00:00
|
|
|
else if (!isSet(build_kXSJVyd))
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
var build_kXSJVyd = [];
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-05 07:05:55 +00:00
|
|
|
var build = build_kXSJVyd.some(build_kXSJVyd_SomeFunc);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8247] set this function logic
|
2015-11-30 21:30:54 +00:00
|
|
|
if (source && build)
|
|
|
|
{
|
|
|
|
jQuery('.note_auto_dropbox').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('.note_auto_dropbox').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// the kXSJVyd Some function
|
|
|
|
function source_kXSJVyd_SomeFunc(source_kXSJVyd)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8234] set the function logic
|
|
|
|
if (source_kXSJVyd == 2)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// the kXSJVyd Some function
|
|
|
|
function build_kXSJVyd_SomeFunc(build_kXSJVyd)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8234] set the function logic
|
|
|
|
if (build_kXSJVyd == 2)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// the pXwBipv function
|
|
|
|
function pXwBipv(source_pXwBipv,build_pXwBipv)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
if (isSet(source_pXwBipv) && source_pXwBipv.constructor !== Array)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
var temp_pXwBipv = source_pXwBipv;
|
|
|
|
var source_pXwBipv = [];
|
|
|
|
source_pXwBipv.push(temp_pXwBipv);
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-05 07:05:55 +00:00
|
|
|
else if (!isSet(source_pXwBipv))
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
var source_pXwBipv = [];
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-05 07:05:55 +00:00
|
|
|
var source = source_pXwBipv.some(source_pXwBipv_SomeFunc);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
if (isSet(build_pXwBipv) && build_pXwBipv.constructor !== Array)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
var temp_pXwBipv = build_pXwBipv;
|
|
|
|
var build_pXwBipv = [];
|
|
|
|
build_pXwBipv.push(temp_pXwBipv);
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-05 07:05:55 +00:00
|
|
|
else if (!isSet(build_pXwBipv))
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
var build_pXwBipv = [];
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-05 07:05:55 +00:00
|
|
|
var build = build_pXwBipv.some(build_pXwBipv_SomeFunc);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8247] set this function logic
|
2015-11-30 21:30:54 +00:00
|
|
|
if (source && build)
|
|
|
|
{
|
|
|
|
jQuery('#jform_manual_files').closest('.control-group').show();
|
2016-01-05 07:05:55 +00:00
|
|
|
if (jform_pXwBipvOab_required)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('manual_files',0);
|
|
|
|
jQuery('#jform_manual_files').prop('required','required');
|
|
|
|
jQuery('#jform_manual_files').attr('aria-required',true);
|
|
|
|
jQuery('#jform_manual_files').addClass('required');
|
2016-01-05 07:05:55 +00:00
|
|
|
jform_pXwBipvOab_required = false;
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
jQuery('.note_manual_dropbox').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_manual_files').closest('.control-group').hide();
|
2016-01-05 07:05:55 +00:00
|
|
|
if (!jform_pXwBipvOab_required)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('manual_files',1);
|
|
|
|
jQuery('#jform_manual_files').removeAttr('required');
|
|
|
|
jQuery('#jform_manual_files').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_manual_files').removeClass('required');
|
2016-01-05 07:05:55 +00:00
|
|
|
jform_pXwBipvOab_required = true;
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
|
|
|
jQuery('.note_manual_dropbox').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// the pXwBipv Some function
|
|
|
|
function source_pXwBipv_SomeFunc(source_pXwBipv)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8234] set the function logic
|
|
|
|
if (source_pXwBipv == 2)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// the pXwBipv Some function
|
|
|
|
function build_pXwBipv_SomeFunc(build_pXwBipv)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8234] set the function logic
|
|
|
|
if (build_pXwBipv == 1)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// the njVgKMf function
|
|
|
|
function njVgKMf(build_njVgKMf,source_njVgKMf)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
if (isSet(build_njVgKMf) && build_njVgKMf.constructor !== Array)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
var temp_njVgKMf = build_njVgKMf;
|
|
|
|
var build_njVgKMf = [];
|
|
|
|
build_njVgKMf.push(temp_njVgKMf);
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-05 07:05:55 +00:00
|
|
|
else if (!isSet(build_njVgKMf))
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
var build_njVgKMf = [];
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-05 07:05:55 +00:00
|
|
|
var build = build_njVgKMf.some(build_njVgKMf_SomeFunc);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
if (isSet(source_njVgKMf) && source_njVgKMf.constructor !== Array)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
var temp_njVgKMf = source_njVgKMf;
|
|
|
|
var source_njVgKMf = [];
|
|
|
|
source_njVgKMf.push(temp_njVgKMf);
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-05 07:05:55 +00:00
|
|
|
else if (!isSet(source_njVgKMf))
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
var source_njVgKMf = [];
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-05 07:05:55 +00:00
|
|
|
var source = source_njVgKMf.some(source_njVgKMf_SomeFunc);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8247] set this function logic
|
2015-11-30 21:30:54 +00:00
|
|
|
if (build && source)
|
|
|
|
{
|
|
|
|
jQuery('#jform_manual_files').closest('.control-group').show();
|
2016-01-05 07:05:55 +00:00
|
|
|
if (jform_njVgKMfRGW_required)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('manual_files',0);
|
|
|
|
jQuery('#jform_manual_files').prop('required','required');
|
|
|
|
jQuery('#jform_manual_files').attr('aria-required',true);
|
|
|
|
jQuery('#jform_manual_files').addClass('required');
|
2016-01-05 07:05:55 +00:00
|
|
|
jform_njVgKMfRGW_required = false;
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
jQuery('.note_manual_dropbox').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_manual_files').closest('.control-group').hide();
|
2016-01-05 07:05:55 +00:00
|
|
|
if (!jform_njVgKMfRGW_required)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('manual_files',1);
|
|
|
|
jQuery('#jform_manual_files').removeAttr('required');
|
|
|
|
jQuery('#jform_manual_files').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_manual_files').removeClass('required');
|
2016-01-05 07:05:55 +00:00
|
|
|
jform_njVgKMfRGW_required = true;
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
|
|
|
jQuery('.note_manual_dropbox').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// the njVgKMf Some function
|
|
|
|
function build_njVgKMf_SomeFunc(build_njVgKMf)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8234] set the function logic
|
|
|
|
if (build_njVgKMf == 1)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// the njVgKMf Some function
|
|
|
|
function source_njVgKMf_SomeFunc(source_njVgKMf)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8234] set the function logic
|
|
|
|
if (source_njVgKMf == 2)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// the BGnLThL function
|
|
|
|
function BGnLThL(source_BGnLThL)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
if (isSet(source_BGnLThL) && source_BGnLThL.constructor !== Array)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
var temp_BGnLThL = source_BGnLThL;
|
|
|
|
var source_BGnLThL = [];
|
|
|
|
source_BGnLThL.push(temp_BGnLThL);
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-05 07:05:55 +00:00
|
|
|
else if (!isSet(source_BGnLThL))
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
var source_BGnLThL = [];
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-05 07:05:55 +00:00
|
|
|
var source = source_BGnLThL.some(source_BGnLThL_SomeFunc);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8247] set this function logic
|
2015-11-30 21:30:54 +00:00
|
|
|
if (source)
|
|
|
|
{
|
|
|
|
jQuery('#jform_local_files').closest('.control-group').show();
|
2016-01-05 07:05:55 +00:00
|
|
|
if (jform_BGnLThLamW_required)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('local_files',0);
|
|
|
|
jQuery('#jform_local_files').prop('required','required');
|
|
|
|
jQuery('#jform_local_files').attr('aria-required',true);
|
|
|
|
jQuery('#jform_local_files').addClass('required');
|
2016-01-05 07:05:55 +00:00
|
|
|
jform_BGnLThLamW_required = false;
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_local_files').closest('.control-group').hide();
|
2016-01-05 07:05:55 +00:00
|
|
|
if (!jform_BGnLThLamW_required)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('local_files',1);
|
|
|
|
jQuery('#jform_local_files').removeAttr('required');
|
|
|
|
jQuery('#jform_local_files').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_local_files').removeClass('required');
|
2016-01-05 07:05:55 +00:00
|
|
|
jform_BGnLThLamW_required = true;
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// the BGnLThL Some function
|
|
|
|
function source_BGnLThL_SomeFunc(source_BGnLThL)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8234] set the function logic
|
|
|
|
if (source_BGnLThL == 1)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// the kwSAfbW function
|
|
|
|
function kwSAfbW(source_kwSAfbW)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
if (isSet(source_kwSAfbW) && source_kwSAfbW.constructor !== Array)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
var temp_kwSAfbW = source_kwSAfbW;
|
|
|
|
var source_kwSAfbW = [];
|
|
|
|
source_kwSAfbW.push(temp_kwSAfbW);
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-05 07:05:55 +00:00
|
|
|
else if (!isSet(source_kwSAfbW))
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
var source_kwSAfbW = [];
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-05 07:05:55 +00:00
|
|
|
var source = source_kwSAfbW.some(source_kwSAfbW_SomeFunc);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8247] set this function logic
|
2015-11-30 21:30:54 +00:00
|
|
|
if (source)
|
|
|
|
{
|
|
|
|
jQuery('#jform_url').closest('.control-group').show();
|
2016-01-05 07:05:55 +00:00
|
|
|
if (jform_kwSAfbWIQX_required)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('url',0);
|
|
|
|
jQuery('#jform_url').prop('required','required');
|
|
|
|
jQuery('#jform_url').attr('aria-required',true);
|
|
|
|
jQuery('#jform_url').addClass('required');
|
2016-01-05 07:05:55 +00:00
|
|
|
jform_kwSAfbWIQX_required = false;
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_url').closest('.control-group').hide();
|
2016-01-05 07:05:55 +00:00
|
|
|
if (!jform_kwSAfbWIQX_required)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('url',1);
|
|
|
|
jQuery('#jform_url').removeAttr('required');
|
|
|
|
jQuery('#jform_url').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_url').removeClass('required');
|
2016-01-05 07:05:55 +00:00
|
|
|
jform_kwSAfbWIQX_required = true;
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// the kwSAfbW Some function
|
|
|
|
function source_kwSAfbW_SomeFunc(source_kwSAfbW)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8234] set the function logic
|
|
|
|
if (source_kwSAfbW == 3)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// the KcgziOs function
|
|
|
|
function KcgziOs(link_type_KcgziOs)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8269] set the function logic
|
|
|
|
if (link_type_KcgziOs == 2)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
jQuery('.note_link_directed').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('.note_link_directed').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-05 07:05:55 +00:00
|
|
|
// the mIYnoFx function
|
|
|
|
function mIYnoFx(link_type_mIYnoFx)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8269] set the function logic
|
|
|
|
if (link_type_mIYnoFx == 1)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
jQuery('.note_link_encrypted').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('.note_link_encrypted').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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;
|
|
|
|
}
|