active_frontend 14.0.16 → 14.0.17

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: c9629e6b30e9b5d8cd880ed9bc61887f2dd3ece9
4
- data.tar.gz: 7a154e683a51ae44296e81745c4b15ef4dc6472b
3
+ metadata.gz: 172b12bf5f617882455d02532dc3026ef2e38d4a
4
+ data.tar.gz: 6d351cb2a3f005c22a585568a927b8cbe9ea9306
5
5
  SHA512:
6
- metadata.gz: 80eafc3365b3b40042f64c558655e968671768e4af31b4d840bf05f987d5fa51a22440c416a4074416195226faeba13350a1d3ecc199be8efb5beb4bf6f84fb4
7
- data.tar.gz: 2b96bc44a5020745cef3af8c884b705e5ab3da4c6966eaef2fee28139eed6b8042406b20dca8ea5a0701b8af7241f8d9eabb9a37a7796e4e6aebc957df51b3ee
6
+ metadata.gz: 10b8945f842e161d1e4aeb03e206c17546111d5692894ea33e9aacfb7b28806bc5bae30ad69c2b50ca86429b4206ce5a490073cc5a4387ec62722c1812b28e8b
7
+ data.tar.gz: 6254c70bb0b8e61c45eb7237b8add53b004595d3c37b520f69ce67f86570cb45f686aa587902d6127a9577bab6a656a28a898f82465dd7af12ff6cb0639308dd
data/.DS_Store CHANGED
Binary file
@@ -1,3 +1,3 @@
1
1
  module ActiveFrontend
2
- VERSION = '14.0.16'.freeze
2
+ VERSION = '14.0.17'.freeze
3
3
  end
@@ -9,6 +9,7 @@
9
9
  //= require base/_transition
10
10
  //= require base/_layout
11
11
  //= require base/_affix
12
+ //= require base/_header
12
13
  //= require base/_modal
13
14
  //= require base/_alert
14
15
  //= require base/_tab
@@ -31,6 +32,7 @@
31
32
  //= require base/_switch
32
33
  //= require base/_timezone
33
34
  //= require base/_tour
35
+ //= require base/_affirm
34
36
  //
35
37
  // Extensions Imports
36
38
  // ==================================================
@@ -9,6 +9,7 @@
9
9
  //= require base/_transition
10
10
  //= require base/_layout
11
11
  //= require base/_affix
12
+ //= require base/_header
12
13
  //= require base/_modal
13
14
  //= require base/_alert
14
15
  //= require base/_tab
@@ -31,6 +32,7 @@
31
32
  //= require base/_switch
32
33
  //= require base/_timezone
33
34
  //= require base/_tour
35
+ //= require base/_affirm
34
36
  //
35
37
  // Extensions Imports
36
38
  // ==================================================
