active_frontend 14.0.74 → 14.0.78

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: e2390d980325e6debb5b0901a7bf22059d8227a8
4
- data.tar.gz: c21a5e9359fc102b8cdfee24c676b3d27856e690
3
+ metadata.gz: 8544cdc4dd9cc5170713bdc8a9b71496dd3f3c3f
4
+ data.tar.gz: abfa494a58da43ac00463ee56f343e72c7f1e3e2
5
5
  SHA512:
6
- metadata.gz: 0f477ace1a823d73915d152cf5d0e74e20e8f6a0cdcf9c85a1f1ddc30e909cb5bc245da0e40c95a97012c23035b2547c708db839e00c444b6834e7ab6d49b628
7
- data.tar.gz: b27ed70a643d1e201d529ae8039439ff2454d08a293eb25b8d0bb05766727b45f8b8068849eac864d6a87d94cf0d5026174bb9ff3ed1ec5e5556468d5aa38e3f
6
+ metadata.gz: 97b1e809ca7ca91ddbd68f55a26e9a0468e501419db04ccbedb267e09482809c9969b960364c8bd7e0cf450f84d69d62e4880f7bc332ccd42125e79303dd1951
7
+ data.tar.gz: 3b6401d294cd809e31166de7bcca33443615d1427fd1c2c5715d053374049a040cd18870c350b257d78a3d331434f5477eded164b65eead9f6e3b894f011ac0c
data/.DS_Store CHANGED
Binary file
@@ -1,3 +1,3 @@
1
1
  module ActiveFrontend
2
- VERSION = '14.0.74'.freeze
2
+ VERSION = '14.0.78'.freeze
3
3
  end
data/vendor/.DS_Store CHANGED
Binary file
Binary file
@@ -33,6 +33,9 @@
33
33
  confirm: 'btn btn-color-red'
34
34
  },
35
35
  format: 'modal',
36
+ onCancelCallback: function () {},
37
+ onConfirmCallback: function () {},
38
+ onDisplayCallback: function () {},
36
39
  text: {
37
40
  cancel: 'No, Cancel',
38
41
  confirm: 'Yes, Confirm'
@@ -51,6 +54,7 @@
51
54
  e.preventDefault();
52
55
 
53
56
  _self.displayFormat();
57
+ _self.options.onDisplayCallback();
54
58
 
55
59
  return false;
56
60
  });
@@ -58,9 +62,11 @@
58
62
  $('body')
59
63
  .on('click', '[data-affirm-toggle="cancel"]', function () {
60
64
  _self.cancelFormat();
65
+ _self.options.onCancelCallback();
61
66
  })
62
67
  .on('click', '[data-affirm-toggle="confirm"]', function () {
63
68
  _self.confirmFormat();
69
+ _self.options.onConfirmCallback();
64
70
  });
65
71
  };
66
72
 
@@ -161,7 +167,7 @@
161
167
  if (this.options.format === 'popover') {
162
168
  this.$element.popover('hide');
163
169
  } else {
164
- $('#bsAffirmModal').modal('show');
170
+ $('#bsAffirmModal').modal('hide');
165
171
  }
166
172
  };
167
173
 
@@ -26,20 +26,16 @@
26
26
  duration: 'b',
27
27
  effect: 'bounce',
28
28
  hide: false,
29
- infinite: false
29
+ infinite: false,
30
+ onTransitionEndCallback: function () {}
30
31
  };
31
32
 
32
33
  Animation.prototype.constructor = Animation;
33
34
 
