Resolved gh-341 that adds the feature to expand the custom field option far beyond the default. Moved the menu prefix option in to the Joomla component area -> tab -> Settings to allow each component to override the global setting.

This commit is contained in:
2018-09-24 16:37:51 +02:00
parent e71ba204ca
commit 6ad253be44
57 changed files with 1324 additions and 813 deletions

View File

@ -13358,17 +13358,37 @@ class Interpretation extends Fields
$lang = $this->langPrefix . '_MENU';
// set the code name
$codeName = ComponentbuilderHelper::safeString($this->componentData->name_code);
// set main menu name to lang
$addPrefix = $this->params->get('add_menu_prefix', 1);
// default prefix is none
$prefix = '';
// check if local is set
if (isset($this->componentData->add_menu_prefix) && is_numeric($this->componentData->add_menu_prefix))
{
// set main menu prefix switch
$addPrefix = $this->componentData->add_menu_prefix;
if ($addPrefix == 1 && isset($this->componentData->menu_prefix) && ComponentbuilderHelper::checkString($this->componentData->menu_prefix))
{
$prefix = trim($this->componentData->menu_prefix) . ' ';
}
}
else
{
// set main menu prefix switch
$addPrefix = $this->params->get('add_menu_prefix', 1);
if ($addPrefix == 1)
{
$prefix = trim($this->params->get('menu_prefix', '»')) . ' ';
}
}
// add the prefix
if ($addPrefix == 1)
{
$prefix = trim($this->params->get('menu_prefix', '»'));
$this->langContent['adminsys'][$lang] = $prefix . ' ' . $this->componentData->name;
$this->langContent['adminsys'][$lang] = $prefix . $this->componentData->name;
}
else
{
$this->langContent['adminsys'][$lang] = $this->componentData->name;
}
// loop over the admin views
foreach ($this->componentData->admin_views as $view)
{
// set custom menu
@ -15401,7 +15421,7 @@ function vdm_dkim() {
foreach ($field['permission'] as $permission_id)
{
// set the permission key word
$permission_option = $permission_options[$permission_id];
$permission_option = $permission_options[ (int) $permission_id];
// reset the bucket
$fieldView = array();
// set the permission for this field