2016-01-30 20:28:43 +00:00
|
|
|
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
|
|
|
__ __ _ _____ _ _ __ __ _ _ _
|
|
|
|
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
|
|
|
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
|
|
|
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
|
|
|
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
|
|
|
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
|
|
|
| |
|
|
|
|
|_|
|
|
|
|
/-------------------------------------------------------------------------------------------------------------------------------/
|
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
@version 2.2.4
|
|
|
|
@build 25th November, 2016
|
2016-01-30 20:28:43 +00:00
|
|
|
@created 30th April, 2015
|
|
|
|
@package Component Builder
|
|
|
|
@subpackage field.js
|
2016-10-23 22:48:26 +00:00
|
|
|
@author Llewellyn van der Merwe <https://www.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
|
2016-11-22 05:48:55 +00:00
|
|
|
jform_vvvvvznvzf_required = false;
|
|
|
|
jform_vvvvvzovzg_required = false;
|
2016-11-22 17:08:17 +00:00
|
|
|
jform_vvvvvzpvzh_required = false;
|
2016-11-25 02:56:16 +00:00
|
|
|
jform_vvvvvzqvzi_required = false;
|
2016-11-22 05:48:55 +00:00
|
|
|
jform_vvvvvztvzj_required = false;
|
|
|
|
jform_vvvvvzuvzk_required = false;
|
2016-11-22 17:08:17 +00:00
|
|
|
jform_vvvvvzvvzl_required = false;
|
2016-11-25 02:56:16 +00:00
|
|
|
jform_vvvvvzwvzm_required = false;
|
2016-01-30 20:28:43 +00:00
|
|
|
|
|
|
|
// Initial Script
|
|
|
|
jQuery(document).ready(function()
|
|
|
|
{
|
2016-11-25 02:56:16 +00:00
|
|
|
var datalenght_vvvvvzn = jQuery("#jform_datalenght").val();
|
|
|
|
vvvvvzn(datalenght_vvvvvzn);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
var datadefault_vvvvvzo = jQuery("#jform_datadefault").val();
|
|
|
|
vvvvvzo(datadefault_vvvvvzo);
|
2016-09-11 15:27:04 +00:00
|
|
|
|
2016-11-22 05:48:55 +00:00
|
|
|
var datatype_vvvvvzp = jQuery("#jform_datatype").val();
|
2016-11-22 17:08:17 +00:00
|
|
|
vvvvvzp(datatype_vvvvvzp);
|
|
|
|
|
|
|
|
var datatype_vvvvvzq = jQuery("#jform_datatype").val();
|
2016-11-25 02:56:16 +00:00
|
|
|
vvvvvzq(datatype_vvvvvzq);
|
|
|
|
|
|
|
|
var store_vvvvvzr = jQuery("#jform_store").val();
|
|
|
|
var datatype_vvvvvzr = jQuery("#jform_datatype").val();
|
|
|
|
vvvvvzr(store_vvvvvzr,datatype_vvvvvzr);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
var add_css_view_vvvvvzt = jQuery("#jform_add_css_view input[type='radio']:checked").val();
|
|
|
|
vvvvvzt(add_css_view_vvvvvzt);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
var add_css_views_vvvvvzu = jQuery("#jform_add_css_views input[type='radio']:checked").val();
|
|
|
|
vvvvvzu(add_css_views_vvvvvzu);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
var add_javascript_view_footer_vvvvvzv = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val();
|
|
|
|
vvvvvzv(add_javascript_view_footer_vvvvvzv);
|
2016-09-03 21:44:47 +00:00
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
var add_javascript_views_footer_vvvvvzw = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val();
|
|
|
|
vvvvvzw(add_javascript_views_footer_vvvvvzw);
|
2016-01-30 20:28:43 +00:00
|
|
|
});
|
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
// the vvvvvzn function
|
|
|
|
function vvvvvzn(datalenght_vvvvvzn)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2016-11-25 02:56:16 +00:00
|
|
|
if (isSet(datalenght_vvvvvzn) && datalenght_vvvvvzn.constructor !== Array)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2016-11-25 02:56:16 +00:00
|
|
|
var temp_vvvvvzn = datalenght_vvvvvzn;
|
|
|
|
var datalenght_vvvvvzn = [];
|
|
|
|
datalenght_vvvvvzn.push(temp_vvvvvzn);
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
2016-11-25 02:56:16 +00:00
|
|
|
else if (!isSet(datalenght_vvvvvzn))
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2016-11-25 02:56:16 +00:00
|
|
|
var datalenght_vvvvvzn = [];
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
2016-11-25 02:56:16 +00:00
|
|
|
var datalenght = datalenght_vvvvvzn.some(datalenght_vvvvvzn_SomeFunc);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
// set this function logic
|
|
|
|
if (datalenght)
|
|
|
|
{
|
|
|
|
jQuery('#jform_datalenght_other').closest('.control-group').show();
|
2016-11-25 02:56:16 +00:00
|
|
|
if (jform_vvvvvznvzf_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');
|
2016-11-25 02:56:16 +00:00
|
|
|
jform_vvvvvznvzf_required = false;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_datalenght_other').closest('.control-group').hide();
|
2016-11-25 02:56:16 +00:00
|
|
|
if (!jform_vvvvvznvzf_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');
|
2016-11-25 02:56:16 +00:00
|
|
|
jform_vvvvvznvzf_required = true;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
// the vvvvvzn Some function
|
|
|
|
function datalenght_vvvvvzn_SomeFunc(datalenght_vvvvvzn)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2016-11-25 02:56:16 +00:00
|
|
|
if (datalenght_vvvvvzn == 'Other')
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
// the vvvvvzo function
|
|
|
|
function vvvvvzo(datadefault_vvvvvzo)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2016-11-25 02:56:16 +00:00
|
|
|
if (isSet(datadefault_vvvvvzo) && datadefault_vvvvvzo.constructor !== Array)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2016-11-25 02:56:16 +00:00
|
|
|
var temp_vvvvvzo = datadefault_vvvvvzo;
|
|
|
|
var datadefault_vvvvvzo = [];
|
|
|
|
datadefault_vvvvvzo.push(temp_vvvvvzo);
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
2016-11-25 02:56:16 +00:00
|
|
|
else if (!isSet(datadefault_vvvvvzo))
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2016-11-25 02:56:16 +00:00
|
|
|
var datadefault_vvvvvzo = [];
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
2016-11-25 02:56:16 +00:00
|
|
|
var datadefault = datadefault_vvvvvzo.some(datadefault_vvvvvzo_SomeFunc);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
// set this function logic
|
|
|
|
if (datadefault)
|
|
|
|
{
|
|
|
|
jQuery('#jform_datadefault_other').closest('.control-group').show();
|
2016-11-25 02:56:16 +00:00
|
|
|
if (jform_vvvvvzovzg_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');
|
2016-11-25 02:56:16 +00:00
|
|
|
jform_vvvvvzovzg_required = false;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_datadefault_other').closest('.control-group').hide();
|
2016-11-25 02:56:16 +00:00
|
|
|
if (!jform_vvvvvzovzg_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');
|
2016-11-25 02:56:16 +00:00
|
|
|
jform_vvvvvzovzg_required = true;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
// the vvvvvzo Some function
|
|
|
|
function datadefault_vvvvvzo_SomeFunc(datadefault_vvvvvzo)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2016-11-25 02:56:16 +00:00
|
|
|
if (datadefault_vvvvvzo == 'Other')
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
// the vvvvvzp function
|
|
|
|
function vvvvvzp(datatype_vvvvvzp)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2016-11-25 02:56:16 +00:00
|
|
|
if (isSet(datatype_vvvvvzp) && datatype_vvvvvzp.constructor !== Array)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2016-11-25 02:56:16 +00:00
|
|
|
var temp_vvvvvzp = datatype_vvvvvzp;
|
|
|
|
var datatype_vvvvvzp = [];
|
|
|
|
datatype_vvvvvzp.push(temp_vvvvvzp);
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
2016-11-25 02:56:16 +00:00
|
|
|
else if (!isSet(datatype_vvvvvzp))
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2016-11-25 02:56:16 +00:00
|
|
|
var datatype_vvvvvzp = [];
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
2016-11-25 02:56:16 +00:00
|
|
|
var datatype = datatype_vvvvvzp.some(datatype_vvvvvzp_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();
|
2016-11-25 02:56:16 +00:00
|
|
|
if (jform_vvvvvzpvzh_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');
|
2016-11-25 02:56:16 +00:00
|
|
|
jform_vvvvvzpvzh_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();
|
2016-11-25 02:56:16 +00:00
|
|
|
if (!jform_vvvvvzpvzh_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');
|
2016-11-25 02:56:16 +00:00
|
|
|
jform_vvvvvzpvzh_required = true;
|
2016-09-03 21:44:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
// the vvvvvzp Some function
|
|
|
|
function datatype_vvvvvzp_SomeFunc(datatype_vvvvvzp)
|
2016-09-03 21:44:47 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2016-11-25 02:56:16 +00:00
|
|
|
if (datatype_vvvvvzp == 'CHAR' || datatype_vvvvvzp == 'VARCHAR' || datatype_vvvvvzp == 'DATETIME' || datatype_vvvvvzp == 'DATE' || datatype_vvvvvzp == 'TIME' || datatype_vvvvvzp == 'INT' || datatype_vvvvvzp == 'TINYINT' || datatype_vvvvvzp == 'BIGINT' || datatype_vvvvvzp == 'FLOAT' || datatype_vvvvvzp == 'DECIMAL' || datatype_vvvvvzp == 'DOUBLE')
|
2016-09-03 21:44:47 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
// the vvvvvzq function
|
|
|
|
function vvvvvzq(datatype_vvvvvzq)
|
2016-09-03 21:44:47 +00:00
|
|
|
{
|
2016-11-25 02:56:16 +00:00
|
|
|
if (isSet(datatype_vvvvvzq) && datatype_vvvvvzq.constructor !== Array)
|
2016-09-03 21:44:47 +00:00
|
|
|
{
|
2016-11-25 02:56:16 +00:00
|
|
|
var temp_vvvvvzq = datatype_vvvvvzq;
|
|
|
|
var datatype_vvvvvzq = [];
|
|
|
|
datatype_vvvvvzq.push(temp_vvvvvzq);
|
2016-09-03 21:44:47 +00:00
|
|
|
}
|
2016-11-25 02:56:16 +00:00
|
|
|
else if (!isSet(datatype_vvvvvzq))
|
2016-09-03 21:44:47 +00:00
|
|
|
{
|
2016-11-25 02:56:16 +00:00
|
|
|
var datatype_vvvvvzq = [];
|
2016-09-03 21:44:47 +00:00
|
|
|
}
|
2016-11-25 02:56:16 +00:00
|
|
|
var datatype = datatype_vvvvvzq.some(datatype_vvvvvzq_SomeFunc);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
// set this function logic
|
|
|
|
if (datatype)
|
|
|
|
{
|
|
|
|
jQuery('#jform_store').closest('.control-group').show();
|
2016-11-25 02:56:16 +00:00
|
|
|
if (jform_vvvvvzqvzi_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');
|
2016-11-25 02:56:16 +00:00
|
|
|
jform_vvvvvzqvzi_required = false;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_store').closest('.control-group').hide();
|
2016-11-25 02:56:16 +00:00
|
|
|
if (!jform_vvvvvzqvzi_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');
|
2016-11-25 02:56:16 +00:00
|
|
|
jform_vvvvvzqvzi_required = true;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
// the vvvvvzq Some function
|
|
|
|
function datatype_vvvvvzq_SomeFunc(datatype_vvvvvzq)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2016-11-25 02:56:16 +00:00
|
|
|
if (datatype_vvvvvzq == 'CHAR' || datatype_vvvvvzq == 'VARCHAR' || datatype_vvvvvzq == 'TEXT' || datatype_vvvvvzq == 'MEDIUMTEXT' || datatype_vvvvvzq == 'LONGTEXT')
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
// the vvvvvzr function
|
|
|
|
function vvvvvzr(store_vvvvvzr,datatype_vvvvvzr)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2016-11-25 02:56:16 +00:00
|
|
|
if (isSet(store_vvvvvzr) && store_vvvvvzr.constructor !== Array)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2016-11-25 02:56:16 +00:00
|
|
|
var temp_vvvvvzr = store_vvvvvzr;
|
|
|
|
var store_vvvvvzr = [];
|
|
|
|
store_vvvvvzr.push(temp_vvvvvzr);
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
2016-11-25 02:56:16 +00:00
|
|
|
else if (!isSet(store_vvvvvzr))
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2016-11-25 02:56:16 +00:00
|
|
|
var store_vvvvvzr = [];
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
2016-11-25 02:56:16 +00:00
|
|
|
var store = store_vvvvvzr.some(store_vvvvvzr_SomeFunc);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
if (isSet(datatype_vvvvvzr) && datatype_vvvvvzr.constructor !== Array)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2016-11-25 02:56:16 +00:00
|
|
|
var temp_vvvvvzr = datatype_vvvvvzr;
|
|
|
|
var datatype_vvvvvzr = [];
|
|
|
|
datatype_vvvvvzr.push(temp_vvvvvzr);
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
2016-11-25 02:56:16 +00:00
|
|
|
else if (!isSet(datatype_vvvvvzr))
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2016-11-25 02:56:16 +00:00
|
|
|
var datatype_vvvvvzr = [];
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
2016-11-25 02:56:16 +00:00
|
|
|
var datatype = datatype_vvvvvzr.some(datatype_vvvvvzr_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();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
// the vvvvvzr Some function
|
|
|
|
function store_vvvvvzr_SomeFunc(store_vvvvvzr)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2016-11-25 02:56:16 +00:00
|
|
|
if (store_vvvvvzr == 4)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
// the vvvvvzr Some function
|
|
|
|
function datatype_vvvvvzr_SomeFunc(datatype_vvvvvzr)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2016-11-25 02:56:16 +00:00
|
|
|
if (datatype_vvvvvzr == 'CHAR' || datatype_vvvvvzr == 'VARCHAR' || datatype_vvvvvzr == 'TEXT' || datatype_vvvvvzr == 'MEDIUMTEXT' || datatype_vvvvvzr == 'LONGTEXT')
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
// the vvvvvzt function
|
|
|
|
function vvvvvzt(add_css_view_vvvvvzt)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2016-11-25 02:56:16 +00:00
|
|
|
if (add_css_view_vvvvvzt == 1)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
jQuery('#jform_css_view').closest('.control-group').show();
|
2016-11-25 02:56:16 +00:00
|
|
|
if (jform_vvvvvztvzj_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');
|
2016-11-25 02:56:16 +00:00
|
|
|
jform_vvvvvztvzj_required = false;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_css_view').closest('.control-group').hide();
|
2016-11-25 02:56:16 +00:00
|
|
|
if (!jform_vvvvvztvzj_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');
|
2016-11-25 02:56:16 +00:00
|
|
|
jform_vvvvvztvzj_required = true;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
// the vvvvvzu function
|
|
|
|
function vvvvvzu(add_css_views_vvvvvzu)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2016-11-25 02:56:16 +00:00
|
|
|
if (add_css_views_vvvvvzu == 1)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
jQuery('#jform_css_views').closest('.control-group').show();
|
2016-11-25 02:56:16 +00:00
|
|
|
if (jform_vvvvvzuvzk_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');
|
2016-11-25 02:56:16 +00:00
|
|
|
jform_vvvvvzuvzk_required = false;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_css_views').closest('.control-group').hide();
|
2016-11-25 02:56:16 +00:00
|
|
|
if (!jform_vvvvvzuvzk_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');
|
2016-11-25 02:56:16 +00:00
|
|
|
jform_vvvvvzuvzk_required = true;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
// the vvvvvzv function
|
|
|
|
function vvvvvzv(add_javascript_view_footer_vvvvvzv)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2016-11-25 02:56:16 +00:00
|
|
|
if (add_javascript_view_footer_vvvvvzv == 1)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
jQuery('#jform_javascript_view_footer').closest('.control-group').show();
|
2016-11-25 02:56:16 +00:00
|
|
|
if (jform_vvvvvzvvzl_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');
|
2016-11-25 02:56:16 +00:00
|
|
|
jform_vvvvvzvvzl_required = false;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_javascript_view_footer').closest('.control-group').hide();
|
2016-11-25 02:56:16 +00:00
|
|
|
if (!jform_vvvvvzvvzl_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');
|
2016-11-25 02:56:16 +00:00
|
|
|
jform_vvvvvzvvzl_required = true;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
// the vvvvvzw function
|
|
|
|
function vvvvvzw(add_javascript_views_footer_vvvvvzw)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2016-11-25 02:56:16 +00:00
|
|
|
if (add_javascript_views_footer_vvvvvzw == 1)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
jQuery('#jform_javascript_views_footer').closest('.control-group').show();
|
2016-11-25 02:56:16 +00:00
|
|
|
if (jform_vvvvvzwvzm_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');
|
2016-11-25 02:56:16 +00:00
|
|
|
jform_vvvvvzwvzm_required = false;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_javascript_views_footer').closest('.control-group').hide();
|
2016-11-25 02:56:16 +00:00
|
|
|
if (!jform_vvvvvzwvzm_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');
|
2016-11-25 02:56:16 +00:00
|
|
|
jform_vvvvvzwvzm_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>');
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|