simple_form_extension 1.2.19 → 1.2.20

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,6 +6,7 @@
6
6
  #= require jasny-bootstrap
7
7
  #= require jquery.datetimepicker
8
8
  #= require bootstrap-slider
9
+ #= require bootstrap-colorpicker
9
10
  #= require_self
10
11
  #= require_tree ./simple_form_extension
11
12
 
@@ -0,0 +1,13 @@
1
+ class ColorPicker
2
+ constructor: (@$el) ->
3
+ @$el.colorpicker()
4
+
5
+ $.fn.simpleFormColorpicker = ->
6
+ @each (i, el) ->
7
+ $input = $(el)
8
+ return if $input.data('simple-form:colorpicker')
9
+ instance = new ColorPicker($input)
10
+ $input.data('simple-form:colorpicker', instance)
11
+
12
+ onPageReady ->
13
+ $('[data-colorpicker]').simpleFormColorpicker()
@@ -3,7 +3,7 @@ class Selectize
3
3
  selectizeDefaults: ->
4
4
  mode: if @single then 'single' else 'multi'
5
5
  maxItems: if @single then 1 else @$el.data('max-items')
6
- sortField: 'text'
6
+ sortField: @$el.data('sort-field')
7
7
  plugins: ['remove_button']
8
8
  create: @$el.data('creatable')
9
9
  render: @renderOptions()
