diff --git a/app/assets/javascripts/app/controllers/_application_controller.js.coffee b/app/assets/javascripts/app/controllers/_application_controller.js.coffee index aa072f2c0..ba98ea5a1 100644 --- a/app/assets/javascripts/app/controllers/_application_controller.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller.js.coffee @@ -249,7 +249,7 @@ class App.Controller extends Spine.Controller if !@isRole('Customer') @el.find('.user-popover').bind('click', (e) => user_id = $(e.target).data('id') - @navigate "#user/zoom/#{user_id}" + @navigate "#user/profile/#{user_id}" ); @userPopupsDestroy() diff --git a/app/assets/javascripts/app/controllers/layout_ref.js.coffee b/app/assets/javascripts/app/controllers/layout_ref.js.coffee index e446e71a0..2ba3689ae 100644 --- a/app/assets/javascripts/app/controllers/layout_ref.js.coffee +++ b/app/assets/javascripts/app/controllers/layout_ref.js.coffee @@ -579,15 +579,15 @@ class ImportWizard extends App.ControllerContent App.Config.set( 'layout_ref/import_wizard', ImportWizard, 'Routes' ) -class UserZoom extends App.ControllerContent +class ReferenceUserProfile extends App.ControllerContent constructor: -> super @render() render: -> - @html App.view('layout_ref/user_zoom')() + @html App.view('layout_ref/user_profile')() -App.Config.set( 'layout_ref/user_zoom', UserZoom, 'Routes' ) +App.Config.set( 'layout_ref/user_profile', ReferenceUserProfile, 'Routes' ) App.Config.set( 'LayoutRef', { prio: 1700, parent: '#current_user', name: 'Layout Reference', target: '#layout_ref', role: [ 'Admin' ] }, 'NavBarRight' ) diff --git a/app/assets/javascripts/app/controllers/organization_zoom.js.coffee b/app/assets/javascripts/app/controllers/organization_profile.js.coffee similarity index 91% rename from app/assets/javascripts/app/controllers/organization_zoom.js.coffee rename to app/assets/javascripts/app/controllers/organization_profile.js.coffee index ddab7cc4c..72f329fd0 100644 --- a/app/assets/javascripts/app/controllers/organization_zoom.js.coffee +++ b/app/assets/javascripts/app/controllers/organization_profile.js.coffee @@ -1,4 +1,4 @@ -class App.OrganizationZoom extends App.Controller +class App.OrganizationProfile extends App.Controller constructor: (params) -> super @@ -30,7 +30,7 @@ class App.OrganizationZoom extends App.Controller meta url: => - '#organization/zoom/' + @organization_id + '#organization/profile/' + @organization_id show: => App.OnlineNotification.seen( 'Organization', @organization_id ) @@ -64,7 +64,7 @@ class App.OrganizationZoom extends App.Controller if item.info organizationData.push item - @html App.view('organization_zoom')( + @html App.view('organization_profile')( organization: organization organizationData: organizationData ) @@ -124,6 +124,6 @@ class Router extends App.ControllerPermanent clean_params = organization_id: params.organization_id - App.TaskManager.add( 'Organization-' + @organization_id, 'OrganizationZoom', clean_params ) + App.TaskManager.add( 'Organization-' + @organization_id, 'OrganizationProfile', clean_params ) -App.Config.set( 'organization/zoom/:organization_id', Router, 'Routes' ) +App.Config.set( 'organization/profile/:organization_id', Router, 'Routes' ) diff --git a/app/assets/javascripts/app/controllers/user_zoom.js.coffee b/app/assets/javascripts/app/controllers/user_profile.js.coffee similarity index 92% rename from app/assets/javascripts/app/controllers/user_zoom.js.coffee rename to app/assets/javascripts/app/controllers/user_profile.js.coffee index be7cad668..030c95de8 100644 --- a/app/assets/javascripts/app/controllers/user_zoom.js.coffee +++ b/app/assets/javascripts/app/controllers/user_profile.js.coffee @@ -1,4 +1,4 @@ -class App.UserZoom extends App.Controller +class App.UserProfile extends App.Controller events: 'focusout [data-type=update]': 'update', @@ -32,7 +32,7 @@ class App.UserZoom extends App.Controller meta url: => - '#user/zoom/' + @user_id + '#user/profile/' + @user_id show: => App.OnlineNotification.seen( 'User', @user_id ) @@ -66,7 +66,7 @@ class App.UserZoom extends App.Controller if item.info userData.push item - @html App.view('user_zoom')( + @html App.view('user_profile')( user: user userData: userData ) @@ -135,6 +135,6 @@ class Router extends App.ControllerPermanent clean_params = user_id: params.user_id - App.TaskManager.add( 'User-' + @user_id, 'UserZoom', clean_params ) + App.TaskManager.add( 'User-' + @user_id, 'UserProfile', clean_params ) -App.Config.set( 'user/zoom/:user_id', Router, 'Routes' ) +App.Config.set( 'user/profile/:user_id', Router, 'Routes' ) diff --git a/app/assets/javascripts/app/controllers/widget/ticket_stats.js.coffee b/app/assets/javascripts/app/controllers/widget/ticket_stats.js.coffee index 8ff1600be..292e09a3c 100644 --- a/app/assets/javascripts/app/controllers/widget/ticket_stats.js.coffee +++ b/app/assets/javascripts/app/controllers/widget/ticket_stats.js.coffee @@ -1,4 +1,10 @@ class App.TicketStats extends App.Controller + elements: + '.js-userTab': 'userTabButton' + '.js-orgTab': 'orgTabButton' + '.js-user': 'userTab' + '.js-org': 'orgTab' + events: 'click .js-userTab': 'showUserTab' 'click .js-orgTab': 'showOrgTab' @@ -39,16 +45,16 @@ class App.TicketStats extends App.Controller ) showOrgTab: => - @$('.js-userTab').removeClass('active') - @$('.js-orgTab').addClass('active') - @$('.js-user').addClass('hide') - @$('.js-org').removeClass('hide') + @userTabButton.removeClass('active') + @orgTabButton.addClass('active') + @userTab.addClass('hide') + @orgTab.removeClass('hide') showUserTab: => - @$('.js-userTab').addClass('active') - @$('.js-orgTab').removeClass('active') - @$('.js-user').removeClass('hide') - @$('.js-org').addClass('hide') + @userTabButton.addClass('active') + @orgTabButton.removeClass('active') + @userTab.removeClass('hide') + @orgTab.addClass('hide') render: (data) => diff --git a/app/assets/javascripts/app/models/organization.js.coffee b/app/assets/javascripts/app/models/organization.js.coffee index 59204b937..64316e141 100644 --- a/app/assets/javascripts/app/models/organization.js.coffee +++ b/app/assets/javascripts/app/models/organization.js.coffee @@ -15,7 +15,7 @@ class App.Organization extends App.Model ] uiUrl: -> - '#organization/zoom/' + @id + '#organization/profile/' + @id icon: (user) -> "organisation icon" diff --git a/app/assets/javascripts/app/models/user.js.coffee b/app/assets/javascripts/app/models/user.js.coffee index 0734eefea..ee1b22927 100644 --- a/app/assets/javascripts/app/models/user.js.coffee +++ b/app/assets/javascripts/app/models/user.js.coffee @@ -31,7 +31,7 @@ class App.User extends App.Model ] uiUrl: -> - '#user/zoom/' + @id + '#user/profile/' + @id icon: (user) -> "user icon" diff --git a/app/assets/javascripts/app/views/layout_ref/index.jst.eco b/app/assets/javascripts/app/views/layout_ref/index.jst.eco index 8b93c94c8..b02f25772 100644 --- a/app/assets/javascripts/app/views/layout_ref/index.jst.eco +++ b/app/assets/javascripts/app/views/layout_ref/index.jst.eco @@ -15,7 +15,7 @@
  • Communication Reply - with content Example
  • Communication Reply - with multiline content Example
  • Import Wizard
  • -
  • User Profile
  • +
  • User Profile
  • \ No newline at end of file diff --git a/app/assets/javascripts/app/views/layout_ref/user_zoom.jst.eco b/app/assets/javascripts/app/views/layout_ref/user_profile.jst.eco similarity index 90% rename from app/assets/javascripts/app/views/layout_ref/user_zoom.jst.eco rename to app/assets/javascripts/app/views/layout_ref/user_profile.jst.eco index 63f7d7473..1429d9f32 100644 --- a/app/assets/javascripts/app/views/layout_ref/user_zoom.jst.eco +++ b/app/assets/javascripts/app/views/layout_ref/user_profile.jst.eco @@ -1,14 +1,14 @@ -
    +
    -
    -
    -