Added Wiki to JCB. Resolved gh-125 to insure phone numbers are treated as strings. Resolved gh-128 by adding field to Joomla Component View that allows javascript to be added globaly. Converted a few more repeatable fields to subform fields, this is an ongoing project to remove repeatable fields from JCB.
This commit is contained in:
@ -9,8 +9,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 77 of this MVC
|
||||
@build 30th May, 2017
|
||||
@version @update number 81 of this MVC
|
||||
@build 27th September, 2017
|
||||
@created 18th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage layout.js
|
||||
@ -23,42 +23,42 @@
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Some Global Values
|
||||
jform_vvvvvysvyw_required = false;
|
||||
jform_vvvvvytvyx_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
var add_php_view_vvvvvys = jQuery("#jform_add_php_view input[type='radio']:checked").val();
|
||||
vvvvvys(add_php_view_vvvvvys);
|
||||
var add_php_view_vvvvvyt = jQuery("#jform_add_php_view input[type='radio']:checked").val();
|
||||
vvvvvyt(add_php_view_vvvvvyt);
|
||||
});
|
||||
|
||||
// the vvvvvys function
|
||||
function vvvvvys(add_php_view_vvvvvys)
|
||||
// the vvvvvyt function
|
||||
function vvvvvyt(add_php_view_vvvvvyt)
|
||||
{
|
||||
// set the function logic
|
||||
if (add_php_view_vvvvvys == 1)
|
||||
if (add_php_view_vvvvvyt == 1)
|
||||
{
|
||||
jQuery('#jform_php_view').closest('.control-group').show();
|
||||
if (jform_vvvvvysvyw_required)
|
||||
if (jform_vvvvvytvyx_required)
|
||||
{
|
||||
updateFieldRequired('php_view',0);
|
||||
jQuery('#jform_php_view').prop('required','required');
|
||||
jQuery('#jform_php_view').attr('aria-required',true);
|
||||
jQuery('#jform_php_view').addClass('required');
|
||||
jform_vvvvvysvyw_required = false;
|
||||
jform_vvvvvytvyx_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_php_view').closest('.control-group').hide();
|
||||
if (!jform_vvvvvysvyw_required)
|
||||
if (!jform_vvvvvytvyx_required)
|
||||
{
|
||||
updateFieldRequired('php_view',1);
|
||||
jQuery('#jform_php_view').removeAttr('required');
|
||||
jQuery('#jform_php_view').removeAttr('aria-required');
|
||||
jQuery('#jform_php_view').removeClass('required');
|
||||
jform_vvvvvysvyw_required = true;
|
||||
jform_vvvvvytvyx_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -99,6 +99,7 @@ function isSet(val)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function getSnippetDetails_server(snippetId){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.snippetDetails&format=json";
|
||||
if(token.length > 0 && snippetId > 0){
|
||||
@ -143,10 +144,10 @@ function getSnippetDetails(id){
|
||||
jQuery('.snippet-usage').append(usage);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function getDynamicValues_server(dynamicId){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.dynamicValues&format=json";
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getDynamicValues&format=json";
|
||||
if(token.length > 0 && dynamicId > 0){
|
||||
var request = 'token='+token+'&view=layout&id='+dynamicId;
|
||||
}
|
||||
@ -170,10 +171,10 @@ function getDynamicValues(id){
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function getLayoutDetails_server(id){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.layoutDetails&format=json";
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json";
|
||||
if(token.length > 0 && id > 0){
|
||||
var request = 'token='+token+'&id='+id;
|
||||
}
|
||||
@ -196,30 +197,4 @@ function getLayoutDetails(id){
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function getDynamicFormDetails_server(id){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.dynamicFormDetails&format=json";
|
||||
if(token.length > 0 && id > 0){
|
||||
var request = 'token='+token+'&id='+id;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
});
|
||||
}
|
||||
|
||||
function getDynamicFormDetails(id){
|
||||
getDynamicFormDetails_server(id).done(function(result) {
|
||||
if(result){
|
||||
jQuery('#details').append(result);
|
||||
// make sure the code bocks are active
|
||||
jQuery("code").click(function() {
|
||||
jQuery(this).selText().addClass("selected");
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user