@@ -0,0 +1,135 @@
1
+ +function ($) {
2
+ 'use strict';
3
+
4
+ // AFFIRM CLASS DEFINITION
5
+ // =======================
6
+
7
+ var Affirm = function (element, options) {
8
+ this.$element = $(element);
9
+ this.settings = {
10
+ title: this.$element.data('title'),
11
+ offset: this.$element.data('offset'),
12
+ removeClass: this.$element.data('remove-class')
13
+ };
14
+ this.options = $.extend({}, Affirm.DEFAULTS, options);
15
+
16
+ this.init();
17
+ };
18
+
19
+ if (!$.fn.modal) throw new Error('Affirm requires modal.js');
20
+
21
+ Affirm.VERSION = '1.0.0';
22
+ Affirm.DEFAULTS = {
23
+ btnClass: {
24
+ cancel: 'btn margin-size-right-xs',
25
+ confirm: 'btn btn-color-red'
26
+ },
27
+ modalClass: 'modal fade',
28
+ modalId: 'bsAffirmModal',
29
+ format: 'modal',
30
+ text: {
31
+ cancel: 'No, Cancel',
32
+ confirm: 'Yes, Confirm'
33
+ },
34
+ title: 'Are you 100% sure about this?'
35
+ };
36
+
37
+ Affirm.prototype.constructor = Affirm;
38
+
39
+ Affirm.prototype.init = function () {
40
+ var _self = this;
41
+ var body = $('body');
42
+ var modalId = '#' + this.options.modalId;
43
+
44
+ this.$element.click(function () {
45
+ $(modalId).remove();
46
+ body.append(_self.modalTemplate());
47
+ $(modalId).modal('show');
48
+
49
+ return false;
50
+ });
51
+
52
+ body.on('click', '[data-affirm-toggle="confirm"]', function () {
53
+ $(modalId).modal('hide');
54
+ });
55
+ };
56
+
57
+ Affirm.prototype.cancelBtn = function () {
58
+ var button = $('<a data-affirm-toggle="cancel" data-dismiss="modal">')
59
+ .addClass(this.options.btnClass.cancel)
60
+ .text(this.options.text.cancel);
61
+
62
+ return button;
63
+ };
64
+
65
+ Affirm.prototype.confirmBtn = function () {
66
+ var method = this.$element.attr('data-method');
67
+ var target = this.$element.attr('target');
68
+ var button = $('<a data-affirm-toggle="confirm">')
69
+ .addClass(this.options.btnClass.confirm)
70
+ .attr('href', this.$element.attr('href'))
71
+ .text(this.options.text.confirm);
72
+
73
+ if (method) button.attr('data-method', method);
74
+ if (target) button.attr('target', target);
75
+
76
+ return button;
77
+ };
78
+
79
+ Affirm.prototype.modalTemplate = function () {
80
+ var title = '<h5 class="row">' + this.options.title + '</h5>';
81
+ var header = $('<div class="modal-header text-align-left">')
82
+ .append(title);
83
+ var body = $('<div class="modal-body">')
84
+ .append(this.$element.attr('data-affirm'));
85
+ var footer = $('<div class="modal-footer text-align-right">')
86
+ .append(this.cancelBtn())
87
+ .append(this.confirmBtn());
88
+ var modal = $('<div role="modal">')
89
+ .addClass(this.options.modalClass)
90
+ .attr('id', this.options.modalId)
91
+ .append(header)
92
+ .append(body)
93
+ .append(footer);
94
+
95
+ return modal;
96
+ };
97
+
98
+ // AFFIRM PLUGIN DEFINITION
99
+ // ========================
100
+
101
+ function Plugin(option) {
102
+ return this.each(function () {
103
+ var $this = $(this);
104
+ var data = $this.data('bs.affirm');
105
+ var options = typeof option === 'object' && option;
106
+
107
+ if (!data) $this.data('bs.affirm', (data = new Affirm(this, options)));
108
+ if (typeof option === 'string') data[option]();
109
+ });
110
+ }
111
+
112
+ var old = $.fn.affirm;
113
+
114
+ $.fn.affirm = Plugin;
115
+ $.fn.affirm.Constructor = Affirm;
116
+
117
+ // AFFIRM NO CONFLICT
118
+ // ==================
119
+
120
+ $.fn.affirm.noConflict = function () {
121
+ $.fn.affirm = old;
122
+ return this;
123
+ };
124
+
125
+ // AFFIRM DATA-API
126
+ // ================
127
+
128
+ $(document).on('ready.bs.affirm.data-api', function () {
129
+ $('[data-affirm]').each(function () {
130
+ var $this = $(this);
131
+ Plugin.call($this, $this.data());
132
+ });
133
+ });
134
+
135
+ }(jQuery);
@@ -18,9 +18,9 @@
18
18
  Colorpicker.DEFAULTS = {
19
19
  callback: function (color) {},
20
20
  colors: [
21
- '#A7E254', '#13CE56', '#21D5E9', '#148DFF', '#7050E8',
22
- '#9061C2', '#FF6658', '#E64235', '#FF843A', '#F8D104',
23
- '#343B4A', '#9BA7BA', '#ECEFF5', '#FFFFFF'
21
+ '#94E254', '#13CE56', '#33C9EB', '#148DFF', '#7E5BEF',
22
+ '#9861C2', '#FF5DC4', '#FF3B3B', '#FF6935', '#FFD718',
23
+ '#273444', '#9BA7BA', '#F0F3F9', '#FFFFFF'
24
24
  ],
25
25
  item: '<li><button type="button"></button></li>',
26
26
  menu: '<ul class="colorpicker dropmenu caret"></ul>'
@@ -54,8 +54,9 @@
54
54
  this.$element
55
55
  .attr('tabindex', '-1')
56
56
  .css({
57
+ 'clip' : 'rect(0 0 0 0)',
57
58
  'position' : 'absolute',
58
- 'clip' : 'rect(0 0 0 0)'
59
+ 'width' : '0'
59
60
  })
60
61
  .after(this.$elementFilepicker);
61
62
 
@@ -0,0 +1,88 @@
1
+ +function ($) {
2
+ 'use strict';
3
+
4
+ // HEADER CLASS DEFINITION
5
+ // =======================
6
+
7
+ var Header = function (element, options) {
8
+ this.$element = $(element);
9
+ this.$window = $(window);
10
+ this.settings = {
11
+ addClass: this.$element.data('add-class'),
12
+ offset: this.$element.data('offset'),
13
+ removeClass: this.$element.data('remove-class')
14
+ };
15
+ this.options = $.extend({}, Header.DEFAULTS, this.settings, options);
16
+
17
+ this.init();
18
+ };
19
+
20
+ Header.VERSION = '1.0.0';
21
+ Header.DEFAULTS = {
22
+ addClass: 'border-color-bottom-transparent box-shadow-bottom',
23
+ offset: 10,
24
+ removeClass: 'background-color-transparent'
25
+ };
26
+
27
+ Header.prototype.constructor = Header;
28
+
29
+ Header.prototype.init = function () {
30
+ var _self = this;
31
+
32
+ this.$window.scroll(function () {
33
+ _self.toggleClasses();
34
+ });
35
+ };
36
+
37
+ Header.prototype.swapClass = function (removeClass, addClass) {
38
+ this.$element.removeClass(removeClass)
39
+ .addClass(addClass);
40
+ };
41
+
42
+ Header.prototype.toggleClasses = function () {
43
+ if (this.$window.scrollTop() >= this.options.offset) {
44
+ this.swapClass(this.options.removeClass, this.options.addClass);
45
+ } else {
46
+ this.swapClass(this.options.addClass, this.options.removeClass);
47
+ }
48
+ };
49
+
50
+ // HEADER PLUGIN DEFINITION
51
+ // ========================
52
+
53
+ function Plugin(option) {
54
+ return this.each(function () {
55
+ var $this = $(this);
56
+ var data = $this.data('bs.header');
57
+ var options = typeof option === 'object' && option;
58
+
59
+ if (!data) $this.data('bs.header', (data = new Header(this, options)));
60
+ if (typeof option === 'string') data[option]();
61
+ });
62
+ }
63
+
64
+ var old = $.fn.header;
65
+
66
+ $.fn.header = Plugin;
67
+ $.fn.header.Constructor = Header;
68
+
69
+ // HEADER NO CONFLICT
70
+ // ==================
71
+
72
+ $.fn.header.noConflict = function () {
73
+ $.fn.header = old;
74
+ return this;
75
+ };
76
+
77
+ // HEADER DATA-API
78
+ // ===============
79
+
80
+ $(document).on('ready.bs.header.data-api', function () {
81
+ $('[data-toggle="header"]').each(function () {
82
+ var $this = $(this);
83
+ if ($this.data('header')) return;
84
+ Plugin.call($this, $this.data());
85
+ });
86
+ });
87
+
88
+ }(jQuery);
@@ -113,7 +113,7 @@
113
113
  };
