QA switchBackToUser

This commit is contained in:
Felix Niklas 2014-09-15 23:59:21 +02:00
parent 01e759949f
commit 228177110b
3 changed files with 30 additions and 16 deletions

View file

@ -1,6 +1,6 @@
class Widget extends App.Controller class Widget extends App.Controller
events: events:
'click .close': 'switchBack' 'click .js-close': 'switchBack'
constructor: -> constructor: ->
super super
@ -19,12 +19,12 @@ class Widget extends App.Controller
# if no switch to user is active # if no switch to user is active
if !App.Config.get('switch_back_to_possible') || _.isEmpty( App.Session.all() ) if !App.Config.get('switch_back_to_possible') || _.isEmpty( App.Session.all() )
@el.html('') @el.html('')
$('#app').removeClass('switch-back-to-user-space') $('#app').removeClass('switchBackToUserSpace')
return return
# show switch back widget # show switch back widget
@html App.view('widget/switch_back_to_user')() @html App.view('widget/switch_back_to_user')()
$('#app').addClass('switch-back-to-user-space') $('#app').addClass('switchBackToUserSpace')
switchBack: (e) => switchBack: (e) =>
e.preventDefault() e.preventDefault()

View file

@ -1,4 +1,10 @@
<div class="switch-back-to-user fit"> <div class="switchBackToUser fit horizontal center">
<%- @T('Zammad looks like this for "%s"', @S('firstname') + ' ' + @S('lastname') ) %> <div class="switchView icon"></div>
<a href="#" class="close icon "></a> <div class="switchBackToUser-text"><%- @T('Zammad looks like this for "%s"', @S('firstname') + ' ' + @S('lastname') ) %></div>
<div class="align-right horizontal center js-close u-clickable">
<%- @T('Back to my Overview') %>
<div class="switchBackToUser-close centered">
<span class="white close icon"></span>
</div>
</div>
</div> </div>

View file

@ -1617,7 +1617,7 @@ footer {
} }
.search { .search {
padding: 10px 15px 10px 10px; padding: 14px 15px 10px 10px;
border-bottom: 1px solid rgba(240, 250, 255, .05); border-bottom: 1px solid rgba(240, 250, 255, .05);
} }
@ -3071,17 +3071,25 @@ footer {
font-size: inherit; font-size: inherit;
} }
.switch-back-to-user { .switchBackToUser.fit {
position: absolute; background: hsl(200,87%,45%);
background-color: #389ed9;
color: #fff; color: #fff;
height: 34px; height: 45px;
z-index: 1; padding: 0 17px;
padding: 8px 9px; top: -45px;
top: -34px; border-bottom: 5px solid hsl(205,90%,60%);
} }
.switch-back-to-user-space { .switchBackToUser-text {
top: 34px; margin-left: 10px;
}
.switchBackToUser-close {
width: 40px;
height: 40px;
margin-right: -10px;
}
#app.switchBackToUserSpace {
top: 45px;
} }
/* /*