Merge branch 'develop' into feature/rails4

This commit is contained in:
Martin Edenhofer 2013-09-04 15:30:24 +02:00
commit 1bae4d95c8
6 changed files with 44 additions and 13 deletions

View file

@ -167,7 +167,9 @@ class App.ControllerGenericIndex extends App.ControllerContent
destroy: (e) -> destroy: (e) ->
item = $(e.target).item( App[ @genericObject ] ) item = $(e.target).item( App[ @genericObject ] )
item.destroy() if confirm('Sure?') new DestroyConfirm(
item: item
)
new: (e) -> new: (e) ->
e.preventDefault() e.preventDefault()
@ -176,6 +178,27 @@ class App.ControllerGenericIndex extends App.ControllerContent
genericObject: @genericObject genericObject: @genericObject
) )
class DestroyConfirm extends App.ControllerModal
constructor: ->
super
@render()
render: ->
@html App.view('modal')(
title: 'Confirm'
message: 'Sure to delete this object?'
cancel: true
button: 'Yes'
)
@modalShow(
backdrop: true,
keyboard: true,
)
submit: (e) =>
@modalHide()
@item.destroy()
class App.ControllerLevel2 extends App.ControllerContent class App.ControllerLevel2 extends App.ControllerContent
events: events:
'click [data-toggle="tabnav"]': 'toggle', 'click [data-toggle="tabnav"]': 'toggle',

View file

@ -379,7 +379,7 @@ class _taskManagerSingleton extends App.Controller
App.Delay.set( App.Delay.set(
=> =>
@add(task.key, task.callback, task.params, true) @add(task.key, task.callback, task.params, true)
task_count * 900 task_count * 600
undefined undefined
'task' 'task'
) )

View file

@ -1,6 +1,7 @@
# Copyright (C) 2012-2013 Zammad Foundation, http://zammad-foundation.org/ # Copyright (C) 2012-2013 Zammad Foundation, http://zammad-foundation.org/
class LongPollingController < ApplicationController class LongPollingController < ApplicationController
skip_filter :session_update
# GET /api/v1/message_send # GET /api/v1/message_send
def message_send def message_send
@ -118,7 +119,10 @@ class LongPollingController < ApplicationController
begin begin
# update last ping # update last ping
sleep 1 4.times {|loop|
sleep 0.25
}
#sleep 1
Sessions.touch( client_id ) Sessions.touch( client_id )
# set max loop time to 24 sec. because of 30 sec. timeout of mod_proxy # set max loop time to 24 sec. because of 30 sec. timeout of mod_proxy
@ -131,7 +135,10 @@ class LongPollingController < ApplicationController
render :json => queue render :json => queue
return return
end end
sleep 2 8.times {|loop|
sleep 0.25
}
#sleep 2
if count == 0 if count == 0
render :json => { :action => 'pong' } render :json => { :action => 'pong' }
return return

View file

@ -93,16 +93,16 @@ class AaaGettingStartedTest < TestCase
:execute => 'click', :execute => 'click',
:css => '#form-agent button[type="submit"]', :css => '#form-agent button[type="submit"]',
}, },
{
:execute => 'check',
:element => :url,
:result => '#getting_started',
},
{ {
:execute => 'watch_for', :execute => 'watch_for',
:area => 'body', :area => 'body',
:value => 'Invitation sent', :value => 'Invitation sent',
}, },
{
:execute => 'check',
:element => :url,
:result => '#getting_started',
},
{ {
:execute => 'match', :execute => 'match',
:css => 'body', :css => 'body',

View file

@ -184,8 +184,8 @@ class ManageTest < TestCase
:value => 2, :value => 2,
}, },
{ {
:execute => 'accept', :execute => 'click',
:element => :alert, :css => '.modal .submit',
}, },
{ {
:execute => 'wait', :execute => 'wait',

View file

@ -245,14 +245,15 @@ class TestCase < Test::Unit::TestCase
assert( false, "(#{test[:name]}) no login box found!" ) assert( false, "(#{test[:name]}) no login box found!" )
return return
elsif action[:execute] == 'watch_for' elsif action[:execute] == 'watch_for'
(1..24).each { |loop| text = ''
(1..36).each { |loop|
element = instance.find_element( { :css => action[:area] } ) element = instance.find_element( { :css => action[:area] } )
text = element.text text = element.text
if text =~ /#{action[:value]}/i if text =~ /#{action[:value]}/i
assert( true, "(#{test[:name]}) '#{action[:value]}' found in '#{text}'" ) assert( true, "(#{test[:name]}) '#{action[:value]}' found in '#{text}'" )
return return
end end
sleep 0.5 sleep 0.33
} }
assert( false, "(#{test[:name]}) '#{action[:value]}' found in '#{text}'" ) assert( false, "(#{test[:name]}) '#{action[:value]}' found in '#{text}'" )
return return