};
if (select) query.select = select;
- $("#linkloader")
+
+ var iframe = $('<iframe>')
+ .hide()
+ .appendTo('body')
.attr("src", "http://127.0.0.1:8111/load_and_zoom?" + querystring.stringify(query))
- .load(function() { loaded = true; });
+ .on('load', function() {
+ $(this).remove();
+ loaded = true;
+ });
setTimeout(function () {
- if (!loaded) alert(I18n.t('site.index.remote_failed'));
+ if (!loaded) {
+ alert(I18n.t('site.index.remote_failed'));
+ iframe.remove();
+ }
}, 1000);
return false;
}
if (data.type && data.id) {
- map.addObject(data, { zoom: true, style: { opacity: 0.2, fill: false } });
+ map.addObject(data, { zoom: false, style: { opacity: 0.2, fill: false } });
}
map.markerLayer.clearLayers();
# test all routes which lead to this controller
def test_routes
assert_routing(
- { :path => "/oauth/revoke" },
+ { :path => "/oauth/revoke", :method => :post },
{ :controller => "oauth", :action => "revoke" }
)
assert_routing(
- { :path => "/oauth/authorize" },
+ { :path => "/oauth/authorize", :method => :post },
{ :controller => "oauth", :action => "authorize" }
)
assert_routing(
- { :path => "/oauth/token" },
+ { :path => "/oauth/token", :method => :get },
{ :controller => "oauth", :action => "token" }
)
assert_routing(
- { :path => "/oauth/request_token" },
+ { :path => "/oauth/request_token", :method => :get },
{ :controller => "oauth", :action => "request_token" }
)
assert_routing(
- { :path => "/oauth/access_token" },
+ { :path => "/oauth/access_token", :method => :get },
{ :controller => "oauth", :action => "access_token" }
)
assert_routing(
- { :path => "/oauth/test_request" },
+ { :path => "/oauth/test_request", :method => :get },
{ :controller => "oauth", :action => "test_request" }
)
end