diff --git a/app/assets/javascripts/app/controllers/_application_controller.js.coffee b/app/assets/javascripts/app/controllers/_application_controller.js.coffee index 5d5014acd..92a7fc435 100644 --- a/app/assets/javascripts/app/controllers/_application_controller.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller.js.coffee @@ -71,9 +71,12 @@ class App.Controller extends Spine.Controller # release custom bindings after it got removed from dom # add @title methode to set title - title: (name) -> + title: (name, translate = false) -> # $('html head title').html( @Config.get(product_name) + ' - ' + App.i18n.translateInline(name) ) - document.title = @Config.get('product_name') + ' - ' + App.i18n.translatePlain(name) + title = name + if translate + title = App.i18n.translatePlain(name) + document.title = @Config.get('product_name') + ' - ' + title copyToClipboard: (text) -> if window.clipboardData # IE @@ -132,8 +135,8 @@ class App.Controller extends Spine.Controller position = [ 15, 30, 15, 0, -15, -30, -15, 0 ] position = position.concat( position.concat( position ) ) - element.css( 'position', 'relative' ) - shakeMe( element, position, 20 ) + element.css( 'position', 'relative' ) + shakeMe( element, position, 20 ) isRole: (name) -> roles = @Session.get( 'roles' ) diff --git a/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee b/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee index f95a058aa..7cadfe92a 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee @@ -105,7 +105,7 @@ class App.ControllerGenericIndex extends App.Controller super # set title - @title @pageData.title + @title @pageData.title, true # set nav bar @navupdate @pageData.navupdate diff --git a/app/assets/javascripts/app/controllers/_channel/chat.js.coffee b/app/assets/javascripts/app/controllers/_channel/chat.js.coffee index f6c47befe..b4289a1ba 100644 --- a/app/assets/javascripts/app/controllers/_channel/chat.js.coffee +++ b/app/assets/javascripts/app/controllers/_channel/chat.js.coffee @@ -2,6 +2,8 @@ class App.ChannelChat extends App.ControllerTabs constructor: -> super + @title 'Chat', true + @tabs = [ { name: 'Settings', @@ -10,4 +12,4 @@ class App.ChannelChat extends App.ControllerTabs }, ] - @render() + @render() diff --git a/app/assets/javascripts/app/controllers/_channel/email.js.coffee b/app/assets/javascripts/app/controllers/_channel/email.js.coffee index b2c9e7c53..e92e35e97 100644 --- a/app/assets/javascripts/app/controllers/_channel/email.js.coffee +++ b/app/assets/javascripts/app/controllers/_channel/email.js.coffee @@ -2,6 +2,8 @@ class App.ChannelEmail extends App.ControllerTabs constructor: -> super + @title 'Email', true + @tabs = [ { name: 'Inbound', diff --git a/app/assets/javascripts/app/controllers/_channel/facebook.js.coffee b/app/assets/javascripts/app/controllers/_channel/facebook.js.coffee index 4041a968a..7de3a7cda 100644 --- a/app/assets/javascripts/app/controllers/_channel/facebook.js.coffee +++ b/app/assets/javascripts/app/controllers/_channel/facebook.js.coffee @@ -2,12 +2,13 @@ class App.ChannelFacebook extends App.Controller constructor: -> super + @title 'Facebook' + # render page @render() render: -> - + @html App.view('channel/facebook')( head: 'some header' ) - diff --git a/app/assets/javascripts/app/controllers/_channel/twitter.js.coffee b/app/assets/javascripts/app/controllers/_channel/twitter.js.coffee index b26961453..91ff2f7f5 100644 --- a/app/assets/javascripts/app/controllers/_channel/twitter.js.coffee +++ b/app/assets/javascripts/app/controllers/_channel/twitter.js.coffee @@ -2,6 +2,8 @@ class App.ChannelTwitter extends App.Controller constructor: -> super + @title 'Twitter' + # render page @render() diff --git a/app/assets/javascripts/app/controllers/_channel/web.js.coffee b/app/assets/javascripts/app/controllers/_channel/web.js.coffee index b40c97ea4..f1df512c9 100644 --- a/app/assets/javascripts/app/controllers/_channel/web.js.coffee +++ b/app/assets/javascripts/app/controllers/_channel/web.js.coffee @@ -2,6 +2,8 @@ class App.ChannelWeb extends App.ControllerTabs constructor: -> super + @title 'Web', true + @tabs = [ { name: 'Settings', diff --git a/app/assets/javascripts/app/controllers/_default_navbar.js.coffee b/app/assets/javascripts/app/controllers/_default_navbar.js.coffee index 54e43a773..ae436e658 100644 --- a/app/assets/javascripts/app/controllers/_default_navbar.js.coffee +++ b/app/assets/javascripts/app/controllers/_default_navbar.js.coffee @@ -12,7 +12,7 @@ App.Config.set( 'User', { role: [ 'Agent', 'Customer' ] }, 'NavBarRight' ) -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( 'Admin', { prio: 9000, parent: '', name: 'Admin', translate: true, target: '#manage', role: ['Admin'] }, 'NavBarRight' ) +App.Config.set( 'New', { prio: 20000, parent: '', name: 'New', translate: true, target: '#new', class: 'add' }, 'NavBarRight' ) -App.Config.set( 'Misc', { prio: 90000, parent: '', name: 'Tools', target: '#tools', child: true, class: 'tools' }, 'NavBar' ) +App.Config.set( 'Misc', { prio: 90000, parent: '', name: 'Tools', translate: true, target: '#tools', child: true, class: 'tools' }, '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 817af74bf..7e2659eaa 100644 --- a/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee +++ b/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee @@ -602,4 +602,4 @@ App.Config.set( 'ticket/create/:ticket_id/:article_id', Router, 'Routes' ) App.Config.set( 'ticket/create/id/:id/:ticket_id/:article_id', Router, 'Routes' ) # set new actions -App.Config.set( 'TicketCreate', { prio: 8003, parent: '#new', name: 'New Ticket', target: '#ticket/create', role: ['Agent'], divider: true }, 'NavBarRight' ) +App.Config.set( 'TicketCreate', { prio: 8003, parent: '#new', name: 'New Ticket', translate: true, target: '#ticket/create', role: ['Agent'], divider: true }, 'NavBarRight' ) diff --git a/app/assets/javascripts/app/controllers/customer_ticket_create.js.coffee b/app/assets/javascripts/app/controllers/customer_ticket_create.js.coffee index fbcf2bd60..f12e34847 100644 --- a/app/assets/javascripts/app/controllers/customer_ticket_create.js.coffee +++ b/app/assets/javascripts/app/controllers/customer_ticket_create.js.coffee @@ -213,4 +213,4 @@ class Index extends App.ControllerContent ) App.Config.set( 'customer_ticket_new', Index, 'Routes' ) -App.Config.set( 'CustomerTicketNew', { prio: 8003, parent: '#new', name: 'New Ticket', target: '#customer_ticket_new', role: ['Customer'], divider: true }, 'NavBarRight' ) +App.Config.set( 'CustomerTicketNew', { prio: 8003, parent: '#new', name: 'New Ticket', translate: true, target: '#customer_ticket_new', role: ['Customer'], divider: true }, 'NavBarRight' ) diff --git a/app/assets/javascripts/app/controllers/layout_ref.js.coffee b/app/assets/javascripts/app/controllers/layout_ref.js.coffee index 2175801d2..06dbf0b98 100644 --- a/app/assets/javascripts/app/controllers/layout_ref.js.coffee +++ b/app/assets/javascripts/app/controllers/layout_ref.js.coffee @@ -928,4 +928,4 @@ class highlightRef extends App.ControllerContent App.Config.set( 'layout_ref/highlight', highlightRef, 'Routes' ) -App.Config.set( 'LayoutRef', { prio: 1700, parent: '#current_user', name: 'Layout Reference', target: '#layout_ref', role: [ 'Admin' ] }, 'NavBarRight' ) \ No newline at end of file +App.Config.set( 'LayoutRef', { prio: 1700, parent: '#current_user', name: 'Layout Reference', translate: true, target: '#layout_ref', role: [ 'Admin' ] }, 'NavBarRight' ) \ No newline at end of file diff --git a/app/assets/javascripts/app/controllers/logout.js.coffee b/app/assets/javascripts/app/controllers/logout.js.coffee index 5a87302f0..fcc0fd8bb 100644 --- a/app/assets/javascripts/app/controllers/logout.js.coffee +++ b/app/assets/javascripts/app/controllers/logout.js.coffee @@ -18,4 +18,4 @@ class Index extends App.ControllerContent @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, iconClass: 'signout', role: [ 'Agent', 'Customer' ] }, 'NavBarRight' ) +App.Config.set( 'Logout', { prio: 1800, parent: '#current_user', name: 'Sign out', translate: true, target: '#logout', divider: true, iconClass: 'signout', role: [ 'Agent', 'Customer' ] }, 'NavBarRight' ) diff --git a/app/assets/javascripts/app/controllers/maintenance.js.coffee b/app/assets/javascripts/app/controllers/maintenance.js.coffee index f5804b1c2..24621fff5 100644 --- a/app/assets/javascripts/app/controllers/maintenance.js.coffee +++ b/app/assets/javascripts/app/controllers/maintenance.js.coffee @@ -4,8 +4,12 @@ class Index extends App.ControllerContent constructor: -> super + # check authentication return if !@authenticate() + + @title 'Maintenance', true + @render() render: -> diff --git a/app/assets/javascripts/app/controllers/object_manager.js.coffee b/app/assets/javascripts/app/controllers/object_manager.js.coffee index 3d5f9c74f..a606130a4 100644 --- a/app/assets/javascripts/app/controllers/object_manager.js.coffee +++ b/app/assets/javascripts/app/controllers/object_manager.js.coffee @@ -5,6 +5,8 @@ class Index extends App.ControllerTabs # check authentication return if !@authenticate() + @title 'Objects', true + # get data @ajax( id: 'object_manager_attributes_list' diff --git a/app/assets/javascripts/app/controllers/package.js.coffee b/app/assets/javascripts/app/controllers/package.js.coffee index 0ffae1395..52abab74f 100644 --- a/app/assets/javascripts/app/controllers/package.js.coffee +++ b/app/assets/javascripts/app/controllers/package.js.coffee @@ -8,8 +8,8 @@ class Index extends App.ControllerContent # check authentication return if !@authenticate() - # set title - @title 'Packages' + @title 'Packages', true + @load() load: -> diff --git a/app/assets/javascripts/app/controllers/session.js.coffee b/app/assets/javascripts/app/controllers/session.js.coffee index 7f81059f5..363b24660 100644 --- a/app/assets/javascripts/app/controllers/session.js.coffee +++ b/app/assets/javascripts/app/controllers/session.js.coffee @@ -5,9 +5,12 @@ class Index extends App.ControllerContent constructor: -> super + # check authentication return if !@authenticate() + @title 'Sessions', true + @load() @interval( => diff --git a/app/assets/javascripts/app/controllers/settings.js.coffee b/app/assets/javascripts/app/controllers/settings.js.coffee index 0150a3e2e..763c3e724 100644 --- a/app/assets/javascripts/app/controllers/settings.js.coffee +++ b/app/assets/javascripts/app/controllers/settings.js.coffee @@ -4,6 +4,8 @@ class System extends App.ControllerTabs return if !@authenticate() + @title 'System', true + @tabs = [ { name: 'Base', 'target': 'base', controller: App.SettingsArea, params: { area: 'System::Base' } }, # { name: 'Language', 'target': 'language', controller: App.SettingsSystem, params: { area: 'System::Language' } }, @@ -22,6 +24,8 @@ class Security extends App.ControllerTabs return if !@authenticate() + @title 'Security', true + @tabs = [ { name: 'Base', 'target': 'base', controller: App.SettingsArea, params: { area: 'Security::Base' } }, # { name: 'Authentication', 'target': 'auth', controller: App.SettingsArea, params: { area: 'Security::Authentication' } }, @@ -38,6 +42,8 @@ class Import extends App.ControllerTabs return if !@authenticate() + @title 'Import', true + # import @tabs = [ { name: 'Base', 'target': 'base', controller: App.SettingsArea, params: { area: 'Import::Base' } }, @@ -52,6 +58,8 @@ class Ticket extends App.ControllerTabs return if !@authenticate() + @title 'Ticket', true + # ticket @tabs = [ { name: 'Base', 'target': 'base', controller: App.SettingsArea, params: { area: 'Ticket::Base' } }, diff --git a/app/assets/javascripts/app/controllers/ticket_overview.js.coffee b/app/assets/javascripts/app/controllers/ticket_overview.js.coffee index c30d59627..b7e62c5de 100644 --- a/app/assets/javascripts/app/controllers/ticket_overview.js.coffee +++ b/app/assets/javascripts/app/controllers/ticket_overview.js.coffee @@ -775,7 +775,7 @@ class Navbar extends App.Controller for item in @cache if item.link is @view meta.title = item.name - @title meta.title + @title meta.title, true render: => #console.log('RENDER NAV') diff --git a/app/assets/javascripts/app/controllers/translation.js.coffee b/app/assets/javascripts/app/controllers/translation.js.coffee index 541045dd6..98e08f95e 100644 --- a/app/assets/javascripts/app/controllers/translation.js.coffee +++ b/app/assets/javascripts/app/controllers/translation.js.coffee @@ -5,7 +5,7 @@ class Index extends App.ControllerContent # check authentication return if !@authenticate() - @title 'Translations' + @title 'Translations', true @render() diff --git a/app/assets/javascripts/app/controllers/users.js.coffee b/app/assets/javascripts/app/controllers/users.js.coffee index de080c635..e91652cb1 100644 --- a/app/assets/javascripts/app/controllers/users.js.coffee +++ b/app/assets/javascripts/app/controllers/users.js.coffee @@ -10,6 +10,9 @@ class Index extends App.Controller # check authentication return if !@authenticate() + # set title + @title 'Users', true + @render() render: -> diff --git a/app/assets/javascripts/app/views/link/info.jst.eco b/app/assets/javascripts/app/views/link/info.jst.eco index 55580e92a..cdca007f7 100644 --- a/app/assets/javascripts/app/views/link/info.jst.eco +++ b/app/assets/javascripts/app/views/link/info.jst.eco @@ -9,4 +9,4 @@ <% end %>
- \ No newline at end of file + \ No newline at end of file diff --git a/app/assets/javascripts/app/views/navigation/personal.jst.eco b/app/assets/javascripts/app/views/navigation/personal.jst.eco index 3570e7eb7..20f6f01db 100644 --- a/app/assets/javascripts/app/views/navigation/personal.jst.eco +++ b/app/assets/javascripts/app/views/navigation/personal.jst.eco @@ -1,7 +1,7 @@ <% for item in @items: %> <% if item.child: %>