Fixed several small bugs.

This commit is contained in:
Martin Edenhofer 2014-11-17 11:35:36 +01:00
parent 4557979d6f
commit 851f0ef912
4 changed files with 38 additions and 33 deletions

View file

@ -143,11 +143,6 @@ class Admin extends App.ControllerContent
}
)
@Config.set('system_init_done', true)
App.Event.trigger 'notify', {
type: 'success'
msg: App.i18n.translateContent( 'Welcome to %s!', @Config.get('product_name') )
timeout: 2500
}
fail: (data) =>
@formEnable(e)
@ -540,7 +535,7 @@ class ChannelEmail extends App.ControllerContent
@enable(e)
)
verify: (account) =>
verify: (account, count = 0) =>
@showSlide('js-verify')
@hideAlert('js-verify')
@ -555,7 +550,14 @@ class ChannelEmail extends App.ControllerContent
if data.result is 'ok'
@navigate 'getting_started/agents'
else
@showAlert('js-verify', data.message_human || data.message )
if count is 1
@showAlert('js-verify', data.message_human || data.message )
@delay(
=> @showSlide('js-inbound')
2300
)
else
@verify( @account, count + 1 )
@enable(e)
fail: =>
@enable(e)

View file

@ -8,10 +8,10 @@
<div class="wizard-buttonList vertical">
<% for adapter in @adapters: %>
<div class="btn auth_provider auth_provider--wide <%= adapter.class %>">
<a href="<%= adapter.link %>" class="btn auth_provider auth_provider--wide <%= adapter.class %>">
<div class="<%= adapter.class %> provider_icon"></div>
<a class="provider_name" href="<%= adapter.link %>"><%- @T( adapter.name ) %></a>
</div>
<div class="provider_name"><%- @T( adapter.name ) %></div>
</a>
<% end %>
</div>

View file

@ -198,7 +198,7 @@ curl http://localhost/api/v1/getting_started -v -u #{login}:#{password}
# probe inbound
result = email_probe_inbound( settings[:inbound] )
if !result
if result[:result] != 'ok'
render :json => result
return
end
@ -355,7 +355,7 @@ curl http://localhost/api/v1/getting_started -v -u #{login}:#{password}
puts "PROBE: #{config.inspect}"
result = email_probe_inbound( config )
puts "RESULT: #{result.inspect}"
if !result
if result[:result] == 'ok'
success = true
settings[:inbound] = config
break
@ -539,14 +539,9 @@ curl http://localhost/api/v1/getting_started -v -u #{login}:#{password}
# connection test
result = email_probe_outbound( params, params[:email] )
if result[:result] != 'ok'
render :json => result
return
end
# return result
render :json => {
:result => 'ok',
:result => result
}
end
@ -565,14 +560,9 @@ curl http://localhost/api/v1/getting_started -v -u #{login}:#{password}
# connection test
result = email_probe_inbound( params )
if result
render :json => result
return
end
render :json => {
:result => 'ok',
}
render :json => result
return
end
def email_verify
@ -683,10 +673,10 @@ curl http://localhost/api/v1/getting_started -v -u #{login}:#{password}
# test connection
translationMap = {
'authentication failed' => 'Authentication failed!',
'authentication failed' => 'Authentication failed!',
'getaddrinfo: nodename nor servname provided, or not known' => 'Hostname not found!',
'No route to host' => 'No route to host!',
'Connection refused' => 'Connection refused!',
'No route to host' => 'No route to host!',
'Connection refused' => 'Connection refused!',
}
if params[:adapter] == 'smtp'
begin
@ -711,6 +701,7 @@ curl http://localhost/api/v1/getting_started -v -u #{login}:#{password}
if e.message =~ /#{Regexp.escape(key)}/i
result = {
:result => 'ok',
:notice => e.message,
}
return result
end
@ -728,7 +719,10 @@ curl http://localhost/api/v1/getting_started -v -u #{login}:#{password}
}
return result
end
return
result = {
:result => 'ok',
}
return result
end
begin
@ -755,7 +749,10 @@ curl http://localhost/api/v1/getting_started -v -u #{login}:#{password}
}
return result
end
return
result = {
:result => 'ok',
}
return result
end
def email_probe_inbound(params)
@ -789,7 +786,10 @@ curl http://localhost/api/v1/getting_started -v -u #{login}:#{password}
}
return result
end
return
result = {
:result => 'ok',
}
return result
end
begin
@ -808,7 +808,10 @@ curl http://localhost/api/v1/getting_started -v -u #{login}:#{password}
}
return result
end
return
result = {
:result => 'ok',
}
return result
end
def mxers(domain)

View file

@ -49,7 +49,7 @@ Setting.create_if_not_exists(
},
],
},
:state => 'Example Inc.',
:state => '',
:frontend => true
)