114
114
 
115
115
  // LAYOUT DATA-API
116
- // ==================
116
+ // ===============
117
117
 
118
118
  $(document).on('ready.bs.layout.data-api', function () {
119
119
  $('[data-toggle="layout"]').each(function () {
@@ -6,7 +6,6 @@
6
6
 
7
7
  var Timezone = function (element, options) {
8
8
  this.$element = $(element);
9
- this.$window = $(window);
10
9
  this.settings = {
11
10
  default: this.$element.data('default'),
12
11
  format: this.$element.data('format')
@@ -5415,8 +5415,8 @@ module.exports = function () {
5415
5415
  animationDuration: 400
5416
5416
  },
5417
5417
  onClick: null,
5418
- defaultColor: 'rgba(52,59,74,0.1)',
5419
- defaultFontColor: 'rgba(52,59,74,1)',
5418
+ defaultColor: 'rgba(39,52,68,0.1)',
5419
+ defaultFontColor: 'rgba(39,52,68,1)',
5420
5420
  defaultFontFamily: "'Fakt Soft Pro', Verdana, Tahoma, sans-serif",
5421
5421
  defaultFontSize: 16,
5422
5422
  defaultFontStyle: 'normal',
@@ -7006,7 +7006,7 @@ module.exports = function (Chart) {
7006
7006
  enabled: true,
7007
7007
  custom: null,
7008
7008
  mode: 'single',
7009
- backgroundColor: 'rgba(52,59,74,1)',
7009
+ backgroundColor: 'rgba(39,52,68,1)',
7010
7010
  titleFontStyle: '500',
7011
7011
  titleSpacing: 0,
7012
7012
  titleMarginBottom: 3,
@@ -34,28 +34,28 @@ $animation-durations: (
34
34
  // Color
35
35
  // ==================================================
36
36
  $colors-brand: (
37
- 'lime': rgba(167,226,84,1),
37
+ 'lime': rgba(148,226,84,1),
38
38
  'green': rgba(19,206,86,1),
39
- 'teal': rgba(33,213,233,1),
39
+ 'teal': rgba(51,201,235,1),
40
40
  'blue': rgba(20,141,255,1),
41
- 'indigo': rgba(112,80,232,1),
42
- 'purple': rgba(144,97,194,1),
43
- 'pink': rgba(255,102,88,1),
44
- 'red': rgba(230,66,53,1),
45
- 'orange': rgba(255,132,58,1),
46
- 'yellow': rgba(248,209,4,1)
41
+ 'indigo': rgba(126,91,239,1),
42
+ 'purple': rgba(152,97,194,1),
43
+ 'pink': rgba(255,93,196,1),
44
+ 'red': rgba(255,59,59,1),
45
+ 'orange': rgba(255,105,53,1),
46
+ 'yellow': rgba(255,215,24,1)
47
47
  );
48
48
  $colors-grayscale: (
49
49
  'transparent': rgba(0,0,0,0),
50
- 'dark-black': rgba(44,50,62,1),
51
- 'black': rgba(52,59,74,1),
52
- 'light-black': rgba(60,68,86,1),
50
+ 'dark-black': rgba(30,40,52,1),
51
+ 'black': rgba(39,52,68,1),
52
+ 'light-black': rgba(48,64,84,1),
53
53
  'dark-gray': rgba(143,157,178,1),
54
54
  'gray': rgba(155,167,186,1),
55
55
  'light-gray': rgba(167,177,194,1),
56
56
  'dark-haze': rgba(227,232,240,1),
57
- 'haze': rgba(239,242,248,1),
58
- 'light-haze': rgba(249,250,252,1),
57
+ 'haze': rgba(240,243,249,1),
58
+ 'light-haze': rgba(251,252,254,1),
59
59
  'white': rgba(255,255,255,1)
60
60
  );
61
61
  $colors-global: (
@@ -98,11 +98,11 @@
98
98
 
99
99
  // Box shadows
100
100
  // ==================================================
101
- .box-shadow-bottom { box-shadow: 0 2px 3px color(dark-haze); }
102
- .box-shadow-left { box-shadow: -2px 0 3px color(dark-haze); }
103
- .box-shadow-right { box-shadow: 2px 0 3px color(dark-haze); }
104
- .box-shadow-top { box-shadow: 0 -2px 3px color(dark-haze); }
105
- .box-shadow { box-shadow: 0 0 3px color(dark-haze); }
101
+ .box-shadow-bottom { box-shadow: 0 1px 2px darker-color(dark-haze); }
102
+ .box-shadow-left { box-shadow: -1px 0 2px darker-color(dark-haze); }
103
+ .box-shadow-right { box-shadow: 1px 0 2px darker-color(dark-haze); }
104
+ .box-shadow-top { box-shadow: 0 -1px 2px darker-color(dark-haze); }
105
+ .box-shadow { box-shadow: 0 0 2px darker-color(dark-haze); }
106
106
 
107
107
  // Border radiuses
108
108
  // ==================================================
@@ -5,7 +5,6 @@
5
5
  // Breadcrumb
6
6
  // ==================================================
7
7
  .breadcrumb {
8
- font-weight: text-weight(semibold);
9
8
  list-style: none;
10
9
  padding: 0;
11
10
 
@@ -12,6 +12,14 @@
12
12
  height: 76px;
13
13
  line-height: 1;
14
14
  padding: 18px;
15
+
16
+ &.fixed {
17
+ left: 0;
18
+ position: fixed;
19
+ right: 0;
20
+ top: 0;
21
+ z-index: 1040;
22
+ }
15
23
  }
16
24
  .header-brand,
17
25
  .header-search,
@@ -20,9 +20,9 @@
20
20
  }
21
21
  .layout-body { width: 100%; }
22
22
  .layout-sidebar {
23
- width: 360px;
23
+ width: 300px;
24
24
 
25
- &:not(.hidden) + .layout-body { width: calc(100% - 360px); }
25
+ &:not(.hidden) + .layout-body { width: calc(100% - 300px); }
26
26
 
27
27
  &.fixed {
28
28
  left: 0;
@@ -47,9 +47,9 @@
47
47
  }
48
48
  @media only screen and (min-width: 768px) and (max-width: 959px) {
49
49
  .layout-sidebar {
50
- width: 210px;
50
+ width: 220px;
51
51
 
52
- &:not(.hidden) + .layout-body { width: calc(100% - 210px); }
52
+ &:not(.hidden) + .layout-body { width: calc(100% - 220px); }
53
53
  &.fixed + .layout-body { width: 100%; }
54
54
  }
55
55
  }
@@ -14,7 +14,7 @@
14
14
  .modal {
15
15
  background: color(white);
16
16
  border-radius: border-radius(b);
17
- box-shadow: 0 0 6px darkish-color(dark-haze);
17
+ box-shadow: 0 0 3px dark-color(dark-haze);
18
18
  display: none;
19
19
  left: 0;
20
20
  margin: 0 auto;
@@ -25,6 +25,12 @@
25
25
  width: 560px;
26
26
  z-index: 1060;
27
27
 
28
+ &.clean {
29
+ background: color(transparent);
30
+ border-color: color(transparent);
31
+ box-shadow: none;
32
+ }
33
+
28
34
  &.fade {
29
35
  @include transition((opacity 0.2s linear, top 0.4s ease-in-out));
30
36
  top: -100%;
@@ -102,7 +108,7 @@
102
108
  // Backdrop
103
109
  // ==================================================
104
110
  .modal-backdrop {
105
- background: transparentize(color(white), 0.15);
111
+ background: transparentize(color(white), 0.05);
106
112
  bottom: 0;
107
113
  height: 100%;
108
114
  left: 0;
@@ -116,6 +122,8 @@
116
122
 
117
123
  &.in { opacity: 1; }
118
124
  }
125
+
126
+ &.dark { background: transparentize(color(black), 0.05); }
119
127
  }
120
128
 
121
129
  // Media Queries
@@ -197,7 +197,7 @@
197
197
 
198
198
  > a {
199
199
  border-bottom: 2px solid color(transparent);
200
- padding-bottom: 8px;
200
+ padding-bottom: 13px;
201
201
 
202
202
  &:hover,
203
203
  &:active,
@@ -72,7 +72,7 @@
72
72
  // Backdrop
73
73
  // ==================================================
74
74
  .spinner-backdrop {
75
- background: transparentize(color(white), 0.15);
75
+ background: transparentize(color(white), 0.05);
76
76
  bottom: 0;
77
77
  height: 100%;
78
78
  left: 0;
@@ -80,4 +80,6 @@
80
80
  right: 0;
81
81
  top: 0;
82
82
  z-index: 2040;
83
+
84
+ &.dark { background: transparentize(color(black), 0.05); }
83
85
  }
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.16
4
+ version: 14.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-15 00:00:00.000000000 Z
11
+ date: 2016-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -206,6 +206,7 @@ files:
206
206
  - vendor/assets/javascripts/.DS_Store
207
207
  - vendor/assets/javascripts/.keep
208
208
  - vendor/assets/javascripts/active_frontend.js
209
+ - vendor/assets/javascripts/base/_affirm.js
209
210
  - vendor/assets/javascripts/base/_affix.js
210
211
  - vendor/assets/javascripts/base/_alert.js
211
212
  - vendor/assets/javascripts/base/_animation.js
@@ -216,6 +217,7 @@ files:
216
217
  - vendor/assets/javascripts/base/_datepicker.js
217
218
  - vendor/assets/javascripts/base/_dropdown.js
218
219
  - vendor/assets/javascripts/base/_filepicker.js
220
+ - vendor/assets/javascripts/base/_header.js
219
221
  - vendor/assets/javascripts/base/_hoverdown.js
220
222
  - vendor/assets/javascripts/base/_layout.js
221
223
  - vendor/assets/javascripts/base/_list.js