114 lines
2.8 KiB
JavaScript
114 lines
2.8 KiB
JavaScript
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
|
Agence Agerix
|
|
/-------------------------------------------------------------------------------------------------------/
|
|
|
|
@version 1.x.x
|
|
@build 2nd June, 2022
|
|
@created 12th December, 2020
|
|
@package Extension Distributor
|
|
@subpackage extension.js
|
|
@author Emmanuel Danan <https://agerix.fr>
|
|
@copyright Copyright (C) 2021. All Rights Reserved.
|
|
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
|
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
|
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
|
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
|
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
|
|
|
/------------------------------------------------------------------------------------------------------*/
|
|
|
|
// Initial Script
|
|
jQuery(document).ready(function()
|
|
{
|
|
var type_vvvvvwb = jQuery("#jform_type").val();
|
|
vvvvvwb(type_vvvvvwb);
|
|
|
|
var type_vvvvvwc = jQuery("#jform_type").val();
|
|
vvvvvwc(type_vvvvvwc);
|
|
});
|
|
|
|
// the vvvvvwb function
|
|
function vvvvvwb(type_vvvvvwb)
|
|
{
|
|
if (isSet(type_vvvvvwb) && type_vvvvvwb.constructor !== Array)
|
|
{
|
|
var temp_vvvvvwb = type_vvvvvwb;
|
|
var type_vvvvvwb = [];
|
|
type_vvvvvwb.push(temp_vvvvvwb);
|
|
}
|
|
else if (!isSet(type_vvvvvwb))
|
|
{
|
|
var type_vvvvvwb = [];
|
|
}
|
|
var type = type_vvvvvwb.some(type_vvvvvwb_SomeFunc);
|
|
|
|
|
|
// set this function logic
|
|
if (type)
|
|
{
|
|
jQuery('#jform_group').closest('.control-group').show();
|
|
}
|
|
else
|
|
{
|
|
jQuery('#jform_group').closest('.control-group').hide();
|
|
}
|
|
}
|
|
|
|
// the vvvvvwb Some function
|
|
function type_vvvvvwb_SomeFunc(type_vvvvvwb)
|
|
{
|
|
// set the function logic
|
|
if (type_vvvvvwb == 'plugin')
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// the vvvvvwc function
|
|
function vvvvvwc(type_vvvvvwc)
|
|
{
|
|
if (isSet(type_vvvvvwc) && type_vvvvvwc.constructor !== Array)
|
|
{
|
|
var temp_vvvvvwc = type_vvvvvwc;
|
|
var type_vvvvvwc = [];
|
|
type_vvvvvwc.push(temp_vvvvvwc);
|
|
}
|
|
else if (!isSet(type_vvvvvwc))
|
|
{
|
|
var type_vvvvvwc = [];
|
|
}
|
|
var type = type_vvvvvwc.some(type_vvvvvwc_SomeFunc);
|
|
|
|
|
|
// set this function logic
|
|
if (type)
|
|
{
|
|
jQuery('#jform_client').closest('.control-group').show();
|
|
}
|
|
else
|
|
{
|
|
jQuery('#jform_client').closest('.control-group').hide();
|
|
}
|
|
}
|
|
|
|
// the vvvvvwc Some function
|
|
function type_vvvvvwc_SomeFunc(type_vvvvvwc)
|
|
{
|
|
// set the function logic
|
|
if (type_vvvvvwc == 'module' || type_vvvvvwc == 'template' || type_vvvvvwc == 'language')
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// the isSet function
|
|
function isSet(val)
|
|
{
|
|
if ((val != undefined) && (val != null) && 0 !== val.length){
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|