mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 09:52:22 +00:00
- 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:
@@ -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')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user