rest_in_place 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -166,11 +166,13 @@ class RestInPlaceEditor
|
|
166
166
|
RestInPlaceEditor.forms =
|
167
167
|
"input" :
|
168
168
|
activateForm : ->
|
169
|
-
@$element.html("""<form action="javascript:void(0)" style="display:inline;"><input type="text" value="#{$.trim(@oldValue)}"></form>""")
|
169
|
+
@$element.html("""<form action="javascript:void(0)" style="display:inline;"><input type="text" value="#{$.trim(@oldValue)}" class="rest-in-place-#{@attributeName}"></form>""")
|
170
170
|
@$element.find('input')[0].select()
|
171
171
|
@$element.find("form").submit =>
|
172
172
|
@update()
|
173
173
|
false
|
174
|
+
@$element.find("input").keyup (e) =>
|
175
|
+
@abort() if e.keyCode == ESC_KEY
|
174
176
|
@$element.find("input").blur => @abort()
|
175
177
|
|
176
178
|
getValue : ->
|
@@ -178,8 +180,10 @@ RestInPlaceEditor.forms =
|
|
178
180
|
|
179
181
|
"textarea" :
|
180
182
|
activateForm : ->
|
181
|
-
@$element.html("""<form action="javascript:void(0)" style="display:inline;"><textarea>#{$.trim(@oldValue)}</textarea></form>""")
|
183
|
+
@$element.html("""<form action="javascript:void(0)" style="display:inline;"><textarea class="rest-in-place-#{@attributeName}">#{$.trim(@oldValue)}</textarea></form>""")
|
182
184
|
@$element.find('textarea')[0].select()
|
185
|
+
@$element.find("textarea").keyup (e) =>
|
186
|
+
@abort() if e.keyCode == ESC_KEY
|
183
187
|
@$element.find("textarea").blur => @update()
|
184
188
|
|
185
189
|
getValue : ->
|
@@ -189,6 +193,9 @@ RestInPlaceEditor.forms =
|
|
189
193
|
#
|
190
194
|
# ### Support functionality
|
191
195
|
|
196
|
+
# Symbolic representation of the ESC Keycode
|
197
|
+
ESC_KEY = 27
|
198
|
+
|
192
199
|
# Assign jQuery shortcut
|
193
200
|
$ = jQuery
|
194
201
|
|
data/rest_in_place.gemspec
CHANGED
@@ -5,7 +5,7 @@ require "rest_in_place/version"
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "rest_in_place"
|
7
7
|
s.version = RestInPlace::VERSION
|
8
|
-
s.date = '2012-
|
8
|
+
s.date = '2012-06-07'
|
9
9
|
s.authors = ["Jan Varwig"]
|
10
10
|
s.email = ["jan@varwig.org"]
|
11
11
|
s.homepage = "http://jan.varwig.org"
|
metadata
CHANGED
@@ -1,47 +1,34 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rest_in_place
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.2
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 2
|
8
|
-
- 0
|
9
|
-
- 1
|
10
|
-
version: 2.0.1
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Jan Varwig
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-06-07 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: rails
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70360483506640 !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
segments:
|
30
|
-
- 3
|
31
|
-
- 1
|
32
|
-
version: "3.1"
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '3.1'
|
33
22
|
type: :runtime
|
34
|
-
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70360483506640
|
35
25
|
description: REST in Place is an AJAX Inplace-Editor that talks to RESTful controllers.
|
36
|
-
email:
|
26
|
+
email:
|
37
27
|
- jan@varwig.org
|
38
28
|
executables: []
|
39
|
-
|
40
29
|
extensions: []
|
41
|
-
|
42
30
|
extra_rdoc_files: []
|
43
|
-
|
44
|
-
files:
|
31
|
+
files:
|
45
32
|
- MIT-LICENSE
|
46
33
|
- README.markdown
|
47
34
|
- rest_in_place.gemspec
|
@@ -50,37 +37,28 @@ files:
|
|
50
37
|
- lib/rest_in_place/version.rb
|
51
38
|
- lib/rest_in_place.rb
|
52
39
|
homepage: http://jan.varwig.org
|
53
|
-
licenses:
|
40
|
+
licenses:
|
54
41
|
- MIT
|
55
42
|
post_install_message:
|
56
43
|
rdoc_options: []
|
57
|
-
|
58
|
-
require_paths:
|
44
|
+
require_paths:
|
59
45
|
- lib
|
60
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
46
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
61
47
|
none: false
|
62
|
-
requirements:
|
63
|
-
- -
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
|
66
|
-
|
67
|
-
- 0
|
68
|
-
version: "0"
|
69
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - ! '>='
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0'
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
53
|
none: false
|
71
|
-
requirements:
|
72
|
-
- -
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
|
75
|
-
segments:
|
76
|
-
- 0
|
77
|
-
version: "0"
|
54
|
+
requirements:
|
55
|
+
- - ! '>='
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '0'
|
78
58
|
requirements: []
|
79
|
-
|
80
59
|
rubyforge_project:
|
81
60
|
rubygems_version: 1.8.11
|
82
61
|
signing_key:
|
83
62
|
specification_version: 3
|
84
63
|
summary: An AJAX Inplace-Editor for the Rails 3.1 asset pipeline.
|
85
64
|
test_files: []
|
86
|
-
|