@@ -0,0 +1,227 @@
1
+ /*!
2
+ * Bootstrap Colorpicker
3
+ * http://mjolnic.github.io/bootstrap-colorpicker/
4
+ *
5
+ * Originally written by (c) 2012 Stefan Petre
6
+ * Licensed under the Apache License v2.0
7
+ * http://www.apache.org/licenses/LICENSE-2.0.txt
8
+ *
9
+ */
10
+
11
+ .colorpicker-saturation {
12
+ float: left;
13
+ width: 100px;
14
+ height: 100px;
15
+ cursor: crosshair;
16
+ background-image: image-url("simple_form_extension/bootstrap-colorpicker/saturation.png");
17
+ }
18
+
19
+ .colorpicker-saturation i {
20
+ position: absolute;
21
+ top: 0;
22
+ left: 0;
23
+ display: block;
24
+ width: 5px;
25
+ height: 5px;
26
+ margin: -4px 0 0 -4px;
27
+ border: 1px solid #000;
28
+ -webkit-border-radius: 5px;
29
+ -moz-border-radius: 5px;
30
+ border-radius: 5px;
31
+ }
32
+
33
+ .colorpicker-saturation i b {
34
+ display: block;
35
+ width: 5px;
36
+ height: 5px;
37
+ border: 1px solid #fff;
38
+ -webkit-border-radius: 5px;
39
+ -moz-border-radius: 5px;
40
+ border-radius: 5px;
41
+ }
42
+
43
+ .colorpicker-hue,
44
+ .colorpicker-alpha {
45
+ float: left;
46
+ width: 15px;
47
+ height: 100px;
48
+ margin-bottom: 4px;
49
+ margin-left: 4px;
50
+ cursor: row-resize;
51
+ }
52
+
53
+ .colorpicker-hue i,
54
+ .colorpicker-alpha i {
55
+ position: absolute;
56
+ top: 0;
57
+ left: 0;
58
+ display: block;
59
+ width: 100%;
60
+ height: 1px;
61
+ margin-top: -1px;
62
+ background: #000;
63
+ border-top: 1px solid #fff;
64
+ }
65
+
66
+ .colorpicker-hue {
67
+ background-image: image-url("simple_form_extension/bootstrap-colorpicker/hue.png");
68
+ }
69
+
70
+ .colorpicker-alpha {
71
+ display: none;
72
+ background-image: image-url("simple_form_extension/bootstrap-colorpicker/alpha.png");
73
+ }
74
+
75
+ .colorpicker {
76
+ top: 0;
77
+ left: 0;
78
+ z-index: 2500;
79
+ min-width: 130px;
80
+ padding: 4px;
81
+ margin-top: 1px;
82
+ -webkit-border-radius: 4px;
83
+ -moz-border-radius: 4px;
84
+ border-radius: 4px;
85
+ *zoom: 1;
86
+ }
87
+
88
+ .colorpicker:before,
89
+ .colorpicker:after {
90
+ display: table;
91
+ line-height: 0;
92
+ content: "";
93
+ }
94
+
95
+ .colorpicker:after {
96
+ clear: both;
97
+ }
98
+
99
+ .colorpicker:before {
100
+ position: absolute;
101
+ top: -7px;
102
+ left: 6px;
103
+ display: inline-block;
104
+ border-right: 7px solid transparent;
105
+ border-bottom: 7px solid #ccc;
106
+ border-left: 7px solid transparent;
107
+ border-bottom-color: rgba(0, 0, 0, 0.2);
108
+ content: '';
109
+ }
110
+
111
+ .colorpicker:after {
112
+ position: absolute;
113
+ top: -6px;
114
+ left: 7px;
115
+ display: inline-block;
116
+ border-right: 6px solid transparent;
117
+ border-bottom: 6px solid #ffffff;
118
+ border-left: 6px solid transparent;
119
+ content: '';
120
+ }
121
+
122
+ .colorpicker div {
123
+ position: relative;
124
+ }
125
+
126
+ .colorpicker.colorpicker-with-alpha {
127
+ min-width: 140px;
128
+ }
129
+
130
+ .colorpicker.colorpicker-with-alpha .colorpicker-alpha {
131
+ display: block;
132
+ }
133
+
134
+ .colorpicker-color {
135
+ height: 10px;
136
+ margin-top: 5px;
137
+ clear: both;
138
+ background-image: image-url("simple_form_extension/bootstrap-colorpicker/alpha.png");
139
+ background-position: 0 100%;
140
+ }
141
+
142
+ .colorpicker-color div {
143
+ height: 10px;
144
+ }
145
+
146
+ .colorpicker-element .input-group-addon i,
147
+ .colorpicker-element .add-on i {
148
+ display: inline-block;
149
+ width: 16px;
150
+ height: 16px;
151
+ vertical-align: text-top;
152
+ cursor: pointer;
153
+ }
154
+
155
+ .colorpicker.colorpicker-inline {
156
+ position: relative;
157
+ z-index: auto;
158
+ display: inline-block;
159
+ float: none;
160
+ }
161
+
162
+ .colorpicker.colorpicker-horizontal {
163
+ width: 110px;
164
+ height: auto;
165
+ min-width: 110px;
166
+ }
167
+
168
+ .colorpicker.colorpicker-horizontal .colorpicker-saturation {
169
+ margin-bottom: 4px;
170
+ }
171
+
172
+ .colorpicker.colorpicker-horizontal .colorpicker-color {
173
+ width: 100px;
174
+ }
175
+
176
+ .colorpicker.colorpicker-horizontal .colorpicker-hue,
177
+ .colorpicker.colorpicker-horizontal .colorpicker-alpha {
178
+ float: left;
179
+ width: 100px;
180
+ height: 15px;
181
+ margin-bottom: 4px;
182
+ margin-left: 0;
183
+ cursor: col-resize;
184
+ }
185
+
186
+ .colorpicker.colorpicker-horizontal .colorpicker-hue i,
187
+ .colorpicker.colorpicker-horizontal .colorpicker-alpha i {
188
+ position: absolute;
189
+ top: 0;
190
+ left: 0;
191
+ display: block;
192
+ width: 1px;
193
+ height: 15px;
194
+ margin-top: 0;
195
+ background: #ffffff;
196
+ border: none;
197
+ }
198
+
199
+ .colorpicker.colorpicker-horizontal .colorpicker-hue {
200
+ background-image: image-url("simple_form_extension/bootstrap-colorpicker/hue-horizontal.png");
201
+ }
202
+
203
+ .colorpicker.colorpicker-horizontal .colorpicker-alpha {
204
+ background-image: image-url("simple_form_extension/bootstrap-colorpicker/alpha-horizontal.png");
205
+ }
206
+
207
+ .colorpicker.colorpicker-hidden {
208
+ display: none;
209
+ }
210
+
211
+ .colorpicker.colorpicker-visible {
212
+ display: block;
213
+ }
214
+
215
+ .colorpicker-inline.colorpicker-visible {
216
+ display: inline-block;
217
+ }
218
+
219
+ .colorpicker-right:before {
220
+ right: 6px;
221
+ left: auto;
222
+ }
223
+
224
+ .colorpicker-right:after {
225
+ right: 7px;
226
+ left: auto;
227
+ }
@@ -5,3 +5,4 @@
5
5
  //= require jquery.datetimepicker
