parent
1043ad3e29
commit
81e2bcc3b1
@ -1,4 +1,2 @@ |
||||
##= require jquery2 |
||||
##= require jquery_ujs |
||||
##= require bootstrap/dropdown |
||||
##= require_tree . |
||||
|
@ -1,12 +0,0 @@ |
||||
$ -> |
||||
submit = -> |
||||
host = $('#check_host').val() |
||||
type = $('#check_type').val() |
||||
window.location.href = "<%= Rails.configuration.relative_url_root %>/#{type}/#{host}" |
||||
|
||||
$('#check_host').keypress (e) -> |
||||
submit() if e.which == 13 |
||||
return |
||||
$('#check_submit').click -> |
||||
submit() |
||||
return |
@ -1,3 +0,0 @@ |
||||
# Place all the behaviors and hooks related to the matching controller here. |
||||
# All this logic will automatically be available in application.js. |
||||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
@ -1,16 +0,0 @@ |
||||
$ -> |
||||
ssh_submit = -> |
||||
host = $('#ssh_check_host').val() |
||||
port = $('#ssh_check_port').val() |
||||
port = 22 if port == '' |
||||
window.location.href = "<%= Rails.configuration.relative_url_root %>/ssh/#{host}:#{port}" |
||||
|
||||
$('#ssh_check_host').keypress (e) -> |
||||
ssh_submit() if e.which == 13 |
||||
return |
||||
$('#ssh_check_port').keypress (e) -> |
||||
ssh_submit() if e.which == 13 |
||||
return |
||||
$('#ssh_check_submit').click -> |
||||
ssh_submit() |
||||
return |
@ -1,18 +0,0 @@ |
||||
$ -> |
||||
tls_submit = -> |
||||
host = $('#tls_check_host').val() |
||||
port = $('#tls_check_port').val() |
||||
if port == '' |
||||
alert 'Veuillez saisir un port' |
||||
return |
||||
window.location.href = "<%= Rails.configuration.relative_url_root %>/tls/#{host}:#{port}" |
||||
|
||||
$('#tls_check_host').keypress (e) -> |
||||
tls_submit() if e.which == 13 |
||||
return |
||||
$('#tls_check_port').keypress (e) -> |
||||
tls_submit() if e.which == 13 |
||||
return |
||||
$('#tls_check_submit').click -> |
||||
tls_submit() |
||||
return |
@ -1,3 +0,0 @@ |
||||
# Place all the behaviors and hooks related to the matching controller here. |
||||
# All this logic will automatically be available in application.js. |
||||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
@ -1,25 +0,0 @@ |
||||
Rails.application.assets.context_class.class_eval do |
||||
def path(name, params=[], **options) |
||||
helper = "#{name}_path" |
||||
names = [] |
||||
replace = [] |
||||
params.each_with_index do |n, p| |
||||
arg = "__p#{p}__" |
||||
names << arg |
||||
replace << [arg, "\#{#{n}}"] |
||||
end |
||||
query_params = options.delete :params |
||||
unless query_params.nil? |
||||
query_params.each_with_index do |n, p| |
||||
arg = "__q#{p}__" |
||||
names << arg |
||||
replace << [arg, "\#{#{n}}"] |
||||
options[n] = arg |
||||
end |
||||
end |
||||
|
||||
path = Rails.application.routes.url_helpers.send helper, *names, **options |
||||
replace.each { |p, n| path.sub! p, n } |
||||
"#{config.relative_url_root}#{path}" |
||||
end |
||||
end |
Loading…
Reference in new issue