34
35
  Animation.prototype.init = function () {
36
+ var _self = this;
35
37
  var element = this.reset();
36
- var hide = this.options.hide;
37
- var infinite = this.options.infinite;
38
- var animation = 'animation' +
39
- ' animation-effect-' + this.options.effect +
40
- ' animation-delay-' + this.options.delay +
41
- ' animation-duration-' + this.options.duration +
42
- (infinite === true ? ' infinite' : '');
38
+ var animation = this.animationClass();
43
39
 
44
40
  if (element.hasClass('hidden') || element.is(':hidden')) {
45
41
  element.removeClass('hidden');
@@ -53,11 +49,21 @@
53
49
  e.stopPropagation();
54
50
  e.preventDefault();
55
51
 
56
- if (infinite !== true) element.removeClass(animation);
57
- if (hide === true) element.addClass('hidden');
52
+ if (!_self.options.infinite) element.removeClass(animation);
53
+ if (_self.options.hide) element.addClass('hidden');
54
+
55
+ _self.options.onTransitionEndCallback();
58
56
  });
59
57
  };
60
58
 
59
+ Animation.prototype.animationClass = function () {
60
+ return 'animation' +
61
+ ' animation-effect-' + this.options.effect +
62
+ ' animation-delay-' + this.options.delay +
63
+ ' animation-duration-' + this.options.duration +
64
+ (this.options.infinite ? ' infinite' : '');
65
+ };
66
+
61
67
  Animation.prototype.reset = function () {
62
68
  this.$element.before(this.$element.clone(true));
63
69
 
@@ -33,12 +33,13 @@
33
33
 
34
34
  Choicepicker.VERSION = '1.0.0';
35
35
  Choicepicker.DEFAULTS = {
36
- callback: function (choice) {},
37
36
  choices: [],
38
37
  choiceClass: 'form-align-vertical',
39
38
  fuzzySearch: true,
40
39
  item: '<li></li>',
41
40
  menu: '<ul class="choicepicker dropmenu caret"><span></span></ul>',
41
+ onCheckAllCallback: function (value) {},
42
+ onSetValCallback: function (choice) {},
42
43
  text: {
43
44
  all: 'All',
44
45
  choiceless: 'No choices available',
@@ -173,6 +174,8 @@
173
174
 
174
175
  if (selector) selector.prop('checked', checkAll.is(':checked'));
175
176
  });
177
+
178
+ _self.options.onCheckAllCallback(checkAll.val());
176
179
  });
177
180
  };
178
181
 
@@ -255,7 +258,7 @@
255
258
  if (label == '[object Object]') return;
256
259
 
257
260
  this.$element.val(label);
258
- this.options.callback(label);
261
+ this.options.onSetValCallback(label);
259
262
  };
260
263
 
261
264
  Choicepicker.prototype.randomNumber = function () {
@@ -16,14 +16,14 @@
16
16
 
17
17
  Colorpicker.VERSION = '1.0.0';
18
18
  Colorpicker.DEFAULTS = {
19
- callback: function (color) {},
20
19
  colors: [
21
20
  '#A1D74D', '#1BB933', '#2ECFDD', '#0D86F6', '#7E63E2',
22
21
  '#BA5BCE', '#EA4C88', '#EB3C22', '#FDA30D', '#F6D123',
23
22
  '#2C3A49', '#8292A4', '#EEF0F6', '#FFFFFF'
24
23
  ],
25
24
  item: '<li><button type="button"></button></li>',
26
- menu: '<ul class="colorpicker dropmenu caret"></ul>'
25
+ menu: '<ul class="colorpicker dropmenu caret"></ul>',
26
+ onSetValCallback: function (color) {}
27
27
  };
28
28
 
29
29
  Colorpicker.prototype.constructor = Colorpicker;
@@ -105,7 +105,7 @@
105
105
  if (!this.$active) return;
106
106
 
107
107
  this.$element.val(color);
108
- this.options.callback(color);
108
+ this.options.onSetValCallback(color);
109
109
  };
110
110
 
111
111
  // COLORPICKER PLUGIN DEFINITION
@@ -61,6 +61,7 @@
61
61
  minViewMode: 0,
62
62
  multidate: false,
63
63
  multidateSeparator: ',',
64
+ onSetValCallback: function (value) {},
64
65
  startDate: -Infinity,
