diff --git a/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee b/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee index 530565c56..8acc101d1 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_generic.js.coffee @@ -167,7 +167,9 @@ class App.ControllerGenericIndex extends App.ControllerContent destroy: (e) -> item = $(e.target).item( App[ @genericObject ] ) - item.destroy() if confirm('Sure?') + new DestroyConfirm( + item: item + ) new: (e) -> e.preventDefault() @@ -176,6 +178,27 @@ class App.ControllerGenericIndex extends App.ControllerContent 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 events: 'click [data-toggle="tabnav"]': 'toggle', diff --git a/app/assets/javascripts/app/lib/app_post/task_manager.js.coffee b/app/assets/javascripts/app/lib/app_post/task_manager.js.coffee index 264cbd403..da9aa3a32 100644 --- a/app/assets/javascripts/app/lib/app_post/task_manager.js.coffee +++ b/app/assets/javascripts/app/lib/app_post/task_manager.js.coffee @@ -379,7 +379,7 @@ class _taskManagerSingleton extends App.Controller App.Delay.set( => @add(task.key, task.callback, task.params, true) - task_count * 900 + task_count * 600 undefined 'task' ) diff --git a/app/controllers/long_polling_controller.rb b/app/controllers/long_polling_controller.rb index ae4590672..111bf29cd 100644 --- a/app/controllers/long_polling_controller.rb +++ b/app/controllers/long_polling_controller.rb @@ -1,6 +1,7 @@ # Copyright (C) 2012-2013 Zammad Foundation, http://zammad-foundation.org/ class LongPollingController < ApplicationController + skip_filter :session_update # GET /api/v1/message_send def message_send @@ -118,7 +119,10 @@ class LongPollingController < ApplicationController begin # update last ping - sleep 1 + 4.times {|loop| + sleep 0.25 + } + #sleep 1 Sessions.touch( client_id ) # 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 return end - sleep 2 + 8.times {|loop| + sleep 0.25 + } + #sleep 2 if count == 0 render :json => { :action => 'pong' } return diff --git a/test/browser/aaa_getting_started_test.rb b/test/browser/aaa_getting_started_test.rb index 702d03e58..f44281558 100644 --- a/test/browser/aaa_getting_started_test.rb +++ b/test/browser/aaa_getting_started_test.rb @@ -93,16 +93,16 @@ class AaaGettingStartedTest < TestCase :execute => 'click', :css => '#form-agent button[type="submit"]', }, - { - :execute => 'check', - :element => :url, - :result => '#getting_started', - }, { :execute => 'watch_for', :area => 'body', :value => 'Invitation sent', }, + { + :execute => 'check', + :element => :url, + :result => '#getting_started', + }, { :execute => 'match', :css => 'body', diff --git a/test/browser/manage_test.rb b/test/browser/manage_test.rb index 682abbea6..4699a7f8d 100644 --- a/test/browser/manage_test.rb +++ b/test/browser/manage_test.rb @@ -184,8 +184,8 @@ class ManageTest < TestCase :value => 2, }, { - :execute => 'accept', - :element => :alert, + :execute => 'click', + :css => '.modal .submit', }, { :execute => 'wait', diff --git a/test/browser_test_helper.rb b/test/browser_test_helper.rb index cc5f4036a..0a5f90035 100644 --- a/test/browser_test_helper.rb +++ b/test/browser_test_helper.rb @@ -245,14 +245,15 @@ class TestCase < Test::Unit::TestCase assert( false, "(#{test[:name]}) no login box found!" ) return elsif action[:execute] == 'watch_for' - (1..24).each { |loop| + text = '' + (1..36).each { |loop| element = instance.find_element( { :css => action[:area] } ) text = element.text if text =~ /#{action[:value]}/i assert( true, "(#{test[:name]}) '#{action[:value]}' found in '#{text}'" ) return end - sleep 0.5 + sleep 0.33 } assert( false, "(#{test[:name]}) '#{action[:value]}' found in '#{text}'" ) return