Merge branch 'develop' of github.com:martini/zammad into develop

This commit is contained in:
Felix Niklas 2015-11-20 15:43:27 +01:00
commit 4b45d8b24c
7 changed files with 64 additions and 64 deletions

View file

@ -99,7 +99,9 @@ class App.TaskbarWidget extends App.Controller
active_is_closed = true active_is_closed = true
# remove task # 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 # if we do not need to move to an other task
return if !active_is_closed return if !active_is_closed

View file

@ -458,16 +458,23 @@ class BulkForm extends App.Controller
super super
@configure_attributes_ticket = [ @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: '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', filter: @bulk, translate: true, nulloption: true, default: '', class: '', item_class: '' }, { 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', filter: @bulk, nulloption: true, class: '', item_class: '' }, { 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', filter: @bulk, nulloption: true, class: '', item_class: '' } { name: 'owner_id', display: 'Owner', tag: 'select', multiple: false, null: true, relation: 'User', nulloption: true }
] ]
@holder = @options.holder @holder = @options.holder
@visible = false @visible = false
load = (data) =>
App.Collection.loadAssets(data.assets)
@formMeta = data.form_meta
@render() @render()
@bindId = App.TicketCreateCollection.bind(load)
release: =>
App.TicketCreateCollection.unbind(@bindId)
render: -> render: ->
@el.css 'right', App.Utils.getScrollBarWidth() @el.css 'right', App.Utils.getScrollBarWidth()
@ -480,7 +487,11 @@ class BulkForm extends App.Controller
configure_attributes: @configure_attributes_ticket configure_attributes: @configure_attributes_ticket
className: 'create' className: 'create'
labelClass: 'input-group-addon' labelClass: 'input-group-addon'
form_data: @bulk handlers: [
@ticketFormChanges
]
params: {}
filter: @formMeta.filter
noFieldset: true 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' }] configure_attributes: [{ name: 'body', display: 'Comment', tag: 'textarea', rows: 4, null: true, upload: false, item_class: 'flex' }]
className: 'create' className: 'create'
labelClass: 'input-group-addon' labelClass: 'input-group-addon'
form_data: @bulk
noFieldset: true noFieldset: true
) )
@ -505,7 +515,6 @@ class BulkForm extends App.Controller
configure_attributes: @confirm_attributes configure_attributes: @confirm_attributes
className: 'create' className: 'create'
labelClass: 'input-group-addon' labelClass: 'input-group-addon'
form_data: @bulk
noFieldset: true noFieldset: true
) )

View file

@ -24,10 +24,10 @@ class App.TaskManager
_instance ?= new _taskManagerSingleton _instance ?= new _taskManagerSingleton
_instance.update( key, params ) _instance.update( key, params )
@remove: ( key ) -> @remove: (key, rerender = true) ->
if _instance == undefined if _instance == undefined
_instance ?= new _taskManagerSingleton _instance ?= new _taskManagerSingleton
_instance.remove( key ) _instance.remove(key, rerender)
@notify: ( key ) -> @notify: ( key ) ->
if _instance == undefined if _instance == undefined
@ -77,17 +77,13 @@ class _taskManagerSingleton extends Spine.Module
@tasksInitial() @tasksInitial()
# render on login # render on login
App.Event.bind( App.Event.bind('auth:login', =>
'auth:login'
=>
@tasksInitial() @tasksInitial()
'task' 'task'
) )
# render on logout # render on logout
App.Event.bind( App.Event.bind('auth:logout', =>
'auth:logout'
=>
@reset() @reset()
'task' 'task'
) )
@ -220,6 +216,7 @@ class _taskManagerSingleton extends Spine.Module
# start worker for task if not exists # start worker for task if not exists
@startController(params) @startController(params)
if !params.init
App.Event.trigger 'task:render' App.Event.trigger 'task:render'
startController: (params) => startController: (params) =>
@ -269,7 +266,6 @@ class _taskManagerSingleton extends Spine.Module
# execute controllers show # execute controllers show
if controller.show if controller.show
controller.show(params_app) controller.show(params_app)
App.Event.trigger('ui:rerender:task')
true true
@ -306,7 +302,7 @@ class _taskManagerSingleton extends Spine.Module
@taskUpdate(task) @taskUpdate(task)
# remove task certain task from tasks # remove task certain task from tasks
remove: ( key ) => remove: (key, rerender) =>
# remember started task # remember started task
delete @tasksStarted[key] delete @tasksStarted[key]
@ -327,6 +323,7 @@ class _taskManagerSingleton extends Spine.Module
@release(key) @release(key)
# rerender taskbar # rerender taskbar
if rerender
App.Event.trigger 'task:render' App.Event.trigger 'task:render'
# destroy in backend storage # destroy in backend storage

View file

@ -275,10 +275,7 @@ class TicketsController < ApplicationController
assets: assets, assets: assets,
links: link_list, links: link_list,
tags: tags, tags: tags,
form_meta: { form_meta: attributes_to_change[:form_meta],
filter: attributes_to_change[:filter],
dependencies: attributes_to_change[:dependencies],
}
} }
end end

View file

@ -47,9 +47,7 @@ returns
end end
state_types.each {|type| state_types.each {|type|
state_type = Ticket::StateType.find_by(name: type) state_type = Ticket::StateType.find_by(name: type)
next if !state_type next if !state_type
state_type.states.each {|state| state_type.states.each {|state|
assets = state.assets(assets) assets = state.assets(assets)
state_ids.push state.id state_ids.push state.id

View file

@ -964,8 +964,8 @@ wait untill text in selector disabppears
=begin =begin
tasks_close_all( tasks_close_all(
:browser => browser1, browser: browser1,
:discard_changes => true, discard_changes: true,
) )
=end =end
@ -980,11 +980,8 @@ wait untill text in selector disabppears
begin begin
if instance.find_elements( { css: '.navigation .tasks .task:first-child' } )[0] 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] ) 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] click_element = instance.find_elements( { css: '.navigation .tasks .task:first-child .js-close' } )[0]
if click_element if click_element
sleep 0.1
click_element.click click_element.click
# accept task close warning # accept task close warning