edit_mode 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/assets/javascripts/edit_mode/best_in_place.js.coffee +13 -14
- data/lib/edit_mode/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2abbbd1ee56ad6b5b4526db285f126db718c0239
|
4
|
+
data.tar.gz: ca6691373d55f4bbfca3e0b9773e8df5db0f1c63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1320660acdb7d19f27fbe70763b27bb6aaac80bd864c0f7f951363c3daf87cf7b3154615ef1926f6c713c118bf39aa26ac3a443300594e79d3589a239c8d48f0
|
7
|
+
data.tar.gz: 50d4e85f52083c9302df12684fcbe9f4952889246072c8568e9edec22d1bed1cb9637ef64a97b6cd35bddddefff18327f81b66c20f749d52c43efa9b1d998995
|
data/Gemfile.lock
CHANGED
@@ -1,16 +1,3 @@
|
|
1
|
-
old_value = (best_in_place)->
|
2
|
-
if best_in_place.data('bip-original-content')?
|
3
|
-
best_in_place.data('bip-original-content')
|
4
|
-
else
|
5
|
-
null
|
6
|
-
|
7
|
-
new_value = (best_in_place)->
|
8
|
-
v = best_in_place.find('input').val() if best_in_place.find('input').length > 0
|
9
|
-
v = best_in_place.find('textarea').text() if best_in_place.find('textarea').length > 0
|
10
|
-
v = best_in_place.find('select').find(":selected").text() if best_in_place.find('select').length > 0
|
11
|
-
v = null if v == ""
|
12
|
-
return v
|
13
|
-
|
14
1
|
$(document).ready ->
|
15
2
|
|
16
3
|
jQuery.fn.apply_best_in_place = ->
|
@@ -43,10 +30,22 @@ $(document).ready ->
|
|
43
30
|
|
44
31
|
$( ".best_in_place" ).apply_best_in_place()
|
45
32
|
|
33
|
+
old_value = (best_in_place)->
|
34
|
+
if best_in_place.data('bip-original-content')?
|
35
|
+
best_in_place.data('bip-original-content')
|
36
|
+
else
|
37
|
+
null
|
38
|
+
|
39
|
+
new_value = (best_in_place)->
|
40
|
+
v = best_in_place.find('input').val() if best_in_place.find('input').length > 0
|
41
|
+
v = best_in_place.find('textarea').val() if best_in_place.find('textarea').length > 0
|
42
|
+
v = best_in_place.find('select').find(":selected").text() if best_in_place.find('select').length > 0
|
43
|
+
v = null if v == ""
|
44
|
+
return v
|
45
|
+
|
46
46
|
keyUpHandler = (event) ->
|
47
47
|
if event.keyCode == 27
|
48
48
|
$( this ).closest( ".edit_mode_group" ).trigger( "cancel" )
|
49
49
|
if event.keyCode == 13
|
50
50
|
unless $( event.target ).is( "textarea" )
|
51
51
|
$( this ).closest( ".edit_mode_group" ).trigger( "save" )
|
52
|
-
|
data/lib/edit_mode/version.rb
CHANGED