65
66
  startView: 0,
66
67
  templates: {
@@ -288,8 +289,11 @@
288
289
  }
289
290
  };
290
291
 
291
- Datepicker.prototype.setValue = function () {
292
- this.$element.val(this.getFormattedDate());
292
+ Datepicker.prototype.setVal = function () {
293
+ var value = this.getFormattedDate();
294
+
295
+ this.$element.val(value);
296
+ this.options.onSetValCallback(value);
293
297
  };
294
298
 
295
299
  Datepicker.prototype.setDate = function (date, which) {
@@ -297,7 +301,7 @@
297
301
  if (!which || which === 'view') this.$viewDate = date && new Date(date);
298
302
 
299
303
  this.fill();
300
- this.setValue();
304
+ this.setVal();
301
305
 
302
306
  if (!which || which !== 'view') this.triggerEvent('changeDate');
303
307
  if (this.$element) this.$element.change();
@@ -328,7 +332,7 @@
328
332
 
329
333
  this.update.apply(this, $.map(args, this.utcToLocal));
330
334
  this.triggerEvent('changeDate');
331
- this.setValue();
335
+ this.setVal();
332
336
  };
333
337
 
334
338
  Datepicker.prototype.updateAll = function () {
@@ -727,7 +731,7 @@
727
731
  }
728
732
 
729
733
  if (fromArgs) {
730
- this.setValue();
734
+ this.setVal();
731
735
  } else if (dates.length) {
732
736
  if (String(oldDates) !== String(this.$dates)) this.triggerEvent('changeDate');
733
737
  }
@@ -953,7 +957,7 @@
953
957
  this.unapplyEvents(this.$eventsAlt);
954
958
  this.$viewMode = this.$Options.startView;
955
959
 
956
- if (this.$Options.forceParse) this.setValue();
960
+ if (this.$Options.forceParse) this.setVal();
957
961
 
958
962
  this.updateWidgetMode();
959
963
  this.$widget.detach();
@@ -36,6 +36,8 @@
36
36
  iconClass: 'icon-folder-open',
37
37
  inputClass: 'form-input',
38
38
  inputPlaceholder: 'Select a file...',
39
+ onFilesDeselectedCallback: function () {},
40
+ onFilesSelectedCallback: function (count) {},
39
41
  showBadge: true,
40
42
  showIcon: true,
41
43
  showInput: true
@@ -65,6 +67,12 @@
65
67
  this.$element.change(function () {
66
68
  var files = _self.pushNameFiles();
67
69
 
70
+ if (files.length === 0) {
71
+ _self.options.onFilesDeselectedCallback();
72
+ } else {
73
+ _self.options.onFilesSelectedCallback(files.length);
74
+ }
75
+
68
76
  if (_self.options.showInput === false && _self.options.showBadge) {
69
77
  if (_self.$elementFilepicker.find('.badge').length === 0) {
70
78
  _self.badgeAppend(files);
@@ -21,6 +21,7 @@
21
21
  Header.DEFAULTS = {
22
22
  addClass: '',
23
23
  offset: 10,
24
+ onSwapClassCallback: function () {},
24
25
  removeClass: 'background-color-transparent border-color-bottom-transparent'
25
26
  };
26
27
 
@@ -35,8 +36,11 @@
35
36
  };
36
37
 
37
38
  Header.prototype.swapClass = function (removeClass, addClass) {
38
- this.$element.removeClass(removeClass)
39
- .addClass(addClass);
39
+ this.$element
40
+ .removeClass(removeClass)
41
+ .addClass(addClass);
42
+
43
+ this.options.onSwapClassCallback();
40
44
  };
41
45
 
42
46
  Header.prototype.toggleClasses = function () {
@@ -24,6 +24,10 @@
24
24
  Hoverdown.VERSION = '1.0.0';
25
25
  Hoverdown.DEFAULTS = {
26
26
  delay: 500,
27
+ onCloseMenuCallback: function () {},
28
+ onHoverOutDelayCallback: function () {},
29
+ onHoverOutTimeoutCallback: function () {},
30
+ onOpenMenuCallback: function () {},
27
31
  timeout: 500
28
32
  };
29
33
 
@@ -55,6 +59,8 @@
55
59
  this.$timeout = window.setTimeout(function () {
56
60
  _self.closeMenu();
57
61
  }, this.options.timeout);
62
+
63
+ this.options.onHoverOutTimeoutCallback();
58
64
  };
59
65
 
60
66
  Hoverdown.prototype.hoverOutDelay = function () {
@@ -63,16 +69,20 @@
63
69
  window.setTimeout(function () {
64
70
  _self.closeMenu();
65
71
  }, this.options.delay);
72
+
73
+ this.options.onHoverOutDelayCallback();
66
74
  };
67
75
 
68
76
  Hoverdown.prototype.openMenu = function () {
69
77
  this.$parent.addClass('open');
70
78
  this.$dropmenu.trigger('show.bs.dropdown');
79
+ this.options.onOpenMenuCallback();
71
80
  };
72
81
 
73
82
  Hoverdown.prototype.closeMenu = function () {
74
83
  this.$parent.removeClass('open');
75
84
  this.$dropmenu.trigger('hide.bs.dropdown');
85
+ this.options.onCloseMenuCallback();
76
86
  };
77
87
 
78
88
  // HOVERDOWN PLUGIN DEFINITION
@@ -24,6 +24,7 @@
24
24
  Layout.DEFAULTS = {
25
25
  direction: 'left',
26
26
  effect: 'slide',
27
+ onToggleCallback: function (toggle) {},
27
28
  target: '#layout-target'
28
29
  };
29
30
 
@@ -50,6 +51,8 @@
50
51
  effect: effect,
51
52
  hide: toggle === 'out'
52
53
  });
54
+
55
+ _self.options.onToggleCallback(toggle);
53
56
  });
