simple_form_extension 1.0.1 → 1.0.2
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.
- checksums.yaml +4 -4
- data/lib/generators/simple_form_extension/install_generator.rb +1 -0
- data/lib/generators/simple_form_extension/templates/config/locales/simple_form_extension.fr.yml +9 -0
- data/lib/simple_form_extension/inputs/file_input.rb +2 -2
- data/lib/simple_form_extension/inputs/image_input.rb +2 -2
- data/lib/simple_form_extension/translations.rb +1 -1
- data/lib/simple_form_extension/version.rb +1 -1
- data/vendor/assets/javascripts/simple_form_extension/redactor.coffee +15 -8
- data/vendor/assets/javascripts/simple_form_extension.coffee +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea59ede6a94b45cc916f9893e98d6d52d14d82fb
|
4
|
+
data.tar.gz: 468d96632eec854fe28ed4418de68d70a611d156
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a33fa18e43b25bb9b5e47803f34965969650095f60bce5ff942502fdf36fc4930923f3e78955835f82d26f0ad88dd12f94d6c17124130ce75a44ba7404402af9
|
7
|
+
data.tar.gz: 80e416972028cf6a8e2d317f2dc17a0df8718e068b1342ad3bd0cd2234a326d96ed7a3e1d5e51facecdc3d7a5731bd755f655654860c900305b8e1bfd3673ece
|
@@ -13,8 +13,8 @@ module SimpleFormExtension
|
|
13
13
|
</div>
|
14
14
|
<div class=\"input-group-btn\">
|
15
15
|
<div class=\"btn btn-default btn-file\" type=\"button\">
|
16
|
-
<span class=\"fileinput-new\">#{
|
17
|
-
<span class=\"fileinput-exists\">#{
|
16
|
+
<span class=\"fileinput-new\">#{ _translate('file.select') }</span>
|
17
|
+
<span class=\"fileinput-exists\">#{ _translate('file.change') }</span>
|
18
18
|
#{@builder.file_field(attribute_name, input_html_options)}
|
19
19
|
</div>
|
20
20
|
<button class=\"btn btn-danger fileinput-exists\" data-dismiss=\"fileinput\" type=\"button\"><i class=\"fa fa-times\"></i></button>
|
@@ -9,8 +9,8 @@ module SimpleFormExtension
|
|
9
9
|
"<div class=\"fileinput fileinput-new\" data-provides=\"fileinput\">
|
10
10
|
<div class=\"\">
|
11
11
|
<div class=\"btn btn-default btn-file\" type=\"button\">
|
12
|
-
<span class=\"fileinput-new\">#{
|
13
|
-
<span class=\"fileinput-exists\">#{
|
12
|
+
<span class=\"fileinput-new\">#{ _translate('image.select') }</span>
|
13
|
+
<span class=\"fileinput-exists\">#{ _translate('image.change') }</span>
|
14
14
|
#{@builder.file_field(attribute_name, input_html_options)}
|
15
15
|
</div>
|
16
16
|
<button class=\"btn btn-danger fileinput-exists pull-right\" data-dismiss=\"fileinput\" type=\"button\"><i class=\"fa fa-times\"></i></button>
|
@@ -5,12 +5,19 @@ initRedactor = ->
|
|
5
5
|
if (csrf_param isnt undefined and csrf_token isnt undefined)
|
6
6
|
params = csrf_param + "=" + encodeURIComponent(csrf_token);
|
7
7
|
|
8
|
-
$('[data-redactor]').
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
$('[data-redactor]').each (i, el) ->
|
9
|
+
$textArea = $(el)
|
10
|
+
# Avoid double initialization
|
11
|
+
unless $textArea.data('initialized.redactor')
|
12
|
+
$textArea.redactor
|
13
|
+
imageUpload: ["/redactor_rails/pictures", params].join('?')
|
14
|
+
imageGetJson: "/redactor_rails/pictures"
|
15
|
+
path: "/assets/redactor-rails"
|
16
|
+
css: "style.css"
|
17
|
+
$textArea.data('initialized.redactor', true)
|
14
18
|
|
15
|
-
|
16
|
-
$(
|
19
|
+
|
20
|
+
$(document).ready ->
|
21
|
+
initRedactor() if Turbolinks is undefined
|
22
|
+
|
23
|
+
$(document).on('page:change', initRedactor);
|
@@ -1,2 +1,2 @@
|
|
1
|
-
#= require redactor-rails/redactor
|
1
|
+
#= require redactor-rails/redactor.min
|
2
2
|
#= require_tree ./simple_form_extension
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_form_extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexandre Vasseur
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -96,6 +96,7 @@ files:
|
|
96
96
|
- lib/generators/simple_form_extension/install_generator.rb
|
97
97
|
- lib/generators/simple_form_extension/templates/config/initializers/simple_form_extension.rb
|
98
98
|
- lib/generators/simple_form_extension/templates/config/locales/simple_form_extension.en.yml
|
99
|
+
- lib/generators/simple_form_extension/templates/config/locales/simple_form_extension.fr.yml
|
99
100
|
- lib/simple_form_extension.rb
|
100
101
|
- lib/simple_form_extension/.DS_Store
|
101
102
|
- lib/simple_form_extension/components.rb
|