diff --git a/app/assets/javascripts/app/controllers/_default_navbar.js.coffee b/app/assets/javascripts/app/controllers/_default_navbar.js.coffee index 317f4e168..1f0d1d39d 100644 --- a/app/assets/javascripts/app/controllers/_default_navbar.js.coffee +++ b/app/assets/javascripts/app/controllers/_default_navbar.js.coffee @@ -1,13 +1,16 @@ App.Config.set( 'User', { - prio: 10000, + prio: 1000, parent: '', callback: -> item = {} item['name'] = App.Session.get( 'login' ) return item target: '#current_user', + class: 'user' role: [ 'Agent', 'Customer' ] }, 'NavBarRight' ) -App.Config.set( 'Admin', { prio: 10000, parent: '', name: 'Admin', target: '#manage', role: ['Admin'] }, 'NavBar' ) +App.Config.set( 'Admin', { prio: 9000, parent: '', name: 'Admin', target: '#manage', role: ['Admin'] }, 'NavBarRight' ) +App.Config.set( 'New', { prio: 20000, parent: '', name: 'New', target: '#new', class: 'add' }, 'NavBarRight' ) + App.Config.set( 'Misc', { prio: 90000, parent: '', name: 'Tools', target: '#tools', child: true }, 'NavBar' ) diff --git a/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee b/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee index 27e59a410..5884b1c93 100644 --- a/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee +++ b/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee @@ -410,7 +410,7 @@ App.Config.set( 'ticket/create/:type/:ticket_id/:article_id', Router, 'Routes' ) App.Config.set( 'ticket/create/:type/id/:id/:ticket_id/:article_id', Router, 'Routes' ) # set new task actions -App.Config.set( 'TicketNewCallOutbound', { prio: 8001, name: 'Call Outbound', target: '#ticket/create/call_outbound', role: ['Agent'] }, 'TaskActions' ) -App.Config.set( 'TicketNewCallInbound', { prio: 8002, name: 'Call Inbound', target: '#ticket/create/call_inbound', role: ['Agent'] }, 'TaskActions' ) -App.Config.set( 'TicketNewEmail', { prio: 8003, name: 'Email', target: '#ticket/create/email', role: ['Agent'] }, 'TaskActions' ) +App.Config.set( 'TicketNewCallOutbound', { prio: 8001, parent: '#new', name: 'Call Outbound', target: '#ticket/create/call_outbound', role: ['Agent'] }, 'NavBarRight' ) +App.Config.set( 'TicketNewCallInbound', { prio: 8002, parent: '#new', name: 'Call Inbound', target: '#ticket/create/call_inbound', role: ['Agent'] }, 'NavBarRight' ) +App.Config.set( 'TicketNewEmail', { prio: 8003, parent: '#new', name: 'Email', target: '#ticket/create/email', role: ['Agent'] }, 'NavBarRight' ) diff --git a/app/assets/javascripts/app/controllers/logout.js.coffee b/app/assets/javascripts/app/controllers/logout.js.coffee index 53d76fd7f..5a87302f0 100644 --- a/app/assets/javascripts/app/controllers/logout.js.coffee +++ b/app/assets/javascripts/app/controllers/logout.js.coffee @@ -12,10 +12,10 @@ class Index extends App.ControllerContent @Session.init() App.Event.trigger( 'ui:rerender' ) - # redirect to login + # redirect to login redirect = => @navigate 'login' @delay redirect, 150 App.Config.set( 'logout', Index, 'Routes' ) -App.Config.set( 'Logout', { prio: 1800, parent: '#current_user', name: 'Sign out', target: '#logout', divider: true, role: [ 'Agent', 'Customer' ] }, 'NavBarRight' ) +App.Config.set( 'Logout', { prio: 1800, parent: '#current_user', name: 'Sign out', target: '#logout', divider: true, iconClass: 'signout', role: [ 'Agent', 'Customer' ] }, 'NavBarRight' ) diff --git a/app/assets/javascripts/app/controllers/navigation.js.coffee b/app/assets/javascripts/app/controllers/navigation.js.coffee index 3b8ff03ce..1303416e1 100644 --- a/app/assets/javascripts/app/controllers/navigation.js.coffee +++ b/app/assets/javascripts/app/controllers/navigation.js.coffee @@ -204,16 +204,13 @@ class App.Navigation extends App.Controller # start search @el.find('#global-search').bind( 'keyup', (e) => @term = @el.find('#global-search').val() - + return if !@term return if @term is search @delay( searchFunction, 220, 'search' ) ) - - if !@taskBar - @taskBar = true - new App.TaskbarWidget( el: @el.find('.tasks') ) + @taskbar = new App.TaskbarWidget( el: @el.find('.tasks') ) getItems: (data) -> navbar = _.values(data.navbar) diff --git a/app/assets/javascripts/app/views/navigation.jst.eco b/app/assets/javascripts/app/views/navigation.jst.eco index 6281dcf2c..b2231d124 100644 --- a/app/assets/javascripts/app/views/navigation.jst.eco +++ b/app/assets/javascripts/app/views/navigation.jst.eco @@ -30,7 +30,9 @@