rails-web-console 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/views/console/index.html.erb +1 -1
- data/public/javascripts/console.js +5 -1
- metadata +5 -5
@@ -1,3 +1,3 @@
|
|
1
1
|
<textarea id="script" rows="10" cols="80"><%= session[:script] %></textarea>
|
2
|
-
<div><input type="button" value="Clear (
|
2
|
+
<div><input type="button" value="Clear (Esc, Esc)" id="clearResults" /><input type="button" value="Run (Ctrl+Enter)" id="runScript" /></div>
|
3
3
|
<div id="results"></div>
|
@@ -1,3 +1,4 @@
|
|
1
|
+
var lastEscTime = 0
|
1
2
|
jQuery(function($) {
|
2
3
|
$('#clearResults').click(function() { $('#results').empty() })
|
3
4
|
$('#runScript').click(function() {
|
@@ -7,6 +8,9 @@ jQuery(function($) {
|
|
7
8
|
})
|
8
9
|
$('#script').keydown(function(ev) {
|
9
10
|
if (ev.ctrlKey && ev.keyCode == 13) $('#runScript').click() // Ctrl + Enter
|
10
|
-
if (ev.
|
11
|
+
if (ev.keyCode == 27) {
|
12
|
+
if (new Date().getTime() - lastEscTime < 1000) $('#clearResults').click() // Esc, Esc within a second
|
13
|
+
lastEscTime = new Date().getTime()
|
14
|
+
}
|
11
15
|
})
|
12
16
|
})
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 4
|
9
|
+
version: 0.0.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Rodrigo Rosenfeld Rosas
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-11-
|
17
|
+
date: 2010-11-22 00:00:00 -02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|
@@ -40,8 +40,8 @@ homepage: https://github.com/rosenfeld/rails-web-console
|
|
40
40
|
licenses: []
|
41
41
|
|
42
42
|
post_install_message:
|
43
|
-
rdoc_options:
|
44
|
-
|
43
|
+
rdoc_options: []
|
44
|
+
|
45
45
|
require_paths:
|
46
46
|
- lib
|
47
47
|
required_ruby_version: !ruby/object:Gem::Requirement
|