54
57
  };
55
58
 
@@ -21,9 +21,10 @@
21
21
 
22
22
  List.VERSION = '1.0.0';
23
23
  List.DEFAULTS = {
24
- callback: function (visible) {},
25
24
  emptyText: 'No matches found',
26
- input: null
25
+ input: null,
26
+ onPlaceholderCallback: function () {},
27
+ onVisibleItemsCallback: function (count) {}
27
28
  };
28
29
 
29
30
  List.prototype.constructor = List;
@@ -61,10 +62,12 @@
61
62
  } else {
62
63
  list.append(emptyLi);
63
64
  }
65
+
66
+ _self.options.onPlaceholderCallback();
64
67
  }
65
68
  }
66
69
 
67
- _self.options.callback(visible);
70
+ _self.options.onVisibleItemsCallback(count);
68
71
 
69
72
  return false;
70
73
  });
@@ -21,6 +21,8 @@
21
21
  baseClass: 'switch',
22
22
  offClass: 'switch-color-light-haze',
23
23
  onClass: 'switch-color-green',
24
+ onOffCallback: function () {},
25
+ onOnCallback: function () {},
24
26
  text: {
25
27
  off: '<i class="icon-cross"></i>',
26
28
  on: '<i class="icon-checkmark"></i>'
@@ -71,6 +73,8 @@
71
73
  this.$element.prop('checked', true);
72
74
 
73
75
  if (!silent) this.trigger();
76
+
77
+ this.options.onOnCallback();
74
78
  };
75
79
 
76
80
  Switch.prototype.off = function (silent) {
@@ -81,6 +85,8 @@
81
85
  this.$element.prop('checked', false);
82
86
 
83
87
  if (!silent) this.trigger();
88
+
89
+ this.options.onOffCallback();
84
90
  };
85
91
 
86
92
  Switch.prototype.enable = function () {
@@ -13,6 +13,7 @@
13
13
 
14
14
  Table.VERSION = '1.0.0';
15
15
  Table.DEFAULTS = {
16
+ onSortCallback: function (direction) {},
16
17
  templates: {
17
18
  downArrow: '<i class="icon-chevron-down pull-right"></i>',
18
19
  noArrow: '<i class="icon-minus pull-right"></i>',
@@ -114,6 +115,7 @@
114
115
  break;
115
116
  }
116
117
 
118
+ _self.options.onSortCallback(dataSort);
117
119
  _self.setSortStatus(trTh, reSort);
118
120
 
119
121
  var colIndex = 0;
@@ -20,6 +20,7 @@
20
20
  Timeago.DEFAULTS = {
21
21
  approximate: true,
22
22
  maxRelative: false,
23
+ onRefreshCallback: function () {},
23
24
  showNow: false,
24
25
  showSeconds: false,
25
26
  spacing: true,
@@ -71,6 +72,7 @@
71
72
 
72
73
  Timeago.prototype.refresh = function () {
73
74
  this.updateTime();
75
+ this.options.onRefreshCallback();
74
76
  return this.updateInterval();
75
77
  };
76
78
 
@@ -18,6 +18,7 @@
18
18
  Timepicker.DEFAULTS = {
19
19
  menu: '<div class="timepicker dropmenu caret"></div>',
20
20
  meridian: true,
21
+ onSetValCallback: function (value) {},
21
22
  seconds: false,
22
23
  step: 5,
23
24
  text: {
@@ -341,7 +342,10 @@
341
342
  };
342
343
 
343
344
  Timepicker.prototype.setVal = function () {
344
- this.setTime(this.$element.val());
345
+ var value = this.$element.val();
346
+
347
+ this.setTime(value);
348
+ this.options.onSetValCallback(value);
345
349
  };
346
350
 
347
351
  Timepicker.prototype.clear = function () {
@@ -19,6 +19,7 @@
19
19
  Timezone.DEFAULTS = {
20
20
  default: 'America/New_York',
21
21
  format: 'olson',
22
+ onGetTimezoneCallback: function (value) {},
22
23
  timezones: {
23
24
  '-12': 'Pacific/Kwajalein',
24
25
  '-11': 'Pacific/Samoa',
@@ -72,7 +73,10 @@
72
73
  offset = -offset / 60;
73
74
  if (offset === 'undefined') return this.options.default;
74
75
 
75
- return this.options.timezones[offset];
76
+ var timezone = this.options.timezones[offset];
77
+ this.options.onGetTimezoneCallback(timezone);
78
+
79
+ return timezone;
76
80
  };
77
81
 
78
82
  Timezone.prototype.formatTimezone = function () {
@@ -26,9 +26,9 @@
26
26
  delay: 3000,
27
27
  items: [],
28
28
  manual: true,
29
- onMissCallback: function (item) { return item; },
30
- onShowCallback: function (item) { return item; },
31
- onShownCallback: function (item) { return item; },
29
+ onMissCallback: function (item) {},
30
+ onShowCallback: function (item) {},
31
+ onShownCallback: function (item) {},
32
32
  parent: 'html, body',
33
33
  skip: true,
34
34
  storage: false,
@@ -89,7 +89,16 @@
89
89
  cursor: default;
90
90
  font-size: text-size(s);
91
91
  padding: 0 3px 1px;
92
+
93
+ @each $name, $color in map-keys($colors) {
94
+ &.calendar-event-color-#{$name} {
95
+ background: color($name);
96
+ border-color: darker-color($name);
97
+ color: text-color-on($name);
98
+ }
99
+ }
92
100
  }
101
+ a.calendar-event { cursor: pointer; }
93
102
  .calendar-event-draggable { cursor: pointer; }
94
103
  .calendar-event-inner {
95
104
  height: 100%;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_frontend
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.0.74
4
+ version: 14.0.78
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-28 00:00:00.000000000 Z
11
+ date: 2017-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails