Do not show empty navbar items.

This commit is contained in:
Martin Edenhofer 2013-06-01 01:51:52 +02:00
parent 886a249aee
commit 47f6252ec0
2 changed files with 4 additions and 4 deletions

View file

@ -11,4 +11,4 @@ App.Config.set( 'User', {
App.Config.set( 'Admin', { prio: 10000, parent: '', name: 'Manage', target: '#admin', role: ['Admin'] }, 'NavBar' )
App.Config.set( 'Setting', { prio: 20000, parent: '', name: 'Settings', target: '#settings', role: ['Admin'] }, 'NavBar' )
App.Config.set( 'Misc', { prio: 90000, parent: '', name: 'Tools', target: '#tools' }, 'NavBar' )
App.Config.set( 'Misc', { prio: 90000, parent: '', name: 'Tools', target: '#tools', child: true }, 'NavBar' )

View file

@ -95,7 +95,7 @@ class App.Navigation extends App.Controller
# load user collection
if data.load.users
App.Collection.load( type: 'User', data: data.load.users )
# load user collection
if data.load.organizations
for organization_id, organization of data.load.organizations
@ -255,7 +255,7 @@ class App.Navigation extends App.Controller
newlist[ item['prio'] ] = item;
# get keys for sort order
# get keys for sort order
keys = _.keys(newlist)
inorder = keys.sort(@sortit)
@ -265,7 +265,7 @@ class App.Navigation extends App.Controller
inordervalue.push newlist[ num ]
return inordervalue
sortit: (a,b) ->
sortit: (a,b) ->
return(a-b)
addPrioCount: (newlist, item) ->