6
6
  //= require jasny-bootstrap
7
7
  //= require bootstrap-slider
8
+ //= require bootstrap-colorpicker
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.2.19
4
+ version: 1.2.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre Vasseur
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-07 00:00:00.000000000 Z
11
+ date: 2015-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -147,12 +147,21 @@ files:
147
147
  - lib/simple_form_extension/translations.rb
148
148
  - lib/simple_form_extension/version.rb
149
149
  - simple_form_extension.gemspec
150
+ - vendor/.DS_Store
151
+ - vendor/assets/.DS_Store
152
+ - vendor/assets/images/simple_form_extension/bootstrap-colorpicker/alpha-horizontal.png
153
+ - vendor/assets/images/simple_form_extension/bootstrap-colorpicker/alpha.png
154
+ - vendor/assets/images/simple_form_extension/bootstrap-colorpicker/hue-horizontal.png
155
+ - vendor/assets/images/simple_form_extension/bootstrap-colorpicker/hue.png
156
+ - vendor/assets/images/simple_form_extension/bootstrap-colorpicker/saturation.png
150
157
  - vendor/assets/javascripts/.DS_Store
158
+ - vendor/assets/javascripts/bootstrap-colorpicker.js
151
159
  - vendor/assets/javascripts/bootstrap-slider.js
152
160
  - vendor/assets/javascripts/jasny-bootstrap.js
153
161
  - vendor/assets/javascripts/jquery.datetimepicker.js
154
162
  - vendor/assets/javascripts/simple_form_extension.coffee
155
163
  - vendor/assets/javascripts/simple_form_extension/.DS_Store
164
+ - vendor/assets/javascripts/simple_form_extension/colorpicker.coffee
156
165
  - vendor/assets/javascripts/simple_form_extension/datetimepicker.coffee
157
166
  - vendor/assets/javascripts/simple_form_extension/fileinput.coffee
158
167
  - vendor/assets/javascripts/simple_form_extension/redactor.coffee
@@ -160,9 +169,10 @@ files:
160
169
  - vendor/assets/javascripts/simple_form_extension/slider.coffee
161
170
  - vendor/assets/javascripts/simple_form_extension/spinbox.coffee
162
171
  - vendor/assets/javascripts/spinbox.js
163
- - vendor/assets/stylesheets/bootstrap-slider.css
164
- - vendor/assets/stylesheets/jasny-bootstrap.css
165
- - vendor/assets/stylesheets/jquery.datetimepicker.css
172
+ - vendor/assets/stylesheets/bootstrap-colorpicker.scss
173
+ - vendor/assets/stylesheets/bootstrap-slider.scss
174
+ - vendor/assets/stylesheets/jasny-bootstrap.scss
175
+ - vendor/assets/stylesheets/jquery.datetimepicker.scss
166
176
  - vendor/assets/stylesheets/simple_form_extension.sass
167
177
  homepage: http://www.glyph.fr
168
178
  licenses: