2016-01-30 20:28:43 +00:00
|
|
|
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
|
|
|
__ __ _ _____ _ _ __ __ _ _ _
|
|
|
|
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
|
|
|
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
|
|
|
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
|
|
|
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
|
|
|
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
|
|
|
| |
|
|
|
|
|_|
|
2017-11-06 14:15:03 +00:00
|
|
|
/-------------------------------------------------------------------------------------------------------------------------------/
|
2016-01-30 20:28:43 +00:00
|
|
|
|
2017-11-06 14:04:23 +00:00
|
|
|
@version 2.6.x
|
2016-01-30 20:28:43 +00:00
|
|
|
@created 30th April, 2015
|
|
|
|
@package Component Builder
|
|
|
|
@subpackage field.js
|
2017-12-27 03:45:35 +00:00
|
|
|
@author Llewellyn van der Merwe <http://joomlacomponentbuilder.com>
|
2017-11-06 14:04:23 +00:00
|
|
|
@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
|
2017-12-10 19:17:26 +00:00
|
|
|
jform_vvvvwaevzq_required = false;
|
|
|
|
jform_vvvvwafvzr_required = false;
|
2017-12-14 23:10:47 +00:00
|
|
|
jform_vvvvwagvzs_required = false;
|
|
|
|
jform_vvvvwahvzt_required = false;
|
2017-12-10 19:17:26 +00:00
|
|
|
jform_vvvvwakvzu_required = false;
|
|
|
|
jform_vvvvwalvzv_required = false;
|
2017-12-14 23:10:47 +00:00
|
|
|
jform_vvvvwamvzw_required = false;
|
|
|
|
jform_vvvvwanvzx_required = false;
|
2016-01-30 20:28:43 +00:00
|
|
|
|
|
|
|
// Initial Script
|
|
|
|
jQuery(document).ready(function()
|
|
|
|
{
|
2017-12-14 23:10:47 +00:00
|
|
|
var datalenght_vvvvwae = jQuery("#jform_datalenght").val();
|
|
|
|
vvvvwae(datalenght_vvvvwae);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
var datadefault_vvvvwaf = jQuery("#jform_datadefault").val();
|
|
|
|
vvvvwaf(datadefault_vvvvwaf);
|
2017-10-06 14:53:22 +00:00
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
var datatype_vvvvwag = jQuery("#jform_datatype").val();
|
|
|
|
vvvvwag(datatype_vvvvwag);
|
2017-12-03 18:09:04 +00:00
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
var datatype_vvvvwah = jQuery("#jform_datatype").val();
|
|
|
|
vvvvwah(datatype_vvvvwah);
|
2017-12-10 19:17:26 +00:00
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
var store_vvvvwai = jQuery("#jform_store").val();
|
|
|
|
var datatype_vvvvwai = jQuery("#jform_datatype").val();
|
|
|
|
vvvvwai(store_vvvvwai,datatype_vvvvwai);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
var add_css_view_vvvvwak = jQuery("#jform_add_css_view input[type='radio']:checked").val();
|
|
|
|
vvvvwak(add_css_view_vvvvwak);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
var add_css_views_vvvvwal = jQuery("#jform_add_css_views input[type='radio']:checked").val();
|
|
|
|
vvvvwal(add_css_views_vvvvwal);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
var add_javascript_view_footer_vvvvwam = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val();
|
|
|
|
vvvvwam(add_javascript_view_footer_vvvvwam);
|
2016-09-03 21:44:47 +00:00
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
var add_javascript_views_footer_vvvvwan = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val();
|
|
|
|
vvvvwan(add_javascript_views_footer_vvvvwan);
|
2016-01-30 20:28:43 +00:00
|
|
|
});
|
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// the vvvvwae function
|
|
|
|
function vvvvwae(datalenght_vvvvwae)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2017-12-14 23:10:47 +00:00
|
|
|
if (isSet(datalenght_vvvvwae) && datalenght_vvvvwae.constructor !== Array)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2017-12-14 23:10:47 +00:00
|
|
|
var temp_vvvvwae = datalenght_vvvvwae;
|
|
|
|
var datalenght_vvvvwae = [];
|
|
|
|
datalenght_vvvvwae.push(temp_vvvvwae);
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
2017-12-14 23:10:47 +00:00
|
|
|
else if (!isSet(datalenght_vvvvwae))
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2017-12-14 23:10:47 +00:00
|
|
|
var datalenght_vvvvwae = [];
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
2017-12-14 23:10:47 +00:00
|
|
|
var datalenght = datalenght_vvvvwae.some(datalenght_vvvvwae_SomeFunc);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
// set this function logic
|
|
|
|
if (datalenght)
|
|
|
|
{
|
|
|
|
jQuery('#jform_datalenght_other').closest('.control-group').show();
|
2017-12-14 23:10:47 +00:00
|
|
|
if (jform_vvvvwaevzq_required)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('datalenght_other',0);
|
|
|
|
jQuery('#jform_datalenght_other').prop('required','required');
|
|
|
|
jQuery('#jform_datalenght_other').attr('aria-required',true);
|
|
|
|
jQuery('#jform_datalenght_other').addClass('required');
|
2017-12-14 23:10:47 +00:00
|
|
|
jform_vvvvwaevzq_required = false;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_datalenght_other').closest('.control-group').hide();
|
2017-12-14 23:10:47 +00:00
|
|
|
if (!jform_vvvvwaevzq_required)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('datalenght_other',1);
|
|
|
|
jQuery('#jform_datalenght_other').removeAttr('required');
|
|
|
|
jQuery('#jform_datalenght_other').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_datalenght_other').removeClass('required');
|
2017-12-14 23:10:47 +00:00
|
|
|
jform_vvvvwaevzq_required = true;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// the vvvvwae Some function
|
|
|
|
function datalenght_vvvvwae_SomeFunc(datalenght_vvvvwae)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2017-12-14 23:10:47 +00:00
|
|
|
if (datalenght_vvvvwae == 'Other')
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// the vvvvwaf function
|
|
|
|
function vvvvwaf(datadefault_vvvvwaf)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2017-12-14 23:10:47 +00:00
|
|
|
if (isSet(datadefault_vvvvwaf) && datadefault_vvvvwaf.constructor !== Array)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2017-12-14 23:10:47 +00:00
|
|
|
var temp_vvvvwaf = datadefault_vvvvwaf;
|
|
|
|
var datadefault_vvvvwaf = [];
|
|
|
|
datadefault_vvvvwaf.push(temp_vvvvwaf);
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
2017-12-14 23:10:47 +00:00
|
|
|
else if (!isSet(datadefault_vvvvwaf))
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2017-12-14 23:10:47 +00:00
|
|
|
var datadefault_vvvvwaf = [];
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
2017-12-14 23:10:47 +00:00
|
|
|
var datadefault = datadefault_vvvvwaf.some(datadefault_vvvvwaf_SomeFunc);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
// set this function logic
|
|
|
|
if (datadefault)
|
|
|
|
{
|
|
|
|
jQuery('#jform_datadefault_other').closest('.control-group').show();
|
2017-12-14 23:10:47 +00:00
|
|
|
if (jform_vvvvwafvzr_required)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('datadefault_other',0);
|
|
|
|
jQuery('#jform_datadefault_other').prop('required','required');
|
|
|
|
jQuery('#jform_datadefault_other').attr('aria-required',true);
|
|
|
|
jQuery('#jform_datadefault_other').addClass('required');
|
2017-12-14 23:10:47 +00:00
|
|
|
jform_vvvvwafvzr_required = false;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_datadefault_other').closest('.control-group').hide();
|
2017-12-14 23:10:47 +00:00
|
|
|
if (!jform_vvvvwafvzr_required)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('datadefault_other',1);
|
|
|
|
jQuery('#jform_datadefault_other').removeAttr('required');
|
|
|
|
jQuery('#jform_datadefault_other').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_datadefault_other').removeClass('required');
|
2017-12-14 23:10:47 +00:00
|
|
|
jform_vvvvwafvzr_required = true;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// the vvvvwaf Some function
|
|
|
|
function datadefault_vvvvwaf_SomeFunc(datadefault_vvvvwaf)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2017-12-14 23:10:47 +00:00
|
|
|
if (datadefault_vvvvwaf == 'Other')
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// the vvvvwag function
|
|
|
|
function vvvvwag(datatype_vvvvwag)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2017-12-14 23:10:47 +00:00
|
|
|
if (isSet(datatype_vvvvwag) && datatype_vvvvwag.constructor !== Array)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2017-12-14 23:10:47 +00:00
|
|
|
var temp_vvvvwag = datatype_vvvvwag;
|
|
|
|
var datatype_vvvvwag = [];
|
|
|
|
datatype_vvvvwag.push(temp_vvvvwag);
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
2017-12-14 23:10:47 +00:00
|
|
|
else if (!isSet(datatype_vvvvwag))
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2017-12-14 23:10:47 +00:00
|
|
|
var datatype_vvvvwag = [];
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
2017-12-14 23:10:47 +00:00
|
|
|
var datatype = datatype_vvvvwag.some(datatype_vvvvwag_SomeFunc);
|
2016-09-03 21:44:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
// set this function logic
|
|
|
|
if (datatype)
|
|
|
|
{
|
|
|
|
jQuery('#jform_datadefault').closest('.control-group').show();
|
|
|
|
jQuery('#jform_datalenght').closest('.control-group').show();
|
|
|
|
jQuery('#jform_indexes').closest('.control-group').show();
|
2017-12-14 23:10:47 +00:00
|
|
|
if (jform_vvvvwagvzs_required)
|
2016-09-03 21:44:47 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('indexes',0);
|
|
|
|
jQuery('#jform_indexes').prop('required','required');
|
|
|
|
jQuery('#jform_indexes').attr('aria-required',true);
|
|
|
|
jQuery('#jform_indexes').addClass('required');
|
2017-12-14 23:10:47 +00:00
|
|
|
jform_vvvvwagvzs_required = false;
|
2016-09-03 21:44:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_datadefault').closest('.control-group').hide();
|
|
|
|
jQuery('#jform_datalenght').closest('.control-group').hide();
|
|
|
|
jQuery('#jform_indexes').closest('.control-group').hide();
|
2017-12-14 23:10:47 +00:00
|
|
|
if (!jform_vvvvwagvzs_required)
|
2016-09-03 21:44:47 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('indexes',1);
|
|
|
|
jQuery('#jform_indexes').removeAttr('required');
|
|
|
|
jQuery('#jform_indexes').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_indexes').removeClass('required');
|
2017-12-14 23:10:47 +00:00
|
|
|
jform_vvvvwagvzs_required = true;
|
2016-09-03 21:44:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// the vvvvwag Some function
|
|
|
|
function datatype_vvvvwag_SomeFunc(datatype_vvvvwag)
|
2016-09-03 21:44:47 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2017-12-14 23:10:47 +00:00
|
|
|
if (datatype_vvvvwag == 'CHAR' || datatype_vvvvwag == 'VARCHAR' || datatype_vvvvwag == 'DATETIME' || datatype_vvvvwag == 'DATE' || datatype_vvvvwag == 'TIME' || datatype_vvvvwag == 'INT' || datatype_vvvvwag == 'TINYINT' || datatype_vvvvwag == 'BIGINT' || datatype_vvvvwag == 'FLOAT' || datatype_vvvvwag == 'DECIMAL' || datatype_vvvvwag == 'DOUBLE')
|
2016-09-03 21:44:47 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// the vvvvwah function
|
|
|
|
function vvvvwah(datatype_vvvvwah)
|
2016-09-03 21:44:47 +00:00
|
|
|
{
|
2017-12-14 23:10:47 +00:00
|
|
|
if (isSet(datatype_vvvvwah) && datatype_vvvvwah.constructor !== Array)
|
2016-09-03 21:44:47 +00:00
|
|
|
{
|
2017-12-14 23:10:47 +00:00
|
|
|
var temp_vvvvwah = datatype_vvvvwah;
|
|
|
|
var datatype_vvvvwah = [];
|
|
|
|
datatype_vvvvwah.push(temp_vvvvwah);
|
2016-09-03 21:44:47 +00:00
|
|
|
}
|
2017-12-14 23:10:47 +00:00
|
|
|
else if (!isSet(datatype_vvvvwah))
|
2016-09-03 21:44:47 +00:00
|
|
|
{
|
2017-12-14 23:10:47 +00:00
|
|
|
var datatype_vvvvwah = [];
|
2016-09-03 21:44:47 +00:00
|
|
|
}
|
2017-12-14 23:10:47 +00:00
|
|
|
var datatype = datatype_vvvvwah.some(datatype_vvvvwah_SomeFunc);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
// set this function logic
|
|
|
|
if (datatype)
|
|
|
|
{
|
|
|
|
jQuery('#jform_store').closest('.control-group').show();
|
2017-12-14 23:10:47 +00:00
|
|
|
if (jform_vvvvwahvzt_required)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('store',0);
|
|
|
|
jQuery('#jform_store').prop('required','required');
|
|
|
|
jQuery('#jform_store').attr('aria-required',true);
|
|
|
|
jQuery('#jform_store').addClass('required');
|
2017-12-14 23:10:47 +00:00
|
|
|
jform_vvvvwahvzt_required = false;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_store').closest('.control-group').hide();
|
2017-12-14 23:10:47 +00:00
|
|
|
if (!jform_vvvvwahvzt_required)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('store',1);
|
|
|
|
jQuery('#jform_store').removeAttr('required');
|
|
|
|
jQuery('#jform_store').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_store').removeClass('required');
|
2017-12-14 23:10:47 +00:00
|
|
|
jform_vvvvwahvzt_required = true;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// the vvvvwah Some function
|
|
|
|
function datatype_vvvvwah_SomeFunc(datatype_vvvvwah)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2017-12-14 23:10:47 +00:00
|
|
|
if (datatype_vvvvwah == 'CHAR' || datatype_vvvvwah == 'VARCHAR' || datatype_vvvvwah == 'TEXT' || datatype_vvvvwah == 'MEDIUMTEXT' || datatype_vvvvwah == 'LONGTEXT')
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// the vvvvwai function
|
|
|
|
function vvvvwai(store_vvvvwai,datatype_vvvvwai)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2017-12-14 23:10:47 +00:00
|
|
|
if (isSet(store_vvvvwai) && store_vvvvwai.constructor !== Array)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2017-12-14 23:10:47 +00:00
|
|
|
var temp_vvvvwai = store_vvvvwai;
|
|
|
|
var store_vvvvwai = [];
|
|
|
|
store_vvvvwai.push(temp_vvvvwai);
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
2017-12-14 23:10:47 +00:00
|
|
|
else if (!isSet(store_vvvvwai))
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2017-12-14 23:10:47 +00:00
|
|
|
var store_vvvvwai = [];
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
2017-12-14 23:10:47 +00:00
|
|
|
var store = store_vvvvwai.some(store_vvvvwai_SomeFunc);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
if (isSet(datatype_vvvvwai) && datatype_vvvvwai.constructor !== Array)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2017-12-14 23:10:47 +00:00
|
|
|
var temp_vvvvwai = datatype_vvvvwai;
|
|
|
|
var datatype_vvvvwai = [];
|
|
|
|
datatype_vvvvwai.push(temp_vvvvwai);
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
2017-12-14 23:10:47 +00:00
|
|
|
else if (!isSet(datatype_vvvvwai))
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2017-12-14 23:10:47 +00:00
|
|
|
var datatype_vvvvwai = [];
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
2017-12-14 23:10:47 +00:00
|
|
|
var datatype = datatype_vvvvwai.some(datatype_vvvvwai_SomeFunc);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
// set this function logic
|
|
|
|
if (store && datatype)
|
|
|
|
{
|
|
|
|
jQuery('.note_vdm_encryption').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('.note_vdm_encryption').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// the vvvvwai Some function
|
|
|
|
function store_vvvvwai_SomeFunc(store_vvvvwai)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2017-12-14 23:10:47 +00:00
|
|
|
if (store_vvvvwai == 4)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// the vvvvwai Some function
|
|
|
|
function datatype_vvvvwai_SomeFunc(datatype_vvvvwai)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2017-12-14 23:10:47 +00:00
|
|
|
if (datatype_vvvvwai == 'CHAR' || datatype_vvvvwai == 'VARCHAR' || datatype_vvvvwai == 'TEXT' || datatype_vvvvwai == 'MEDIUMTEXT' || datatype_vvvvwai == 'LONGTEXT')
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// the vvvvwak function
|
|
|
|
function vvvvwak(add_css_view_vvvvwak)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2017-12-14 23:10:47 +00:00
|
|
|
if (add_css_view_vvvvwak == 1)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
jQuery('#jform_css_view').closest('.control-group').show();
|
2017-12-14 23:10:47 +00:00
|
|
|
if (jform_vvvvwakvzu_required)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('css_view',0);
|
|
|
|
jQuery('#jform_css_view').prop('required','required');
|
|
|
|
jQuery('#jform_css_view').attr('aria-required',true);
|
|
|
|
jQuery('#jform_css_view').addClass('required');
|
2017-12-14 23:10:47 +00:00
|
|
|
jform_vvvvwakvzu_required = false;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_css_view').closest('.control-group').hide();
|
2017-12-14 23:10:47 +00:00
|
|
|
if (!jform_vvvvwakvzu_required)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('css_view',1);
|
|
|
|
jQuery('#jform_css_view').removeAttr('required');
|
|
|
|
jQuery('#jform_css_view').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_css_view').removeClass('required');
|
2017-12-14 23:10:47 +00:00
|
|
|
jform_vvvvwakvzu_required = true;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// the vvvvwal function
|
|
|
|
function vvvvwal(add_css_views_vvvvwal)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2017-12-14 23:10:47 +00:00
|
|
|
if (add_css_views_vvvvwal == 1)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
jQuery('#jform_css_views').closest('.control-group').show();
|
2017-12-14 23:10:47 +00:00
|
|
|
if (jform_vvvvwalvzv_required)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('css_views',0);
|
|
|
|
jQuery('#jform_css_views').prop('required','required');
|
|
|
|
jQuery('#jform_css_views').attr('aria-required',true);
|
|
|
|
jQuery('#jform_css_views').addClass('required');
|
2017-12-14 23:10:47 +00:00
|
|
|
jform_vvvvwalvzv_required = false;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_css_views').closest('.control-group').hide();
|
2017-12-14 23:10:47 +00:00
|
|
|
if (!jform_vvvvwalvzv_required)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('css_views',1);
|
|
|
|
jQuery('#jform_css_views').removeAttr('required');
|
|
|
|
jQuery('#jform_css_views').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_css_views').removeClass('required');
|
2017-12-14 23:10:47 +00:00
|
|
|
jform_vvvvwalvzv_required = true;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// the vvvvwam function
|
|
|
|
function vvvvwam(add_javascript_view_footer_vvvvwam)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2017-12-14 23:10:47 +00:00
|
|
|
if (add_javascript_view_footer_vvvvwam == 1)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
jQuery('#jform_javascript_view_footer').closest('.control-group').show();
|
2017-12-14 23:10:47 +00:00
|
|
|
if (jform_vvvvwamvzw_required)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('javascript_view_footer',0);
|
|
|
|
jQuery('#jform_javascript_view_footer').prop('required','required');
|
|
|
|
jQuery('#jform_javascript_view_footer').attr('aria-required',true);
|
|
|
|
jQuery('#jform_javascript_view_footer').addClass('required');
|
2017-12-14 23:10:47 +00:00
|
|
|
jform_vvvvwamvzw_required = false;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_javascript_view_footer').closest('.control-group').hide();
|
2017-12-14 23:10:47 +00:00
|
|
|
if (!jform_vvvvwamvzw_required)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('javascript_view_footer',1);
|
|
|
|
jQuery('#jform_javascript_view_footer').removeAttr('required');
|
|
|
|
jQuery('#jform_javascript_view_footer').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_javascript_view_footer').removeClass('required');
|
2017-12-14 23:10:47 +00:00
|
|
|
jform_vvvvwamvzw_required = true;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// the vvvvwan function
|
|
|
|
function vvvvwan(add_javascript_views_footer_vvvvwan)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2017-12-14 23:10:47 +00:00
|
|
|
if (add_javascript_views_footer_vvvvwan == 1)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
jQuery('#jform_javascript_views_footer').closest('.control-group').show();
|
2017-12-14 23:10:47 +00:00
|
|
|
if (jform_vvvvwanvzx_required)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('javascript_views_footer',0);
|
|
|
|
jQuery('#jform_javascript_views_footer').prop('required','required');
|
|
|
|
jQuery('#jform_javascript_views_footer').attr('aria-required',true);
|
|
|
|
jQuery('#jform_javascript_views_footer').addClass('required');
|
2017-12-14 23:10:47 +00:00
|
|
|
jform_vvvvwanvzx_required = false;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_javascript_views_footer').closest('.control-group').hide();
|
2017-12-14 23:10:47 +00:00
|
|
|
if (!jform_vvvvwanvzx_required)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('javascript_views_footer',1);
|
|
|
|
jQuery('#jform_javascript_views_footer').removeAttr('required');
|
|
|
|
jQuery('#jform_javascript_views_footer').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_javascript_views_footer').removeClass('required');
|
2017-12-14 23:10:47 +00:00
|
|
|
jform_vvvvwanvzx_required = true;
|
2016-01-30 20:28:43 +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;
|
|
|
|
}
|
|
|
|
|
|
|
|
function getFieldOptions_server(fieldId){
|
|
|
|
var getUrl = "index.php?option=com_componentbuilder&task=ajax.fieldOptions&format=json";
|
|
|
|
if(token.length > 0 && fieldId > 0){
|
|
|
|
var request = 'token='+token+'&id='+fieldId;
|
|
|
|
}
|
|
|
|
return jQuery.ajax({
|
|
|
|
type: 'GET',
|
|
|
|
url: getUrl,
|
|
|
|
dataType: 'jsonp',
|
|
|
|
data: request,
|
|
|
|
jsonp: 'callback'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function getFieldOptions(id,setValue){
|
|
|
|
getFieldOptions_server(id).done(function(result) {
|
|
|
|
if(result.values){
|
|
|
|
if(setValue){
|
|
|
|
jQuery('textarea#jform_xml').val(result.values);
|
|
|
|
}
|
|
|
|
jQuery('#help').remove();
|
|
|
|
jQuery('.helpNote').append('<div id="help" style="margin: 10px;">'+result.description+'<br />'+result.values_description+'</div>');
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|