From 47f6252ec01bee1c96a6520c8519ff0dda8156a2 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sat, 1 Jun 2013 01:51:52 +0200 Subject: [PATCH 1/2] Do not show empty navbar items. --- .../javascripts/app/controllers/_default_navbar.js.coffee | 2 +- app/assets/javascripts/app/controllers/navigation.js.coffee | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_default_navbar.js.coffee b/app/assets/javascripts/app/controllers/_default_navbar.js.coffee index 53f7068b2..4c80707cd 100644 --- a/app/assets/javascripts/app/controllers/_default_navbar.js.coffee +++ b/app/assets/javascripts/app/controllers/_default_navbar.js.coffee @@ -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' ) diff --git a/app/assets/javascripts/app/controllers/navigation.js.coffee b/app/assets/javascripts/app/controllers/navigation.js.coffee index 8b706a9c5..91e22ea7a 100644 --- a/app/assets/javascripts/app/controllers/navigation.js.coffee +++ b/app/assets/javascripts/app/controllers/navigation.js.coffee @@ -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) -> From 7c467de2f7812053ee313da71fd8522be66549c1 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sat, 1 Jun 2013 01:52:15 +0200 Subject: [PATCH 2/2] Added cleanup of tasks. --- test/browser/agent_ticket_actions_simple_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/browser/agent_ticket_actions_simple_test.rb b/test/browser/agent_ticket_actions_simple_test.rb index 5ce519851..28687b1f4 100644 --- a/test/browser/agent_ticket_actions_simple_test.rb +++ b/test/browser/agent_ticket_actions_simple_test.rb @@ -300,6 +300,12 @@ class AgentTicketActionSimpleTest < TestCase :value => 'test to merge', :match_result => true, }, + + # close task/cleanup + { + :execute => 'click', + :css => '#task [data-type="close"]', + }, ], }, ]