- Navigation header array structure now is the same as the structure of the navigation menu array

- Implemented the sort logic and added the "sort" attribute to sort menu and header entries for the NavigationWidget
- Added the private method _sortArray to the NavigationLib to sort menu and header entries
- Added the "target" attribute to be used with the attribute "link" to build the link of a menu or header entry
- Now the header menu supports icons on the left side of the entry description
This commit is contained in:
Paolo
2018-06-20 18:12:38 +02:00
parent 3542ff539f
commit b65521199d
5 changed files with 126 additions and 26 deletions
+18 -2
View File
@@ -31,7 +31,20 @@ var FHC_NavigationWidget = {
if (FHC_AjaxClient.hasData(data))
{
jQuery.each(FHC_AjaxClient.getData(data), function(i, e) {
$(".menu-header-items").append('<a class="navbar-brand" href="' + e + '">' + i + '</a>');
var headerEntry = '';
if (e['icon'] != 'undefined' && e['icon'] != '')
{
headerEntry += '<i class="navbar-brand-icon fa fa-' + e['icon'] + ' fa-fw"></i>';
}
var target = '';
if (e['target'] != null) target = e['target'];
headerEntry += '<a class="navbar-brand" href="' + e['link'] + '" target=' + target + '>' + e['description'] + '</a>';
$(".menu-header-items").append(headerEntry);
});
}
}
@@ -116,7 +129,10 @@ var FHC_NavigationWidget = {
strMenu += '<span>';
}
strMenu += '<a href="' + item['link'] + '"' + expanded + '>';
var target = '';
if (item['target'] != null) target = item['target'];
strMenu += '<a href="' + item['link'] + '"' + expanded + ' target="' + target + '">';
if (item['icon'] != 'undefined')
{