Merge branch 'develop' of github.com:martini/zammad into develop
This commit is contained in:
commit
4b45d8b24c
7 changed files with 64 additions and 64 deletions
|
@ -99,7 +99,9 @@ class App.TaskbarWidget extends App.Controller
|
|||
active_is_closed = true
|
||||
|
||||
# remove task
|
||||
App.TaskManager.remove( key )
|
||||
App.TaskManager.remove(key, false)
|
||||
|
||||
$(e.target).closest('.task').remove()
|
||||
|
||||
# if we do not need to move to an other task
|
||||
return if !active_is_closed
|
||||
|
|
|
@ -458,16 +458,23 @@ class BulkForm extends App.Controller
|
|||
super
|
||||
|
||||
@configure_attributes_ticket = [
|
||||
{ name: 'state_id', display: 'State', tag: 'select', multiple: false, null: true, relation: 'TicketState', filter: @bulk, translate: true, nulloption: true, default: '', class: '', item_class: '' },
|
||||
{ name: 'priority_id', display: 'Priority', tag: 'select', multiple: false, null: true, relation: 'TicketPriority', filter: @bulk, translate: true, nulloption: true, default: '', class: '', item_class: '' },
|
||||
{ name: 'group_id', display: 'Group', tag: 'select', multiple: false, null: true, relation: 'Group', filter: @bulk, nulloption: true, class: '', item_class: '' },
|
||||
{ name: 'owner_id', display: 'Owner', tag: 'select', multiple: false, null: true, relation: 'User', filter: @bulk, nulloption: true, class: '', item_class: '' }
|
||||
{ name: 'state_id', display: 'State', tag: 'select', multiple: false, null: true, relation: 'TicketState', translate: true, nulloption: true, default: '' },
|
||||
{ name: 'priority_id', display: 'Priority', tag: 'select', multiple: false, null: true, relation: 'TicketPriority', translate: true, nulloption: true, default: '' },
|
||||
{ name: 'group_id', display: 'Group', tag: 'select', multiple: false, null: true, relation: 'Group', nulloption: true },
|
||||
{ name: 'owner_id', display: 'Owner', tag: 'select', multiple: false, null: true, relation: 'User', nulloption: true }
|
||||
]
|
||||
|
||||
@holder = @options.holder
|
||||
@visible = false
|
||||
|
||||
load = (data) =>
|
||||
App.Collection.loadAssets(data.assets)
|
||||
@formMeta = data.form_meta
|
||||
@render()
|
||||
@bindId = App.TicketCreateCollection.bind(load)
|
||||
|
||||
release: =>
|
||||
App.TicketCreateCollection.unbind(@bindId)
|
||||
|
||||
render: ->
|
||||
@el.css 'right', App.Utils.getScrollBarWidth()
|
||||
|
@ -480,7 +487,11 @@ class BulkForm extends App.Controller
|
|||
configure_attributes: @configure_attributes_ticket
|
||||
className: 'create'
|
||||
labelClass: 'input-group-addon'
|
||||
form_data: @bulk
|
||||
handlers: [
|
||||
@ticketFormChanges
|
||||
]
|
||||
params: {}
|
||||
filter: @formMeta.filter
|
||||
noFieldset: true
|
||||
)
|
||||
|
||||
|
@ -490,7 +501,6 @@ class BulkForm extends App.Controller
|
|||
configure_attributes: [{ name: 'body', display: 'Comment', tag: 'textarea', rows: 4, null: true, upload: false, item_class: 'flex' }]
|
||||
className: 'create'
|
||||
labelClass: 'input-group-addon'
|
||||
form_data: @bulk
|
||||
noFieldset: true
|
||||
)
|
||||
|
||||
|
@ -505,7 +515,6 @@ class BulkForm extends App.Controller
|
|||
configure_attributes: @confirm_attributes
|
||||
className: 'create'
|
||||
labelClass: 'input-group-addon'
|
||||
form_data: @bulk
|
||||
noFieldset: true
|
||||
)
|
||||
|
||||
|
|
|
@ -24,10 +24,10 @@ class App.TaskManager
|
|||
_instance ?= new _taskManagerSingleton
|
||||
_instance.update( key, params )
|
||||
|
||||
@remove: ( key ) ->
|
||||
@remove: (key, rerender = true) ->
|
||||
if _instance == undefined
|
||||
_instance ?= new _taskManagerSingleton
|
||||
_instance.remove( key )
|
||||
_instance.remove(key, rerender)
|
||||
|
||||
@notify: ( key ) ->
|
||||
if _instance == undefined
|
||||
|
@ -77,17 +77,13 @@ class _taskManagerSingleton extends Spine.Module
|
|||
@tasksInitial()
|
||||
|
||||
# render on login
|
||||
App.Event.bind(
|
||||
'auth:login'
|
||||
=>
|
||||
App.Event.bind('auth:login', =>
|
||||
@tasksInitial()
|
||||
'task'
|
||||
)
|
||||
|
||||
# render on logout
|
||||
App.Event.bind(
|
||||
'auth:logout'
|
||||
=>
|
||||
App.Event.bind('auth:logout', =>
|
||||
@reset()
|
||||
'task'
|
||||
)
|
||||
|
@ -220,6 +216,7 @@ class _taskManagerSingleton extends Spine.Module
|
|||
# start worker for task if not exists
|
||||
@startController(params)
|
||||
|
||||
if !params.init
|
||||
App.Event.trigger 'task:render'
|
||||
|
||||
startController: (params) =>
|
||||
|
@ -269,7 +266,6 @@ class _taskManagerSingleton extends Spine.Module
|
|||
# execute controllers show
|
||||
if controller.show
|
||||
controller.show(params_app)
|
||||
App.Event.trigger('ui:rerender:task')
|
||||
|
||||
true
|
||||
|
||||
|
@ -306,7 +302,7 @@ class _taskManagerSingleton extends Spine.Module
|
|||
@taskUpdate(task)
|
||||
|
||||
# remove task certain task from tasks
|
||||
remove: ( key ) =>
|
||||
remove: (key, rerender) =>
|
||||
|
||||
# remember started task
|
||||
delete @tasksStarted[key]
|
||||
|
@ -327,6 +323,7 @@ class _taskManagerSingleton extends Spine.Module
|
|||
@release(key)
|
||||
|
||||
# rerender taskbar
|
||||
if rerender
|
||||
App.Event.trigger 'task:render'
|
||||
|
||||
# destroy in backend storage
|
||||
|
|
|
@ -275,10 +275,7 @@ class TicketsController < ApplicationController
|
|||
assets: assets,
|
||||
links: link_list,
|
||||
tags: tags,
|
||||
form_meta: {
|
||||
filter: attributes_to_change[:filter],
|
||||
dependencies: attributes_to_change[:dependencies],
|
||||
}
|
||||
form_meta: attributes_to_change[:form_meta],
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -47,9 +47,7 @@ returns
|
|||
end
|
||||
state_types.each {|type|
|
||||
state_type = Ticket::StateType.find_by(name: type)
|
||||
|
||||
next if !state_type
|
||||
|
||||
state_type.states.each {|state|
|
||||
assets = state.assets(assets)
|
||||
state_ids.push state.id
|
||||
|
|
|
@ -964,8 +964,8 @@ wait untill text in selector disabppears
|
|||
=begin
|
||||
|
||||
tasks_close_all(
|
||||
:browser => browser1,
|
||||
:discard_changes => true,
|
||||
browser: browser1,
|
||||
discard_changes: true,
|
||||
)
|
||||
|
||||
=end
|
||||
|
@ -980,11 +980,8 @@ wait untill text in selector disabppears
|
|||
begin
|
||||
if instance.find_elements( { css: '.navigation .tasks .task:first-child' } )[0]
|
||||
instance.mouse.move_to( instance.find_elements( { css: '.navigation .tasks .task:first-child' } )[0] )
|
||||
sleep 0.2
|
||||
|
||||
click_element = instance.find_elements( { css: '.navigation .tasks .task:first-child .js-close' } )[0]
|
||||
if click_element
|
||||
sleep 0.1
|
||||
click_element.click
|
||||
|
||||
# accept task close warning
|
||||
|
|
Loading…
Reference in a new issue