Close task per default.
This commit is contained in:
parent
48dde6e313
commit
3c8cce0c3d
4 changed files with 37 additions and 12 deletions
|
@ -14,9 +14,9 @@ class App.TicketZoomAttributeBar extends App.Controller
|
||||||
constructor: ->
|
constructor: ->
|
||||||
super
|
super
|
||||||
|
|
||||||
@secondaryAction = @preferencesGet() || 'closeTab'
|
|
||||||
if !@overview_id && @secondaryAction is 'closeNextInOverview'
|
|
||||||
@secondaryAction = 'closeTab'
|
@secondaryAction = 'closeTab'
|
||||||
|
if @overview_id
|
||||||
|
@secondaryAction = 'closeNextInOverview'
|
||||||
|
|
||||||
@subscribeId = App.Macro.subscribe(@render)
|
@subscribeId = App.Macro.subscribe(@render)
|
||||||
@render()
|
@render()
|
||||||
|
@ -71,10 +71,3 @@ class App.TicketZoomAttributeBar extends App.Controller
|
||||||
element.closest('.js-secondaryAction').find('.js-selectedIcon').addClass('is-selected')
|
element.closest('.js-secondaryAction').find('.js-selectedIcon').addClass('is-selected')
|
||||||
@secondaryActionButton.text(text)
|
@secondaryActionButton.text(text)
|
||||||
@secondaryActionButton.data('type', type)
|
@secondaryActionButton.data('type', type)
|
||||||
App.LocalStorage.set(@preferencesStoreKey(), type, @Session.get('id'))
|
|
||||||
|
|
||||||
preferencesGet: =>
|
|
||||||
App.LocalStorage.get(@preferencesStoreKey(), @Session.get('id'))
|
|
||||||
|
|
||||||
preferencesStoreKey: =>
|
|
||||||
"ticketZoom:taskAktion:#{@ticket_id}"
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<div class="btn js-reset hide"><%- @T('Discard your unsaved changes.') %></div>
|
|
||||||
<div class="buttonDropdown dropdown dropdown--actions dropup">
|
<div class="buttonDropdown dropdown dropdown--actions dropup">
|
||||||
<div class="btn btn--text btn--icon--last" data-toggle="dropdown">
|
<div class="btn btn--text btn--icon--last" data-toggle="dropdown">
|
||||||
<span class="js-secondaryActionButtonLabel">xx</span> <%- @Icon('arrow-up') %>
|
<span class="js-secondaryActionButtonLabel"></span> <%- @Icon('arrow-up') %>
|
||||||
</div>
|
</div>
|
||||||
<ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="secondaryAction">
|
<ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="secondaryAction">
|
||||||
<li class="js-secondaryAction" role="menuitem">
|
<li class="js-secondaryAction" role="menuitem">
|
||||||
|
@ -23,6 +22,7 @@
|
||||||
</span>
|
</span>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="buttonDropdown btn js-reset hide"><%- @T('Discard your unsaved changes.') %></div>
|
||||||
<% if @macroDisabled: %>
|
<% if @macroDisabled: %>
|
||||||
<div class="btn btn--primary js-submit"><%- @T('Update') %></div>
|
<div class="btn btn--primary js-submit"><%- @T('Update') %></div>
|
||||||
<% else: %>
|
<% else: %>
|
||||||
|
|
|
@ -248,6 +248,11 @@ class AgentTicketActionsLevel3Test < TestCase
|
||||||
no_quote: true,
|
no_quote: true,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
task_type(
|
||||||
|
browser: browser2,
|
||||||
|
type: 'stayOnTab',
|
||||||
|
)
|
||||||
|
|
||||||
click(
|
click(
|
||||||
browser: browser2,
|
browser: browser2,
|
||||||
css: '.active .js-submit',
|
css: '.active .js-submit',
|
||||||
|
|
|
@ -583,6 +583,28 @@ class TestCase < Test::Unit::TestCase
|
||||||
match(params)
|
match(params)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
=begin
|
||||||
|
|
||||||
|
task_type(
|
||||||
|
:browser => browser1,
|
||||||
|
:type => 'stayOnTab',
|
||||||
|
)
|
||||||
|
|
||||||
|
=end
|
||||||
|
|
||||||
|
def task_type(params)
|
||||||
|
log('task_type', params)
|
||||||
|
|
||||||
|
instance = params[:browser] || @browser
|
||||||
|
|
||||||
|
if params[:type]
|
||||||
|
instance.find_elements( { css: '.content.active .js-secondaryActionButtonLabel' } )[0].click
|
||||||
|
instance.find_elements( { css: ".content.active .js-secondaryActionLabel[data-type=#{params[:type]}]" } )[0].click
|
||||||
|
return
|
||||||
|
end
|
||||||
|
fail "Unknown params for task_type: #{params.inspect}"
|
||||||
|
end
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
cookie(
|
cookie(
|
||||||
|
@ -1312,6 +1334,11 @@ wait untill text in selector disabppears
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
task_type(
|
||||||
|
browser: instance,
|
||||||
|
type: 'stayOnTab',
|
||||||
|
)
|
||||||
|
|
||||||
if params[:do_not_submit]
|
if params[:do_not_submit]
|
||||||
assert( true, 'ticket updated without submit' )
|
assert( true, 'ticket updated without submit' )
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in a new issue