diff --git a/app/assets/javascripts/app/controllers/login.js.coffee b/app/assets/javascripts/app/controllers/login.js.coffee index 29dba271a..35b73cd50 100644 --- a/app/assets/javascripts/app/controllers/login.js.coffee +++ b/app/assets/javascripts/app/controllers/login.js.coffee @@ -20,21 +20,25 @@ class Index extends App.ControllerContent url: '/auth/facebook', name: 'Facebook', config: 'auth_facebook', + class: 'facebook', }, twitter: { url: '/auth/twitter', name: 'Twitter', config: 'auth_twitter', + class: 'twitter', }, linkedin: { url: '/auth/linkedin', name: 'LinkedIn', config: 'auth_linkedin', + class: 'linkedin', }, google_oauth2: { url: '/auth/google_oauth2', name: 'Google', config: 'auth_google_oauth2', + class: 'google', }, } auth_providers = [] diff --git a/app/assets/javascripts/app/controllers/navigation.js.coffee b/app/assets/javascripts/app/controllers/navigation.js.coffee index a4b30f5ef..6a898127e 100644 --- a/app/assets/javascripts/app/controllers/navigation.js.coffee +++ b/app/assets/javascripts/app/controllers/navigation.js.coffee @@ -155,6 +155,7 @@ class App.Navigation extends App.Controller display: "#{user.displayName()}" id: user.id class: "user user-popover" + url: user.uiUrl() iconClass: "user" area.result.push data else if area.name is 'Organization' diff --git a/app/assets/javascripts/app/controllers/reset_password.js.coffee b/app/assets/javascripts/app/controllers/reset_password.js.coffee index 5b149fd56..475ee66df 100644 --- a/app/assets/javascripts/app/controllers/reset_password.js.coffee +++ b/app/assets/javascripts/app/controllers/reset_password.js.coffee @@ -1,10 +1,8 @@ class Index extends App.ControllerContent - className: 'reset_password fit' - events: 'submit form': 'submit' 'click .submit': 'submit' - 'click .retry': 'rerender' + 'click .retry': 'retry' constructor: -> super @@ -28,14 +26,14 @@ class Index extends App.ControllerContent @html App.view('password/reset')(params) @form = new App.ControllerForm( - el: @el.find('#form-password-item') + el: @el.find('.form-password-item') model: { configure_attributes: configure_attributes } autofocus: true ) - rerender: (e) -> + retry: (e) -> e.preventDefault() - @el.find('#form-password').show() + @render() submit: (e) -> e.preventDefault() @@ -55,20 +53,17 @@ class Index extends App.ControllerContent success: (data, status, xhr) => @render( sent: true ) - @el.find('#form-password').hide() error: (data, status, xhr) => @notify( type: 'error' msg: App.i18n.translateContent( 'Username or email address invalid, please try again.' ) ) - @formEnable( @el.find('#form-password') ) + @formEnable( @el.find('.form-password') ) App.Config.set( 'reset_password', Index, 'Routes' ) class Verify extends App.ControllerContent - className: 'container' - events: 'submit form': 'submit' 'click .submit': 'submit' diff --git a/app/assets/javascripts/app/controllers/signup.js.coffee b/app/assets/javascripts/app/controllers/signup.js.coffee index 0a2ade213..0f0cd248e 100644 --- a/app/assets/javascripts/app/controllers/signup.js.coffee +++ b/app/assets/javascripts/app/controllers/signup.js.coffee @@ -1,6 +1,4 @@ class Index extends App.ControllerContent - className: 'signup fit' - events: 'submit form': 'submit' 'click .submit': 'submit' diff --git a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee index 678557dc4..4852430a4 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee @@ -33,13 +33,14 @@ class App.TicketZoom extends App.Controller meta: => meta = - url: @url() - id: @ticket_id + url: @url() + id: @ticket_id + iconClass: "priority" if @ticket - @ticket = App.Ticket.retrieve( @ticket.id ) - meta.head = @ticket.title - meta.title = '#' + @ticket.number + ' - ' + @ticket.title - meta.class = "level-#{@ticket.priority_id}" + @ticket = App.Ticket.retrieve( @ticket.id ) + meta.head = @ticket.title + meta.title = '#' + @ticket.number + ' - ' + @ticket.title + meta.class = "level-#{@ticket.priority_id}" meta url: => diff --git a/app/assets/javascripts/app/controllers/user_zoom.js.coffee b/app/assets/javascripts/app/controllers/user_zoom.js.coffee index 8b13bdfaa..60132a904 100644 --- a/app/assets/javascripts/app/controllers/user_zoom.js.coffee +++ b/app/assets/javascripts/app/controllers/user_zoom.js.coffee @@ -15,7 +15,9 @@ class App.UserZoom extends App.Controller meta = url: @url() id: @user_id - class: "level-1" + class: "" + iconClass: "user" + if @user meta.head = @user.displayName() diff --git a/app/assets/javascripts/app/views/login.jst.eco b/app/assets/javascripts/app/views/login.jst.eco index 3f3923c5e..0411d665d 100644 --- a/app/assets/javascripts/app/views/login.jst.eco +++ b/app/assets/javascripts/app/views/login.jst.eco @@ -18,31 +18,23 @@ <% if @C('user_lost_password'): %> - <%- @T( 'Forgot password?' ) %> + <%- @T( 'Forgot password?' ) %> <% end %> - <% if true or !_.isEmpty( @auth_providers ): %> + <% if !_.isEmpty( @auth_providers ): %>
<%- @T( "You're already registered with your email adress if you've been in touch with our support team.") %>
- <%- @T( "You can request your password") %> <%- @T( "here") %>.
+ <% if @C('user_lost_password'): %>
+ <%- @T( "You can request your password") %> <%- @T( "here") %>.
+ <% end %>
- <%- @T( 'Register as a new customer' ) %> -
++ <%- @T( 'Register as a new customer' ) %> +
<% end %> diff --git a/app/assets/javascripts/app/views/password/reset.jst.eco b/app/assets/javascripts/app/views/password/reset.jst.eco index 5650ba5e6..afb08c97b 100644 --- a/app/assets/javascripts/app/views/password/reset.jst.eco +++ b/app/assets/javascripts/app/views/password/reset.jst.eco @@ -1,18 +1,18 @@ -<%- @T('If you don\'t receive instructions within a minute or two, check your email\'s spam and junk filters, or try resending your request.') %>
» <%- @T('again') %> « - <% end %> -