creative_tim 1.0.0 → 1.0.1
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: d374832241a02c4397a6124f7becb0e94141a526
|
4
|
+
data.tar.gz: a46d2e6f6614d355e21fec13ff0938c5580ba78d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb1ffce2f89dca0117d6e0e0b589e63477bccb880a8d71c2d8f875b0a674b69593af8982b3f71896ecaf5a27a6c6286b7e5ea3087ef411efc16bcac33b1a7fa5
|
7
|
+
data.tar.gz: 9120b35ff777e77dfeee133c7b366a88c45bcf45fcfd7734036bf00d8f139b9658cc2bca7241f51432fffaf8e261efa7cf9663271255995936f0829e5b7cfeb7
|
data/lib/creative_tim/version.rb
CHANGED
@@ -1,248 +1,253 @@
|
|
1
|
-
|
1
|
+
function setupInputs() {
|
2
|
+
!function ($) {
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
var Checkbox = function (element, options) {
|
7
|
-
this.init(element, options);
|
8
|
-
}
|
4
|
+
/* CHECKBOX PUBLIC CLASS DEFINITION
|
5
|
+
* ============================== */
|
9
6
|
|
10
|
-
|
7
|
+
var Checkbox = function (element, options) {
|
8
|
+
this.init(element, options);
|
9
|
+
}
|
10
|
+
|
11
|
+
Checkbox.prototype = {
|
12
|
+
|
13
|
+
constructor: Checkbox
|
14
|
+
|
15
|
+
, init: function (element, options) {
|
16
|
+
var $el = this.$element = $(element)
|
17
|
+
|
18
|
+
this.options = $.extend({}, $.fn.checkbox.defaults, options);
|
19
|
+
$el.before(this.options.template);
|
20
|
+
this.setState();
|
21
|
+
}
|
22
|
+
|
23
|
+
, setState: function () {
|
24
|
+
var $el = this.$element
|
25
|
+
, $parent = $el.closest('.checkbox');
|
26
|
+
|
27
|
+
$el.prop('disabled') && $parent.addClass('disabled');
|
28
|
+
$el.prop('checked') && $parent.addClass('checked');
|
29
|
+
}
|
30
|
+
|
31
|
+
, toggle: function () {
|
32
|
+
var ch = 'checked'
|
33
|
+
, $el = this.$element
|
34
|
+
, $parent = $el.closest('.checkbox')
|
35
|
+
, checked = $el.prop(ch)
|
36
|
+
, e = $.Event('toggle')
|
11
37
|
|
12
|
-
|
38
|
+
if ($el.prop('disabled') == false) {
|
39
|
+
$parent.toggleClass(ch) && checked ? $el.removeAttr(ch) : $el.prop(ch, ch);
|
40
|
+
$el.trigger(e).trigger('change');
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
, setCheck: function (option) {
|
45
|
+
var d = 'disabled'
|
46
|
+
, ch = 'checked'
|
47
|
+
, $el = this.$element
|
48
|
+
, $parent = $el.closest('.checkbox')
|
49
|
+
, checkAction = option == 'check' ? true : false
|
50
|
+
, e = $.Event(option)
|
51
|
+
|
52
|
+
$parent[checkAction ? 'addClass' : 'removeClass' ](ch) && checkAction ? $el.prop(ch, ch) : $el.removeAttr(ch);
|
53
|
+
$el.trigger(e).trigger('change');
|
54
|
+
}
|
13
55
|
|
14
|
-
|
15
|
-
var $el = this.$element = $(element)
|
56
|
+
}
|
16
57
|
|
17
|
-
this.options = $.extend({}, $.fn.checkbox.defaults, options);
|
18
|
-
$el.before(this.options.template);
|
19
|
-
this.setState();
|
20
|
-
}
|
21
58
|
|
22
|
-
|
23
|
-
|
24
|
-
, $parent = $el.closest('.checkbox');
|
59
|
+
/* CHECKBOX PLUGIN DEFINITION
|
60
|
+
* ======================== */
|
25
61
|
|
26
|
-
|
27
|
-
$el.prop('checked') && $parent.addClass('checked');
|
28
|
-
}
|
62
|
+
var old = $.fn.checkbox
|
29
63
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
64
|
+
$.fn.checkbox = function (option) {
|
65
|
+
return this.each(function () {
|
66
|
+
var $this = $(this)
|
67
|
+
, data = $this.data('checkbox')
|
68
|
+
, options = $.extend({}, $.fn.checkbox.defaults, $this.data(), typeof option == 'object' && option);
|
69
|
+
if (!data) $this.data('checkbox', (data = new Checkbox(this, options)));
|
70
|
+
if (option == 'toggle') data.toggle()
|
71
|
+
if (option == 'check' || option == 'uncheck') data.setCheck(option)
|
72
|
+
else if (option) data.setState();
|
73
|
+
});
|
74
|
+
}
|
75
|
+
|
76
|
+
$.fn.checkbox.defaults = {
|
77
|
+
template: '<span class="icons"><span class="first-icon fa fa-square fa-base"></span><span class="second-icon fa fa-check-square fa-base"></span></span>'
|
78
|
+
}
|
36
79
|
|
37
|
-
if ($el.prop('disabled') == false) {
|
38
|
-
$parent.toggleClass(ch) && checked ? $el.removeAttr(ch) : $el.prop(ch, ch);
|
39
|
-
$el.trigger(e).trigger('change');
|
40
|
-
}
|
41
|
-
}
|
42
80
|
|
43
|
-
|
44
|
-
|
45
|
-
, ch = 'checked'
|
46
|
-
, $el = this.$element
|
47
|
-
, $parent = $el.closest('.checkbox')
|
48
|
-
, checkAction = option == 'check' ? true : false
|
49
|
-
, e = $.Event(option)
|
81
|
+
/* CHECKBOX NO CONFLICT
|
82
|
+
* ================== */
|
50
83
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
}
|
84
|
+
$.fn.checkbox.noConflict = function () {
|
85
|
+
$.fn.checkbox = old;
|
86
|
+
return this;
|
87
|
+
}
|
56
88
|
|
57
89
|
|
58
|
-
|
59
|
-
|
90
|
+
/* CHECKBOX DATA-API
|
91
|
+
* =============== */
|
60
92
|
|
61
|
-
|
93
|
+
$(document).on('click.checkbox.data-api', '[data-toggle^=checkbox], .checkbox', function (e) {
|
94
|
+
var $checkbox = $(e.target);
|
95
|
+
if (e.target.tagName != "A") {
|
96
|
+
e && e.preventDefault() && e.stopPropagation();
|
97
|
+
if (!$checkbox.hasClass('checkbox')) $checkbox = $checkbox.closest('.checkbox');
|
98
|
+
$checkbox.find(':checkbox').checkbox('toggle');
|
99
|
+
}
|
100
|
+
});
|
62
101
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
if (option == 'toggle') data.toggle()
|
70
|
-
if (option == 'check' || option == 'uncheck') data.setCheck(option)
|
71
|
-
else if (option) data.setState();
|
72
|
-
});
|
73
|
-
}
|
102
|
+
$(function () {
|
103
|
+
$('input[type="checkbox"]').each(function () {
|
104
|
+
var $checkbox = $(this);
|
105
|
+
$checkbox.checkbox();
|
106
|
+
});
|
107
|
+
});
|
74
108
|
|
75
|
-
|
76
|
-
template: '<span class="icons"><span class="first-icon fa fa-square fa-base"></span><span class="second-icon fa fa-check-square fa-base"></span></span>'
|
77
|
-
}
|
109
|
+
}(window.jQuery);
|
78
110
|
|
111
|
+
/* =============================================================
|
112
|
+
* flatui-radio v0.0.3
|
113
|
+
* ============================================================ */
|
79
114
|
|
80
|
-
|
81
|
-
* ================== */
|
115
|
+
!function ($) {
|
82
116
|
|
83
|
-
|
84
|
-
|
85
|
-
return this;
|
86
|
-
}
|
117
|
+
/* RADIO PUBLIC CLASS DEFINITION
|
118
|
+
* ============================== */
|
87
119
|
|
120
|
+
var Radio = function (element, options) {
|
121
|
+
this.init(element, options);
|
122
|
+
}
|
88
123
|
|
89
|
-
|
90
|
-
* =============== */
|
124
|
+
Radio.prototype = {
|
91
125
|
|
92
|
-
|
93
|
-
var $checkbox = $(e.target);
|
94
|
-
if (e.target.tagName != "A") {
|
95
|
-
e && e.preventDefault() && e.stopPropagation();
|
96
|
-
if (!$checkbox.hasClass('checkbox')) $checkbox = $checkbox.closest('.checkbox');
|
97
|
-
$checkbox.find(':checkbox').checkbox('toggle');
|
98
|
-
}
|
99
|
-
});
|
126
|
+
constructor: Radio
|
100
127
|
|
101
|
-
|
102
|
-
|
103
|
-
var $checkbox = $(this);
|
104
|
-
$checkbox.checkbox();
|
105
|
-
});
|
106
|
-
});
|
128
|
+
, init: function (element, options) {
|
129
|
+
var $el = this.$element = $(element)
|
107
130
|
|
108
|
-
}
|
131
|
+
this.options = $.extend({}, $.fn.radio.defaults, options);
|
132
|
+
$el.before(this.options.template);
|
133
|
+
this.setState();
|
134
|
+
}
|
109
135
|
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
!function ($) {
|
115
|
-
|
116
|
-
/* RADIO PUBLIC CLASS DEFINITION
|
117
|
-
* ============================== */
|
118
|
-
|
119
|
-
var Radio = function (element, options) {
|
120
|
-
this.init(element, options);
|
121
|
-
}
|
122
|
-
|
123
|
-
Radio.prototype = {
|
124
|
-
|
125
|
-
constructor: Radio
|
126
|
-
|
127
|
-
, init: function (element, options) {
|
128
|
-
var $el = this.$element = $(element)
|
129
|
-
|
130
|
-
this.options = $.extend({}, $.fn.radio.defaults, options);
|
131
|
-
$el.before(this.options.template);
|
132
|
-
this.setState();
|
133
|
-
}
|
134
|
-
|
135
|
-
, setState: function () {
|
136
|
-
var $el = this.$element
|
137
|
-
, $parent = $el.closest('.radio');
|
138
|
-
|
139
|
-
$el.prop('disabled') && $parent.addClass('disabled');
|
140
|
-
$el.prop('checked') && $parent.addClass('checked');
|
141
|
-
}
|
136
|
+
, setState: function () {
|
137
|
+
var $el = this.$element
|
138
|
+
, $parent = $el.closest('.radio');
|
142
139
|
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
, $el = this.$element
|
147
|
-
, checked = $el.prop(ch)
|
148
|
-
, $parent = $el.closest('.radio')
|
149
|
-
, $parentWrap = $el.closest('form').length ? $el.closest('form') : $el.closest('body')
|
150
|
-
, $elemGroup = $parentWrap.find(':radio[name="' + $el.attr('name') + '"]')
|
151
|
-
, e = $.Event('toggle')
|
140
|
+
$el.prop('disabled') && $parent.addClass('disabled');
|
141
|
+
$el.prop('checked') && $parent.addClass('checked');
|
142
|
+
}
|
152
143
|
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
144
|
+
, toggle: function () {
|
145
|
+
var d = 'disabled'
|
146
|
+
, ch = 'checked'
|
147
|
+
, $el = this.$element
|
148
|
+
, checked = $el.prop(ch)
|
149
|
+
, $parent = $el.closest('.radio')
|
150
|
+
, $parentWrap = $el.closest('form').length ? $el.closest('form') : $el.closest('body')
|
151
|
+
, $elemGroup = $parentWrap.find(':radio[name="' + $el.attr('name') + '"]')
|
152
|
+
, e = $.Event('toggle')
|
157
153
|
|
158
154
|
if ($el.prop(d) == false) {
|
159
|
-
|
160
|
-
|
161
|
-
|
155
|
+
$elemGroup.not($el).each(function () {
|
156
|
+
var $el = $(this)
|
157
|
+
, $parent = $(this).closest('.radio');
|
162
158
|
|
163
|
-
|
164
|
-
|
159
|
+
if ($el.prop(d) == false) {
|
160
|
+
$parent.removeClass(ch) && $el.removeAttr(ch).trigger('change');
|
161
|
+
}
|
162
|
+
});
|
165
163
|
|
166
|
-
|
167
|
-
|
164
|
+
if (checked == false) $parent.addClass(ch) && $el.prop(ch, true);
|
165
|
+
$el.trigger(e);
|
166
|
+
|
167
|
+
if (checked !== $el.prop(ch)) {
|
168
|
+
$el.trigger('change');
|
169
|
+
}
|
170
|
+
}
|
168
171
|
}
|
169
|
-
}
|
170
|
-
}
|
171
172
|
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
173
|
+
, setCheck: function (option) {
|
174
|
+
var ch = 'checked'
|
175
|
+
, $el = this.$element
|
176
|
+
, $parent = $el.closest('.radio')
|
177
|
+
, checkAction = option == 'check' ? true : false
|
178
|
+
, checked = $el.prop(ch)
|
179
|
+
, $parentWrap = $el.closest('form').length ? $el.closest('form') : $el.closest('body')
|
180
|
+
, $elemGroup = $parentWrap.find(':radio[name="' + $el['attr']('name') + '"]')
|
181
|
+
, e = $.Event(option)
|
181
182
|
|
182
|
-
|
183
|
-
|
184
|
-
|
183
|
+
$elemGroup.not($el).each(function () {
|
184
|
+
var $el = $(this)
|
185
|
+
, $parent = $(this).closest('.radio');
|
185
186
|
|
186
|
-
|
187
|
-
|
187
|
+
$parent.removeClass(ch) && $el.removeAttr(ch);
|
188
|
+
});
|
188
189
|
|
189
|
-
|
190
|
-
|
190
|
+
$parent[checkAction ? 'addClass' : 'removeClass'](ch) && checkAction ? $el.prop(ch, ch) : $el.removeAttr(ch);
|
191
|
+
$el.trigger(e);
|
191
192
|
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
193
|
+
if (checked !== $el.prop(ch)) {
|
194
|
+
$el.trigger('change');
|
195
|
+
}
|
196
|
+
}
|
197
|
+
|
198
|
+
}
|
196
199
|
|
197
|
-
}
|
198
200
|
|
201
|
+
/* RADIO PLUGIN DEFINITION
|
202
|
+
* ======================== */
|
199
203
|
|
200
|
-
|
201
|
-
* ======================== */
|
204
|
+
var old = $.fn.radio
|
202
205
|
|
203
|
-
|
206
|
+
$.fn.radio = function (option) {
|
207
|
+
return this.each(function () {
|
208
|
+
var $this = $(this)
|
209
|
+
, data = $this.data('radio')
|
210
|
+
, options = $.extend({}, $.fn.radio.defaults, $this.data(), typeof option == 'object' && option);
|
211
|
+
if (!data) $this.data('radio', (data = new Radio(this, options)));
|
212
|
+
if (option == 'toggle') data.toggle()
|
213
|
+
if (option == 'check' || option == 'uncheck') data.setCheck(option)
|
214
|
+
else if (option) data.setState();
|
215
|
+
});
|
216
|
+
}
|
204
217
|
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
, data = $this.data('radio')
|
209
|
-
, options = $.extend({}, $.fn.radio.defaults, $this.data(), typeof option == 'object' && option);
|
210
|
-
if (!data) $this.data('radio', (data = new Radio(this, options)));
|
211
|
-
if (option == 'toggle') data.toggle()
|
212
|
-
if (option == 'check' || option == 'uncheck') data.setCheck(option)
|
213
|
-
else if (option) data.setState();
|
214
|
-
});
|
215
|
-
}
|
218
|
+
$.fn.radio.defaults = {
|
219
|
+
template: '<span class="icons"><span class="first-icon fa fa-circle-o fa-base"></span><span class="second-icon fa fa-dot-circle-o fa-base"></span></span>'
|
220
|
+
}
|
216
221
|
|
217
|
-
$.fn.radio.defaults = {
|
218
|
-
template: '<span class="icons"><span class="first-icon fa fa-circle-o fa-base"></span><span class="second-icon fa fa-dot-circle-o fa-base"></span></span>'
|
219
|
-
}
|
220
222
|
|
223
|
+
/* RADIO NO CONFLICT
|
224
|
+
* ================== */
|
221
225
|
|
222
|
-
|
223
|
-
|
226
|
+
$.fn.radio.noConflict = function () {
|
227
|
+
$.fn.radio = old;
|
228
|
+
return this;
|
229
|
+
}
|
224
230
|
|
225
|
-
$.fn.radio.noConflict = function () {
|
226
|
-
$.fn.radio = old;
|
227
|
-
return this;
|
228
|
-
}
|
229
231
|
|
232
|
+
/* RADIO DATA-API
|
233
|
+
* =============== */
|
230
234
|
|
231
|
-
|
232
|
-
|
235
|
+
$(document).on('click.radio.data-api', '[data-toggle^=radio], .radio', function (e) {
|
236
|
+
var $radio = $(e.target);
|
237
|
+
e && e.preventDefault() && e.stopPropagation();
|
238
|
+
if (!$radio.hasClass('radio')) $radio = $radio.closest('.radio');
|
239
|
+
$radio.find(':radio').radio('toggle');
|
240
|
+
});
|
233
241
|
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
242
|
+
$(function () {
|
243
|
+
$('input[type="radio"]').each(function () {
|
244
|
+
var $radio = $(this);
|
245
|
+
$radio.radio();
|
246
|
+
});
|
247
|
+
});
|
240
248
|
|
241
|
-
|
242
|
-
|
243
|
-
var $radio = $(this);
|
244
|
-
$radio.radio();
|
245
|
-
});
|
246
|
-
});
|
249
|
+
}(window.jQuery);
|
250
|
+
}
|
247
251
|
|
248
|
-
|
252
|
+
$(setupInputs);
|
253
|
+
$(document).on('page:load', setupInputs);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: creative_tim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilton Garcia
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|