rails_admin_robots_txt 0.1.0.2 → 0.1.0.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: fca7ce124f97c3644107b63a9e2592089f3b159a
|
4
|
+
data.tar.gz: d4139bb219116583e2e077b249976319f2678b79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 127d3d2b42f8cc6a46dc43c8f831d855455e24a59951297ab508d3699fec8bbea18b8a139e5833a099075ecb72ca4d43b66faaf96c3cd75313f73c915b0ca1a3
|
7
|
+
data.tar.gz: 009373eff3abf4c9f18327731d6386bafbe7d24bd0e07b484febd338dd9884d2aa8faa458093ff0e6bd84def6c9e06cdd24c68ae1328f21745d6d8b851c160d6
|
@@ -32,6 +32,16 @@ module RailsAdmin
|
|
32
32
|
if request.get?
|
33
33
|
text = File.read(Rails.root.join("public", "robots.txt"))
|
34
34
|
|
35
|
+
# https://github.com/javierjulio/textarea-autosize/blob/master/src/jquery.textarea_autosize.js
|
36
|
+
onkeyup = [
|
37
|
+
"diff = ",
|
38
|
+
"parseInt($(this).css('paddingBottom')) + ",
|
39
|
+
"parseInt($(this).css('paddingTop')) + ",
|
40
|
+
"parseInt($(this).css('borderTopWidth')) + ",
|
41
|
+
"parseInt($(this).css('borderBottomWidth')) || 0; ",
|
42
|
+
"$(this).height(0).height(this.scrollHeight - diff);"
|
43
|
+
]
|
44
|
+
|
35
45
|
# {value: text, cols: 80..150, cols: 5..20}
|
36
46
|
@textarea_opts = {value: text}
|
37
47
|
@textarea_opts[:cols] = text.lines.map(&:size).max || 80
|
@@ -40,6 +50,8 @@ module RailsAdmin
|
|
40
50
|
@textarea_opts[:rows] = text.lines.count + 1
|
41
51
|
@textarea_opts[:rows] = 5 if @textarea_opts[:rows] < 5
|
42
52
|
@textarea_opts[:rows] = 20 if @textarea_opts[:rows] > 20
|
53
|
+
@textarea_opts[:onkeyup] = onkeyup.join
|
54
|
+
@textarea_opts[:oninput] = onkeyup.join
|
43
55
|
|
44
56
|
render action: @action.template_name
|
45
57
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_admin_robots_txt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Kiseliev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|