Merge branch 'develop' of github.com:martini/zammad into develop
This commit is contained in:
commit
9bd7bd4380
11 changed files with 42 additions and 23 deletions
|
@ -555,6 +555,13 @@ class App.Controller extends Spine.Controller
|
||||||
renderScreenUnauthorized: (data) ->
|
renderScreenUnauthorized: (data) ->
|
||||||
@html App.view('generic/error/unauthorized')(data)
|
@html App.view('generic/error/unauthorized')(data)
|
||||||
|
|
||||||
|
metaTaskUpdate: =>
|
||||||
|
App.Delay.set(
|
||||||
|
-> App.Event.trigger 'task:render'
|
||||||
|
250
|
||||||
|
'meta-task-update'
|
||||||
|
)
|
||||||
|
|
||||||
class App.ControllerPermanent extends App.Controller
|
class App.ControllerPermanent extends App.Controller
|
||||||
constructor: ->
|
constructor: ->
|
||||||
super
|
super
|
||||||
|
@ -742,10 +749,10 @@ class App.UpdateTastbar extends App.Controller
|
||||||
release: =>
|
release: =>
|
||||||
App[ @genericObject.constructor.className ].unsubscribe(@subscribeId)
|
App[ @genericObject.constructor.className ].unsubscribe(@subscribeId)
|
||||||
|
|
||||||
update: (genericObject) ->
|
update: (genericObject) =>
|
||||||
|
|
||||||
# update taskbar with new meta data
|
# update taskbar with new meta data
|
||||||
App.Event.trigger 'task:render'
|
@metaTaskUpdate()
|
||||||
|
|
||||||
class App.ControllerWidgetPermanent extends App.Controller
|
class App.ControllerWidgetPermanent extends App.Controller
|
||||||
constructor: (params) ->
|
constructor: (params) ->
|
||||||
|
|
|
@ -302,6 +302,9 @@ class App.TicketCreate extends App.Controller
|
||||||
# start auto save
|
# start auto save
|
||||||
@autosave()
|
@autosave()
|
||||||
|
|
||||||
|
# update taskbar with new meta data
|
||||||
|
@metaTaskUpdate()
|
||||||
|
|
||||||
localUserInfo: (e) =>
|
localUserInfo: (e) =>
|
||||||
|
|
||||||
params = App.ControllerForm.params( $(e.target).closest('form') )
|
params = App.ControllerForm.params( $(e.target).closest('form') )
|
||||||
|
|
|
@ -78,6 +78,9 @@ class Object extends App.Controller
|
||||||
|
|
||||||
render: (organization) =>
|
render: (organization) =>
|
||||||
|
|
||||||
|
# update taskbar with new meta data
|
||||||
|
@metaTaskUpdate()
|
||||||
|
|
||||||
# get display data
|
# get display data
|
||||||
organizationData = []
|
organizationData = []
|
||||||
for attributeName, attributeConfig of App.Organization.attributesGet('view')
|
for attributeName, attributeConfig of App.Organization.attributesGet('view')
|
||||||
|
|
|
@ -22,7 +22,7 @@ class App.TaskbarWidget extends App.Controller
|
||||||
return if !@Session.get()
|
return if !@Session.get()
|
||||||
|
|
||||||
tasks = App.TaskManager.all()
|
tasks = App.TaskManager.all()
|
||||||
item_list = []
|
taskItems = []
|
||||||
for task in tasks
|
for task in tasks
|
||||||
|
|
||||||
# collect meta data of task for task bar item
|
# collect meta data of task for task bar item
|
||||||
|
@ -45,14 +45,14 @@ class App.TaskbarWidget extends App.Controller
|
||||||
item = {}
|
item = {}
|
||||||
item.task = task
|
item.task = task
|
||||||
item.data = data
|
item.data = data
|
||||||
item_list.push item
|
taskItems.push item
|
||||||
|
|
||||||
# set title
|
# set title
|
||||||
if task.active
|
if task.active
|
||||||
@title data.title
|
@title data.title
|
||||||
|
|
||||||
@html App.view('task_widget_tasks')(
|
@html App.view('task_widget_tasks')(
|
||||||
item_list: item_list
|
taskItems: taskItems
|
||||||
)
|
)
|
||||||
|
|
||||||
dndOptions =
|
dndOptions =
|
||||||
|
|
|
@ -208,8 +208,8 @@ class App.TicketZoom extends App.Controller
|
||||||
objectName: 'Ticket'
|
objectName: 'Ticket'
|
||||||
)
|
)
|
||||||
|
|
||||||
# update current task title
|
# update taskbar with new meta data
|
||||||
App.Event.trigger 'task:render'
|
@metaTaskUpdate()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -278,7 +278,8 @@ class App.TicketZoom extends App.Controller
|
||||||
render: =>
|
render: =>
|
||||||
|
|
||||||
# update taskbar with new meta data
|
# update taskbar with new meta data
|
||||||
App.Event.trigger 'task:render'
|
@metaTaskUpdate()
|
||||||
|
|
||||||
@formEnable( @$('.submit') )
|
@formEnable( @$('.submit') )
|
||||||
|
|
||||||
if !@renderDone
|
if !@renderDone
|
||||||
|
|
|
@ -51,7 +51,7 @@ class App.TicketZoomTitle extends App.Controller
|
||||||
App.TaskManager.mute(@task_key)
|
App.TaskManager.mute(@task_key)
|
||||||
|
|
||||||
# update taskbar with new meta data
|
# update taskbar with new meta data
|
||||||
App.Event.trigger 'task:render'
|
@metaTaskUpdate()
|
||||||
|
|
||||||
release: =>
|
release: =>
|
||||||
App.Ticket.unsubscribe(@subscribeId)
|
App.Ticket.unsubscribe(@subscribeId)
|
||||||
|
|
|
@ -81,6 +81,9 @@ class Object extends App.Controller
|
||||||
|
|
||||||
render: (user) =>
|
render: (user) =>
|
||||||
|
|
||||||
|
# update taskbar with new meta data
|
||||||
|
@metaTaskUpdate()
|
||||||
|
|
||||||
# get display data
|
# get display data
|
||||||
userData = []
|
userData = []
|
||||||
for attributeName, attributeConfig of App.User.attributesGet('view')
|
for attributeName, attributeConfig of App.User.attributesGet('view')
|
||||||
|
|
|
@ -64,7 +64,7 @@ class App.TaskManager
|
||||||
_instance ?= new _taskManagerSingleton
|
_instance ?= new _taskManagerSingleton
|
||||||
_instance.TaskbarId()
|
_instance.TaskbarId()
|
||||||
|
|
||||||
class _taskManagerSingleton extends Spine.Module
|
class _taskManagerSingleton extends App.Controller
|
||||||
@include App.LogInclude
|
@include App.LogInclude
|
||||||
|
|
||||||
constructor: (params = {}) ->
|
constructor: (params = {}) ->
|
||||||
|
@ -217,7 +217,7 @@ class _taskManagerSingleton extends Spine.Module
|
||||||
@startController(params)
|
@startController(params)
|
||||||
|
|
||||||
if !params.init
|
if !params.init
|
||||||
App.Event.trigger 'task:render'
|
@metaTaskUpdate()
|
||||||
|
|
||||||
startController: (params) =>
|
startController: (params) =>
|
||||||
|
|
||||||
|
@ -324,7 +324,7 @@ class _taskManagerSingleton extends Spine.Module
|
||||||
|
|
||||||
# rerender taskbar
|
# rerender taskbar
|
||||||
if rerender
|
if rerender
|
||||||
App.Event.trigger 'task:render'
|
@metaTaskUpdate()
|
||||||
|
|
||||||
# destroy in backend storage
|
# destroy in backend storage
|
||||||
@taskDestroy(task)
|
@taskDestroy(task)
|
||||||
|
@ -387,7 +387,7 @@ class _taskManagerSingleton extends Spine.Module
|
||||||
App.Taskbar.deleteAll()
|
App.Taskbar.deleteAll()
|
||||||
|
|
||||||
# rerender task bar
|
# rerender task bar
|
||||||
App.Event.trigger 'task:render'
|
@metaTaskUpdate()
|
||||||
|
|
||||||
nextTaskUrl: =>
|
nextTaskUrl: =>
|
||||||
|
|
||||||
|
@ -418,7 +418,7 @@ class _taskManagerSingleton extends Spine.Module
|
||||||
taskUpdate: (task) ->
|
taskUpdate: (task) ->
|
||||||
#@log 'notice', "UPDATE task #{task.id}", task
|
#@log 'notice', "UPDATE task #{task.id}", task
|
||||||
@tasksToUpdate[ task.key ] = 'toUpdate'
|
@tasksToUpdate[ task.key ] = 'toUpdate'
|
||||||
App.Event.trigger 'task:render'
|
@metaTaskUpdate()
|
||||||
|
|
||||||
taskUpdateLoop: =>
|
taskUpdateLoop: =>
|
||||||
return if @offlineModus
|
return if @offlineModus
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<% for item in @item_list: %>
|
<% for item in @taskItems: %>
|
||||||
<a href="<%- item.data.url %>" title="<%= item.data.title %>" class="nav-tab task <%= item.data.class %><% if item.task.active: %> is-active<% end %><% if item.task.notify: %> is-modified<% end %>" data-key="<%- item.task.key %>">
|
<a href="<%- item.data.url %>" title="<%= item.data.title %>" class="nav-tab task <%= item.data.class %><% if item.task.active: %> is-active<% end %><% if item.task.notify: %> is-modified<% end %>" data-key="<%- item.task.key %>">
|
||||||
<div class="nav-tab-icon" title="<%- @Ti(item.data.iconTitle) %>">
|
<div class="nav-tab-icon" title="<%- @Ti(item.data.iconTitle) %>">
|
||||||
<% if item.data.type is 'task': %>
|
<% if item.data.type is 'task': %>
|
||||||
|
|
|
@ -21,6 +21,7 @@ class SwitchToUserTest < TestCase
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|
||||||
@browser.mouse.move_to( @browser.find_elements( { css: '#content .table-overview tbody tr:first-child' } )[0] )
|
@browser.mouse.move_to( @browser.find_elements( { css: '#content .table-overview tbody tr:first-child' } )[0] )
|
||||||
|
sleep 0.5
|
||||||
click(
|
click(
|
||||||
css: '#content .icon-switchView',
|
css: '#content .icon-switchView',
|
||||||
)
|
)
|
||||||
|
|
|
@ -255,8 +255,8 @@ class TestCase < Test::Unit::TestCase
|
||||||
if params[:css]
|
if params[:css]
|
||||||
|
|
||||||
element = instance.find_elements( { css: params[:css] } )[0]
|
element = instance.find_elements( { css: params[:css] } )[0]
|
||||||
instance.mouse.move_to(element)
|
#instance.mouse.move_to(element)
|
||||||
sleep 0.2
|
#sleep 0.2
|
||||||
element.click
|
element.click
|
||||||
|
|
||||||
# trigger also focus on input/select and textarea fields
|
# trigger also focus on input/select and textarea fields
|
||||||
|
@ -980,6 +980,7 @@ 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.1
|
||||||
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
|
||||||
click_element.click
|
click_element.click
|
||||||
|
|
Loading…
Reference in a new issue