Merge branch 'develop' into feature/ui2

This commit is contained in:
Martin Edenhofer 2013-09-15 23:42:12 +02:00
commit 87fcd4ef48
6 changed files with 44 additions and 13 deletions

View file

@ -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',

View file

@ -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'
)

View file

@ -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

View file

@ -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',

View file

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

View file

@ -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