Improved the fields builder area in the new assistant area.

This commit is contained in:
2020-01-11 18:29:54 +02:00
parent cf94654c61
commit 5fa49f1bca
15 changed files with 949 additions and 482 deletions

View File

@ -2933,12 +2933,12 @@ class ComponentbuilderModelAjax extends JModelList
'display' => 'COM_COMPONENTBUILDER_DISPLAY_SWITCH_FOR_DYNAMIC_PLACEMENT_IN_RELATION_TO_THE_USE_OF_THE_FIELD_IN_MENU_AND_GLOBAL_CONFIGURATION_OPTIONS_SO_THE_CONFIG_OPTION_WILL_ONLY_ADD_THE_FIELD_TO_THE_GLOBAL_CONFIGURATION_AREA_MENU_WILL_ADD_THE_FIELD_ONLY_TO_THE_MENU_AREA',
'validate' => 'COM_COMPONENTBUILDER_TO_ADD_VALIDATION_TO_A_FIELD_IF_VALIDATION_IS_NOT_PART_OF_FIELD_TYPE_PROPERTIES_LOADED_ABOVE_SO_IF_YOU_HAVE_VALIDATION_SET_AS_A_FIELD_PROPERTY_THIS_EXTRA_PROPERTY_WILL_NOT_BE_NEEDED');
public function getFieldOptions($fieldtype)
public function getFieldTypeProperties($fieldtype)
{
// get the xml
$xml = $this->getFieldXML($fieldtype);
// now get the field options
if ($field = ComponentbuilderHelper::getFieldOptions($fieldtype, 'id', null, $xml, true))
if ($field = ComponentbuilderHelper::getFieldTypeProperties($fieldtype, 'id', null, $xml, true))
{
// get subform field properties object
$properties = $this->buildFieldOptionsSubform($field['subform'], $field['nameListOptions']);

View File

@ -788,7 +788,7 @@ jQuery(document).ready(function()
{
// get type value
var fieldtype = jQuery("#jform_fieldtype option:selected").val();
getFieldOptions(fieldtype, false);
getFieldTypeProperties(fieldtype, false);
// get the linked details
getLinked();
// get the validation rules
@ -806,8 +806,8 @@ jQuery(document).ready(function()
// the options row id key
var rowIdKey = 'properties';
function getFieldOptions(fieldtype, db){
getCodeFrom_server(fieldtype, 'type', 'type', 'fieldOptions').done(function(result) {
function getFieldTypeProperties(fieldtype, db){
getCodeFrom_server(fieldtype, 'type', 'type', 'fieldTypeProperties').done(function(result) {
if(result.subform){
// load the list of properties
propertiesArray = result.nameListOptions;