x-editable-rails 1.5.2 → 1.5.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 749654c2631947399d2e759d6eae397a31da4f47
|
4
|
+
data.tar.gz: 0c4ac3d4b3b2bb21aff16b65e1655d9fe5d3b0f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d53f30f5c112a0cac95819fc15c135869d02d9f608ee1ae01438c1bca210ca324ec861b18c45bd1e9c5d4c87b752864180e40d6c849a5266a46fe4723477b6e
|
7
|
+
data.tar.gz: ed081d33f6683905d7743fdcb92196f8b00bb2ce44fc9fc7f0fdd30552cfde3276d7dd42e58f2184ec77df4b43f2282d9e9161d9e658999f0629757a05a2bef5
|
@@ -63,11 +63,11 @@ module X
|
|
63
63
|
data.reject!{|_, value| value.nil?}
|
64
64
|
|
65
65
|
content_tag tag, class: css, title: title, data: data do
|
66
|
-
source_values_for(value, source)
|
66
|
+
safe_join(source_values_for(value.try(:html_safe), source), tag(:br)) unless %w(select checklist).include? data[:type]
|
67
67
|
end
|
68
68
|
else
|
69
|
-
|
70
|
-
error || source_values_for(value, source)
|
69
|
+
value = value.try(:html_safe) unless value.kind_of?(TrueClass) or value.kind_of?(FalseClass)
|
70
|
+
error || safe_join(source_values_for(value, source), tag(:br))
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
@@ -87,7 +87,7 @@ module X
|
|
87
87
|
value.to_s
|
88
88
|
end
|
89
89
|
|
90
|
-
value
|
90
|
+
value
|
91
91
|
end
|
92
92
|
|
93
93
|
def source_values_for(value, source = nil)
|
@@ -95,7 +95,7 @@ module X
|
|
95
95
|
|
96
96
|
values = Array.wrap(value)
|
97
97
|
|
98
|
-
if source && source.first.is_a?(String)
|
98
|
+
if source && ( source.first.is_a?(String) || source.kind_of?(Hash) )
|
99
99
|
values.map{|item| source[output_value_for item]}
|
100
100
|
else
|
101
101
|
values
|
@@ -12,11 +12,7 @@ jQuery ($) ->
|
|
12
12
|
originalUrl.call(@options.scope, params)
|
13
13
|
else if originalUrl? && @options.send != 'never'
|
14
14
|
myName = params.name
|
15
|
-
|
16
|
-
if typeof params.value == 'string'
|
17
|
-
myValue = params.value.replace(/(\r\n|\n|\r)/gm,"<br/>")
|
18
|
-
else
|
19
|
-
myValue = params.value
|
15
|
+
myValue = params.value
|
20
16
|
|
21
17
|
# if there are no values in a list, add a blank value so Rails knows all values were removed
|
22
18
|
if Object.prototype.toString.call(params.value) == '[object Array]' && params.value.length == 0
|
@@ -52,4 +48,4 @@ jQuery ($) ->
|
|
52
48
|
@saveWithoutUrlHook(value)
|
53
49
|
|
54
50
|
EditableForm.prototype.saveWithoutUrlHook = EditableForm.prototype.save
|
55
|
-
EditableForm.prototype.save = EditableForm.prototype.saveWithUrlHook
|
51
|
+
EditableForm.prototype.save = EditableForm.prototype.saveWithUrlHook
|
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: x-editable-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jiri Kolarik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '4.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '4.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: sqlite3
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
description: X-editable for Rails
|
@@ -59,12 +59,14 @@ executables: []
|
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
+
- LICENSE.txt
|
63
|
+
- README.md
|
62
64
|
- lib/generators/x_editable_rails/install_generator.rb
|
63
65
|
- lib/generators/x_editable_rails/templates/x-editable.yml
|
66
|
+
- lib/x-editable-rails.rb
|
64
67
|
- lib/x-editable-rails/configuration.rb
|
65
68
|
- lib/x-editable-rails/version.rb
|
66
69
|
- lib/x-editable-rails/view_helpers.rb
|
67
|
-
- lib/x-editable-rails.rb
|
68
70
|
- vendor/assets/images/editable/clear.png
|
69
71
|
- vendor/assets/images/editable/loading.gif
|
70
72
|
- vendor/assets/javascripts/editable/bootstrap-editable.js
|
@@ -77,10 +79,10 @@ files:
|
|
77
79
|
- vendor/assets/javascripts/editable/inputs-ext/wysihtml5.js
|
78
80
|
- vendor/assets/javascripts/editable/jquery-editable-poshytip.js
|
79
81
|
- vendor/assets/javascripts/editable/jqueryui-editable.js
|
82
|
+
- vendor/assets/javascripts/editable/rails.js.coffee
|
80
83
|
- vendor/assets/javascripts/editable/rails/data_classes.js.coffee
|
81
84
|
- vendor/assets/javascripts/editable/rails/editable_form.js.coffee
|
82
85
|
- vendor/assets/javascripts/editable/rails/error_handling.js.coffee
|
83
|
-
- vendor/assets/javascripts/editable/rails.js.coffee
|
84
86
|
- vendor/assets/stylesheets/editable/bootstrap-editable.scss
|
85
87
|
- vendor/assets/stylesheets/editable/bootstrap2-editable.scss
|
86
88
|
- vendor/assets/stylesheets/editable/inputs-ext/address.css
|
@@ -89,8 +91,6 @@ files:
|
|
89
91
|
- vendor/assets/stylesheets/editable/inputs-ext/wysiwyg-color.css
|
90
92
|
- vendor/assets/stylesheets/editable/jquery-editable.scss
|
91
93
|
- vendor/assets/stylesheets/editable/jqueryui-editable.scss
|
92
|
-
- LICENSE.txt
|
93
|
-
- README.md
|
94
94
|
homepage: https://github.com/werein/x-editable-rails
|
95
95
|
licenses:
|
96
96
|
- MIT
|
@@ -102,17 +102,17 @@ require_paths:
|
|
102
102
|
- vendor
|
103
103
|
required_ruby_version: !ruby/object:Gem::Requirement
|
104
104
|
requirements:
|
105
|
-
- -
|
105
|
+
- - ">="
|
106
106
|
- !ruby/object:Gem::Version
|
107
107
|
version: '0'
|
108
108
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
|
-
- -
|
110
|
+
- - ">="
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: '0'
|
113
113
|
requirements: []
|
114
114
|
rubyforge_project:
|
115
|
-
rubygems_version: 2.
|
115
|
+
rubygems_version: 2.2.2
|
116
116
|
signing_key:
|
117
117
|
specification_version: 4
|
118
118
|
summary: X-editable for Rails
|