bootsy 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -12
- data/app/assets/javascripts/bootsy/init.js +5 -2
- data/lib/bootsy.rb +2 -0
- data/lib/bootsy/simple_form/bootsy_input.rb +11 -0
- data/lib/bootsy/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06d4f6c3c4baaff130fb3321a969e1090706013e
|
4
|
+
data.tar.gz: 75b66ce2924940d0d4b56a236adfac9de8651c0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e50200981071659ce01e15a40ab22f19b98c0910ec187ffb07cc41830b25f997071afacf374bfbc6532455d10af75a8b9ec3582b2729f5bb3ba87deba6ff1ac4
|
7
|
+
data.tar.gz: 8e1dd14d053308773af5ca8db3cb7debe28ebf2619d8e7ac3f8f47063881cdcba67d79b5f8fab327246ac95f63871cb234f798c397694e122ff9044b4c2d2b80
|
data/README.md
CHANGED
@@ -46,10 +46,10 @@ rake db:migrate
|
|
46
46
|
Just call the brand new method `bootsy_area` in your `FormBuilder` instances, the same way you'd call the basic `textarea` method. Example:
|
47
47
|
```erb
|
48
48
|
<%= form_for(@post) do |f| %>
|
49
|
-
<%= f.label :title
|
49
|
+
<%= f.label :title %>
|
50
50
|
<%= f.text_field :title %>
|
51
51
|
|
52
|
-
<%= f.label :content
|
52
|
+
<%= f.label :content %>
|
53
53
|
<%= f.bootsy_area :content %>
|
54
54
|
|
55
55
|
<%= f.submit %>
|
@@ -74,6 +74,21 @@ def post_params
|
|
74
74
|
end
|
75
75
|
```
|
76
76
|
|
77
|
+
|
78
|
+
## Bootsy with SimpleForm builders
|
79
|
+
|
80
|
+
Just use the brand new input type `bootsy` in your `SimpleForm::FormBuilder` instances, in the same way you would use the basic `text` input. Example:
|
81
|
+
```erb
|
82
|
+
<%= simple_form_for @post do |f| %>
|
83
|
+
<%= f.input :title %>
|
84
|
+
|
85
|
+
<%= f.input :content, as: :bootsy %>
|
86
|
+
|
87
|
+
<%= f.button :submit %>
|
88
|
+
<% end %>
|
89
|
+
```
|
90
|
+
|
91
|
+
|
77
92
|
## Editor options
|
78
93
|
|
79
94
|
It is possible to customize how the editor is displayed and its behavior by passing a hash `editor_options` to your `bootsy_area`.
|
@@ -110,16 +125,6 @@ You can set the default editor options, image sizes available (small, medium, la
|
|
110
125
|
Bootsy defines some i18n keys. The english translation is automatically added to your `config/locales` directory as `bootsy.en.yml`. You can follow that template in order to translate Bootsy to your language. You can find some examples [here](https://github.com/volmer/bootsy/tree/master/config/locales). It is also necessary to add a translation for Bootstrap-wysihtml5, the javascript editor, in your assets pipeline. Instructions [here](https://github.com/jhollingworth/bootstrap-wysihtml5#i18n). If you are using the alert for unsaved changes, you have to define a translation for it as well. Just follow [this example](https://github.com/volmer/bootsy/tree/master/app/assets/bootsy/locales/bootsy.pt-BR.js).
|
111
126
|
|
112
127
|
|
113
|
-
## Mongoid support
|
114
|
-
|
115
|
-
By default, Bootsy only supports ActiveRecord. In order to use Bootsy with Mongoid, please use [Bootsy-Mongoid](https://github.com/volmer/bootsy-mongoid) instead.
|
116
|
-
|
117
|
-
|
118
|
-
## Bootsy with SimpleForm
|
119
|
-
|
120
|
-
Do you want to use Bootsy alongside with [SimpleForm](https://github.com/plataformatec/simple_form)? Take a look at [Bootsy-SimpleForm](https://github.com/volmer/bootsy-simple_form).
|
121
|
-
|
122
|
-
|
123
128
|
## License
|
124
129
|
|
125
130
|
MIT License. Copyright 2013 Volmer Soares
|
data/lib/bootsy.rb
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'simple_form'
|
2
|
+
|
3
|
+
class BootsyInput < SimpleForm::Inputs::Base
|
4
|
+
enable :placeholder, :maxlength, :container, :editor_options, :uploader
|
5
|
+
|
6
|
+
def input
|
7
|
+
bootsy_params = [:editor_options, :container, :uploader]
|
8
|
+
input_html_options.merge! input_options.select {|k,v| bootsy_params.include? k }
|
9
|
+
@builder.bootsy_area attribute_name, input_html_options
|
10
|
+
end
|
11
|
+
end
|
data/lib/bootsy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootsy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Volmer Soares
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mini_magick
|
@@ -100,28 +100,28 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '1.
|
103
|
+
version: '1.4'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '1.
|
110
|
+
version: '1.4'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: shoulda-matchers
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - ~>
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '2.
|
117
|
+
version: '2.3'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - ~>
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '2.
|
124
|
+
version: '2.3'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: selenium-webdriver
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -180,6 +180,7 @@ files:
|
|
180
180
|
- lib/bootsy/engine.rb
|
181
181
|
- lib/bootsy/form_builder.rb
|
182
182
|
- lib/bootsy/form_helper.rb
|
183
|
+
- lib/bootsy/simple_form/bootsy_input.rb
|
183
184
|
- lib/bootsy/version.rb
|
184
185
|
- lib/bootsy.rb
|
185
186
|
- lib/generators/bootsy/install_generator.rb
|