jsonrpc2 0.0.9 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/jsonrpc2/html.rb CHANGED
@@ -15,6 +15,7 @@ module JSONRPC2
15
15
  <title>#{title}</title>
16
16
  #{options[:head]}
17
17
  <link rel="stylesheet" href="#{request.script_name}/_assets/css/bootstrap.min.css">
18
+ <script src="#{request.script_name}/_assets/js/jquery-1.10.2.min.js"></script>
18
19
  <script src="#{request.script_name}/_assets/js/bootstrap.min.js"></script>
19
20
  <style>
20
21
  body {
@@ -22,7 +23,7 @@ module JSONRPC2
22
23
  }
23
24
  </style>
24
25
  </head>
25
- <body>
26
+ <body>
26
27
  <div class="navbar navbar-fixed-top">
27
28
  <div class="navbar-inner">
28
29
  <div class="container">
@@ -100,7 +101,7 @@ EOM
100
101
  end
101
102
  else
102
103
  body = RedCloth.new(interface.to_textile).to_html.gsub(/\<h3\>(.*?)\<\/h3\>/, '<h3><a href="'+request.script_name+'/\1">\1</a></h3>')
103
- [200, {'Content-Type' => 'text/html'},
104
+ [200, {'Content-Type' => 'text/html'},
104
105
  html5('Interface: '+interface.name.to_s, body, :request => request)]
105
106
  end
106
107
  end
@@ -171,7 +172,7 @@ EOS
171
172
  url = CGI.unescapeHTML(str)[1...-1]
172
173
  %Q["<a href="#{CGI.escapeHTML(url)}">#{CGI.escapeHTML(url)}</a>"]
173
174
  end
174
- rescue Exception => e
175
+ rescue Exception
175
176
  CGI.escapeHTML(result.to_s)
176
177
  end
177
178
  end