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-06 09:58:50 +00:00
|
|
|
@build 6th 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-06 09:58:50 +00:00
|
|
|
jform_JEmAiDFgAz_required = false;
|
|
|
|
jform_mBQbiOvPmP_required = false;
|
|
|
|
jform_wsmVGIDntn_required = false;
|
|
|
|
jform_ENzGNYPiLA_required = false;
|
|
|
|
jform_YYiOanxvgR_required = false;
|
2015-11-30 21:30:54 +00:00
|
|
|
|
|
|
|
// Initial Script
|
|
|
|
jQuery(document).ready(function()
|
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
var source_JEmAiDF = jQuery("#jform_source").val();
|
|
|
|
JEmAiDF(source_JEmAiDF);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
var source_NIIuwpV = jQuery("#jform_source").val();
|
|
|
|
var build_NIIuwpV = jQuery("#jform_build input[type='radio']:checked").val();
|
|
|
|
NIIuwpV(source_NIIuwpV,build_NIIuwpV);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
var source_mBQbiOv = jQuery("#jform_source").val();
|
|
|
|
var build_mBQbiOv = jQuery("#jform_build input[type='radio']:checked").val();
|
|
|
|
mBQbiOv(source_mBQbiOv,build_mBQbiOv);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
var build_wsmVGID = jQuery("#jform_build input[type='radio']:checked").val();
|
|
|
|
var source_wsmVGID = jQuery("#jform_source").val();
|
|
|
|
wsmVGID(build_wsmVGID,source_wsmVGID);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
var source_ENzGNYP = jQuery("#jform_source").val();
|
|
|
|
ENzGNYP(source_ENzGNYP);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
var source_YYiOanx = jQuery("#jform_source").val();
|
|
|
|
YYiOanx(source_YYiOanx);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
var link_type_rCpyqQl = jQuery("#jform_link_type input[type='radio']:checked").val();
|
|
|
|
rCpyqQl(link_type_rCpyqQl);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
var link_type_RgLeKCE = jQuery("#jform_link_type input[type='radio']:checked").val();
|
|
|
|
RgLeKCE(link_type_RgLeKCE);
|
2015-11-30 21:30:54 +00:00
|
|
|
});
|
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
// the JEmAiDF function
|
|
|
|
function JEmAiDF(source_JEmAiDF)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
if (isSet(source_JEmAiDF) && source_JEmAiDF.constructor !== Array)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
var temp_JEmAiDF = source_JEmAiDF;
|
|
|
|
var source_JEmAiDF = [];
|
|
|
|
source_JEmAiDF.push(temp_JEmAiDF);
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-06 09:58:50 +00:00
|
|
|
else if (!isSet(source_JEmAiDF))
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
var source_JEmAiDF = [];
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-06 09:58:50 +00:00
|
|
|
var source = source_JEmAiDF.some(source_JEmAiDF_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-06 09:58:50 +00:00
|
|
|
if (jform_JEmAiDFgAz_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-06 09:58:50 +00:00
|
|
|
jform_JEmAiDFgAz_required = false;
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_build').closest('.control-group').hide();
|
2016-01-06 09:58:50 +00:00
|
|
|
if (!jform_JEmAiDFgAz_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-06 09:58:50 +00:00
|
|
|
jform_JEmAiDFgAz_required = true;
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
// the JEmAiDF Some function
|
|
|
|
function source_JEmAiDF_SomeFunc(source_JEmAiDF)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8234] set the function logic
|
2016-01-06 09:58:50 +00:00
|
|
|
if (source_JEmAiDF == 2)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
// the NIIuwpV function
|
|
|
|
function NIIuwpV(source_NIIuwpV,build_NIIuwpV)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
if (isSet(source_NIIuwpV) && source_NIIuwpV.constructor !== Array)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
var temp_NIIuwpV = source_NIIuwpV;
|
|
|
|
var source_NIIuwpV = [];
|
|
|
|
source_NIIuwpV.push(temp_NIIuwpV);
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-06 09:58:50 +00:00
|
|
|
else if (!isSet(source_NIIuwpV))
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
var source_NIIuwpV = [];
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-06 09:58:50 +00:00
|
|
|
var source = source_NIIuwpV.some(source_NIIuwpV_SomeFunc);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
if (isSet(build_NIIuwpV) && build_NIIuwpV.constructor !== Array)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
var temp_NIIuwpV = build_NIIuwpV;
|
|
|
|
var build_NIIuwpV = [];
|
|
|
|
build_NIIuwpV.push(temp_NIIuwpV);
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-06 09:58:50 +00:00
|
|
|
else if (!isSet(build_NIIuwpV))
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
var build_NIIuwpV = [];
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-06 09:58:50 +00:00
|
|
|
var build = build_NIIuwpV.some(build_NIIuwpV_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-06 09:58:50 +00:00
|
|
|
// the NIIuwpV Some function
|
|
|
|
function source_NIIuwpV_SomeFunc(source_NIIuwpV)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8234] set the function logic
|
2016-01-06 09:58:50 +00:00
|
|
|
if (source_NIIuwpV == 2)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
// the NIIuwpV Some function
|
|
|
|
function build_NIIuwpV_SomeFunc(build_NIIuwpV)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8234] set the function logic
|
2016-01-06 09:58:50 +00:00
|
|
|
if (build_NIIuwpV == 2)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
// the mBQbiOv function
|
|
|
|
function mBQbiOv(source_mBQbiOv,build_mBQbiOv)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
if (isSet(source_mBQbiOv) && source_mBQbiOv.constructor !== Array)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
var temp_mBQbiOv = source_mBQbiOv;
|
|
|
|
var source_mBQbiOv = [];
|
|
|
|
source_mBQbiOv.push(temp_mBQbiOv);
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-06 09:58:50 +00:00
|
|
|
else if (!isSet(source_mBQbiOv))
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
var source_mBQbiOv = [];
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-06 09:58:50 +00:00
|
|
|
var source = source_mBQbiOv.some(source_mBQbiOv_SomeFunc);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
if (isSet(build_mBQbiOv) && build_mBQbiOv.constructor !== Array)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
var temp_mBQbiOv = build_mBQbiOv;
|
|
|
|
var build_mBQbiOv = [];
|
|
|
|
build_mBQbiOv.push(temp_mBQbiOv);
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-06 09:58:50 +00:00
|
|
|
else if (!isSet(build_mBQbiOv))
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
var build_mBQbiOv = [];
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-06 09:58:50 +00:00
|
|
|
var build = build_mBQbiOv.some(build_mBQbiOv_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-06 09:58:50 +00:00
|
|
|
if (jform_mBQbiOvPmP_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-06 09:58:50 +00:00
|
|
|
jform_mBQbiOvPmP_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-06 09:58:50 +00:00
|
|
|
if (!jform_mBQbiOvPmP_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-06 09:58:50 +00:00
|
|
|
jform_mBQbiOvPmP_required = true;
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
|
|
|
jQuery('.note_manual_dropbox').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
// the mBQbiOv Some function
|
|
|
|
function source_mBQbiOv_SomeFunc(source_mBQbiOv)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8234] set the function logic
|
2016-01-06 09:58:50 +00:00
|
|
|
if (source_mBQbiOv == 2)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
// the mBQbiOv Some function
|
|
|
|
function build_mBQbiOv_SomeFunc(build_mBQbiOv)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8234] set the function logic
|
2016-01-06 09:58:50 +00:00
|
|
|
if (build_mBQbiOv == 1)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
// the wsmVGID function
|
|
|
|
function wsmVGID(build_wsmVGID,source_wsmVGID)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
if (isSet(build_wsmVGID) && build_wsmVGID.constructor !== Array)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
var temp_wsmVGID = build_wsmVGID;
|
|
|
|
var build_wsmVGID = [];
|
|
|
|
build_wsmVGID.push(temp_wsmVGID);
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-06 09:58:50 +00:00
|
|
|
else if (!isSet(build_wsmVGID))
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
var build_wsmVGID = [];
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-06 09:58:50 +00:00
|
|
|
var build = build_wsmVGID.some(build_wsmVGID_SomeFunc);
|
2015-11-30 21:30:54 +00:00
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
if (isSet(source_wsmVGID) && source_wsmVGID.constructor !== Array)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
var temp_wsmVGID = source_wsmVGID;
|
|
|
|
var source_wsmVGID = [];
|
|
|
|
source_wsmVGID.push(temp_wsmVGID);
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-06 09:58:50 +00:00
|
|
|
else if (!isSet(source_wsmVGID))
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
var source_wsmVGID = [];
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-06 09:58:50 +00:00
|
|
|
var source = source_wsmVGID.some(source_wsmVGID_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-06 09:58:50 +00:00
|
|
|
if (jform_wsmVGIDntn_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-06 09:58:50 +00:00
|
|
|
jform_wsmVGIDntn_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-06 09:58:50 +00:00
|
|
|
if (!jform_wsmVGIDntn_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-06 09:58:50 +00:00
|
|
|
jform_wsmVGIDntn_required = true;
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
|
|
|
jQuery('.note_manual_dropbox').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
// the wsmVGID Some function
|
|
|
|
function build_wsmVGID_SomeFunc(build_wsmVGID)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8234] set the function logic
|
2016-01-06 09:58:50 +00:00
|
|
|
if (build_wsmVGID == 1)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
// the wsmVGID Some function
|
|
|
|
function source_wsmVGID_SomeFunc(source_wsmVGID)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8234] set the function logic
|
2016-01-06 09:58:50 +00:00
|
|
|
if (source_wsmVGID == 2)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
// the ENzGNYP function
|
|
|
|
function ENzGNYP(source_ENzGNYP)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
if (isSet(source_ENzGNYP) && source_ENzGNYP.constructor !== Array)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
var temp_ENzGNYP = source_ENzGNYP;
|
|
|
|
var source_ENzGNYP = [];
|
|
|
|
source_ENzGNYP.push(temp_ENzGNYP);
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-06 09:58:50 +00:00
|
|
|
else if (!isSet(source_ENzGNYP))
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
var source_ENzGNYP = [];
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-06 09:58:50 +00:00
|
|
|
var source = source_ENzGNYP.some(source_ENzGNYP_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-06 09:58:50 +00:00
|
|
|
if (jform_ENzGNYPiLA_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-06 09:58:50 +00:00
|
|
|
jform_ENzGNYPiLA_required = false;
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_local_files').closest('.control-group').hide();
|
2016-01-06 09:58:50 +00:00
|
|
|
if (!jform_ENzGNYPiLA_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-06 09:58:50 +00:00
|
|
|
jform_ENzGNYPiLA_required = true;
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
// the ENzGNYP Some function
|
|
|
|
function source_ENzGNYP_SomeFunc(source_ENzGNYP)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8234] set the function logic
|
2016-01-06 09:58:50 +00:00
|
|
|
if (source_ENzGNYP == 1)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
// the YYiOanx function
|
|
|
|
function YYiOanx(source_YYiOanx)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
if (isSet(source_YYiOanx) && source_YYiOanx.constructor !== Array)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
var temp_YYiOanx = source_YYiOanx;
|
|
|
|
var source_YYiOanx = [];
|
|
|
|
source_YYiOanx.push(temp_YYiOanx);
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-06 09:58:50 +00:00
|
|
|
else if (!isSet(source_YYiOanx))
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-06 09:58:50 +00:00
|
|
|
var source_YYiOanx = [];
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
2016-01-06 09:58:50 +00:00
|
|
|
var source = source_YYiOanx.some(source_YYiOanx_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-06 09:58:50 +00:00
|
|
|
if (jform_YYiOanxvgR_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-06 09:58:50 +00:00
|
|
|
jform_YYiOanxvgR_required = false;
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_url').closest('.control-group').hide();
|
2016-01-06 09:58:50 +00:00
|
|
|
if (!jform_YYiOanxvgR_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-06 09:58:50 +00:00
|
|
|
jform_YYiOanxvgR_required = true;
|
2015-11-30 21:30:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
// the YYiOanx Some function
|
|
|
|
function source_YYiOanx_SomeFunc(source_YYiOanx)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8234] set the function logic
|
2016-01-06 09:58:50 +00:00
|
|
|
if (source_YYiOanx == 3)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-01-06 09:58:50 +00:00
|
|
|
// the rCpyqQl function
|
|
|
|
function rCpyqQl(link_type_rCpyqQl)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8269] set the function logic
|
2016-01-06 09:58:50 +00:00
|
|
|
if (link_type_rCpyqQl == 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-06 09:58:50 +00:00
|
|
|
// the RgLeKCE function
|
|
|
|
function RgLeKCE(link_type_RgLeKCE)
|
2015-11-30 21:30:54 +00:00
|
|
|
{
|
2016-01-05 07:05:55 +00:00
|
|
|
// [8269] set the function logic
|
2016-01-06 09:58:50 +00:00
|
|
|
if (link_type_RgLeKCE == 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;
|
|
|
|
}
|