creative_tim 1.0.4 → 1.0.5

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