jquery-minicolors-rails 0.0.1 → 0.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 +15 -0
- data/README.md +15 -1
- data/app/inputs/minicolors_input.rb +1 -1
- data/lib/jquery-minicolors-rails/version.rb +1 -1
- data/vendor/assets/images/jquery-minicolors/jquery.minicolors.png +0 -0
- data/vendor/assets/javascripts/jquery-minicolors-simple_form.js +6 -0
- data/vendor/assets/javascripts/jquery-minicolors.js +851 -561
- data/vendor/assets/stylesheets/jquery-minicolors.css.erb +277 -64
- metadata +7 -23
- data/vendor/assets/images/jquery-minicolors/circle.gif +0 -0
- data/vendor/assets/images/jquery-minicolors/gradient.png +0 -0
- data/vendor/assets/images/jquery-minicolors/line.gif +0 -0
- data/vendor/assets/images/jquery-minicolors/rainbow.png +0 -0
- data/vendor/assets/images/jquery-minicolors/trigger.png +0 -0
- data/vendor/assets/javascripts/jquery-minicolors-simple_form.js.coffee +0 -2
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NTUyYzRiNjM3ZWYwM2JjNDI5ODgzOWM1YWI2OTJhNWVkNmU5NmUwNA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
Y2UyZTI5YzA4OGVjYjg3OTA3YTNjN2I1ZTAxOGYzZTg4ZTJkMDZhMw==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MzgzYmE3M2M0ZjdmYjZiZDBkOTE4MGRkZDZmOWE3ZjUxNzMxZjM1Y2Q5NzI0
|
10
|
+
ZTc3ZWJhYTZiYmY1N2RhNGZmMTUwMDA0ZThmMmQwOWQ5YTU5ODI5MDkwNmM5
|
11
|
+
Yzc3ZjhjZDE0ZjQ2MGViYTI3Zjc1MDRlMDgzMjk1NWQ4NWM4YTU=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NDdkMTI3ZjIxOGJiMWY4MWExZjhlYWNkYTZlZjA0MjgwMGM1ODkzZmVjN2E2
|
14
|
+
OWJhZDI0MjYwOWY0M2Y4OTRhN2I3ZWNiNDAzMjBmYjNjNDk1MGZjNTliMzQ5
|
15
|
+
MzY5MGRhODEwNDM4ZmUyYzZiZThmOWM5NWIyOTFhMjQyNmZlNzg=
|
data/README.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
This gem embedes the jQuery colorpicker plugin miniColors in the Rails asset pipeline.
|
4
4
|
|
5
|
+

|
6
|
+
|
5
7
|
See https://github.com/claviska/jquery-miniColors
|
6
8
|
|
7
9
|
## Installation
|
@@ -33,8 +35,13 @@ Add to `app/assets/stylesheets/application.css`:
|
|
33
35
|
Just call `miniColors()` with any text-input selector:
|
34
36
|
|
35
37
|
```coffeescript
|
38
|
+
// With default options:
|
39
|
+
jQuery ->
|
40
|
+
$('input[type=text]').minicolors();
|
41
|
+
|
42
|
+
// With Bootstrap theme:
|
36
43
|
jQuery ->
|
37
|
-
$('input[type=text]').
|
44
|
+
$('input[type=text]').minicolors({theme: 'bootstrap'});
|
38
45
|
```
|
39
46
|
|
40
47
|
# With SimpleForm
|
@@ -44,9 +51,16 @@ See https://github.com/plataformatec/simple_form
|
|
44
51
|
```erb
|
45
52
|
<%# app/views/balloons/_form.html.erb %>
|
46
53
|
|
54
|
+
<%# Basic usage: %>
|
47
55
|
<%= simple_form_for @balloon do |f| %>
|
48
56
|
<%= f.input :color, as: :minicolors %>
|
49
57
|
<% end %>
|
58
|
+
|
59
|
+
<%# With Bootstrap theme and swatch on the right: %>
|
60
|
+
<%= simple_form_for @balloon do |f| %>
|
61
|
+
<%= f.input :color, as: :minicolors, input_html: {data: {
|
62
|
+
minicolors: {theme: :bootstrap, swatchPosition: :right}}} %>
|
63
|
+
<% end %>
|
50
64
|
```
|
51
65
|
|
52
66
|
Add to `app/assets/javascripts/application.js`:
|
Binary file
|