nfg_ui 0.12.0.3 → 0.12.3

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
  SHA256:
3
- metadata.gz: fd1a26d01e794a85545d14401527b545f9794fa1d4a08d72d7cb7e5aafa43747
4
- data.tar.gz: 46341d8e79543535e52ab5c14eca5f88ae78248715414c3673e188920d9486d2
3
+ metadata.gz: b45c3d32a180df2da86ae37f687850785b8a5c22833c4b70b0e0371f48e1b3cc
4
+ data.tar.gz: ab34a149c78bf3b596ddc5ea990ab3bd27372fd340166908b47aefe5df519d85
5
5
  SHA512:
6
- metadata.gz: 8a373a212e8b62c17208147f9311052a5802340ddee7df4b097d2ef4472201cce6ac60bd2e003e6c7751effc2f6aa96f76c7b6fdb5164ffa5964014f64d90ba8
7
- data.tar.gz: 83454913b0309e83502af894a13964a33c19395ef56c1b5c711766259c1e0f82c331cce4c760cb1d1cde89f1af700a173abf951d9dc319114c516c3bdb14e70e
6
+ metadata.gz: 44f3894e5054710f58a2198ca37c0a5ffbdb6e1a96c6c90d7d71363afbbd70ebee58b6d855b55ef0fcf90c03c5af04df8f2ecd5fe2dd401cf6223b168183d25f
7
+ data.tar.gz: b3dc49d58c96fe8ee3020d561c27d93950513c862b15174f92b1a45ec197af8d803691bf48eab1b948e06aec10ebe62b7247874feefbddbe9a9b3b11ade5cc8f
@@ -3,8 +3,6 @@
3
3
  #= require popper
4
4
  #= require select2
5
5
  #= require bootstrap
6
- #= require moment
7
- #= require nfg_ui/vendor/bootstrap-datetimepicker.min
8
6
  #= require nfg_ui/vendor/legacy_browser_support/application
9
7
 
10
8
  #= require_self
@@ -12,7 +10,7 @@
12
10
  #= require nfg_ui/collapsible_toggle
13
11
  #= require nfg_ui/select2
14
12
  #= require nfg_ui/tooltips
15
- #= require nfg_ui/datetimepicker_configuration
16
13
  #= require nfg_ui/file_inputs
14
+ #= require nfg_ui/datepicker
17
15
 
18
- window.NfgUi = {}
16
+ window.NfgUi = {}
@@ -1,3 +1,6 @@
1
+ if typeof NfgUi == "undefined"
2
+ window.NfgUi = {}
3
+
1
4
  class NfgUi.CollapsibleToggle
2
5
  constructor: (@el) ->
3
6
  @target = @collapseTarget()
@@ -0,0 +1,5 @@
1
+ #= require moment
2
+ #= require nfg_ui/vendor/bootstrap-datetimepicker.min
3
+ #= require nfg_ui/datetimepicker_configuration
4
+
5
+ window.NfgUi = window.NfgUi || {}
@@ -44,6 +44,7 @@ function () {
44
44
  clear:"fa fa-trash-o",
45
45
  close:"fa fa-times"
46
46
  }
47
+ options.sideBySide = true;
47
48
  // options.debug = true
48
49
  return options;
49
50
  }
@@ -52,11 +53,11 @@ function () {
52
53
  value: function defaultFormat() {
53
54
 
54
55
  if (this.input.data('datetimepicker') == 'datetime') {
55
- return 'Y-MM-DD hh:mm A';
56
+ return 'YYYY-MM-DD hh:mm A';
56
57
  } else if (this.input.data('datetimepicker') == 'time') {
57
58
  return 'hh:mm A';
58
59
  } else {
59
- return 'Y-MM-DD';
60
+ return 'YYYY-MM-DD';
60
61
  }
61
62
  }
62
63
  }]);
@@ -79,4 +80,4 @@ function initNfgUiDateTimePicker() {
79
80
  if (NfgUi.turbolinks)
80
81
  $(document).on('turbolinks:load', initNfgUiDateTimePicker);
81
82
  else
82
- $(document).ready(initNfgUiDateTimePicker);
83
+ $(document).ready(initNfgUiDateTimePicker);
@@ -5,11 +5,16 @@
5
5
  }
6
6
 
7
7
  // Height if just the builder-header is present
8
- .builder-header + .builder-container {
8
+ .builder-header ~ .builder-container {
9
9
  #bee_plugin_container { height: calc(100vh - 72px); }
10
10
  }
11
11
 
12
12
  // Height if both builder-header and builder-nav are present (typical in onboarder)
13
- .builder-header + .builder-nav + .builder-container {
13
+ .builder-header ~ .builder-nav ~ .builder-container {
14
14
  #bee_plugin_container { height: calc(100vh - 180px); }
15
+
16
+ // Height if there are buttons above the bee plugin
17
+ .builder-container-buttons {
18
+ ~ #bee_plugin_container { height: calc(100vh - 284px); }
19
+ }
15
20
  }
@@ -31,5 +31,6 @@ html.flexboxtweener {
31
31
  @import 'nfg_theme/custom';
32
32
 
33
33
  // Plugins
34
+ @import 'plugins/datetimepicker';
34
35
  @import 'plugins/sticky_div';
35
36
  }
@@ -0,0 +1,5 @@
1
+ .bootstrap-datetimepicker-widget {
2
+ &.timepicker-sbs {
3
+ .row { -ms-flex-align: center; }
4
+ }
5
+ }
@@ -14,6 +14,10 @@
14
14
  }
15
15
  .redactor-editor, .redactor-box, .redactor-box textarea { z-index: auto; }
16
16
  .redactor-box .redactor-toolbar { z-index: $zindex-dropdown - 10 !important; }
17
+ #redactor-modal-close {
18
+ border: none;
19
+ background: none;
20
+ }
17
21
 
18
22
  body.modal-open {
19
23
  .redactor-toolbar { z-index: $zindex-modal-backdrop - 1 !important; }
@@ -14,8 +14,8 @@
14
14
  .bootstrap-datetimepicker-widget {
15
15
  display: block;
16
16
  top: 0 !important;
17
- min-width: ($spacer * 10.5);
18
- max-width: ($spacer * 10.5);
17
+ min-width: ($spacer * 10);
18
+ max-width: ($spacer * 10);
19
19
  background-color: $white;
20
20
  z-index: 110;
21
21
 
@@ -31,6 +31,16 @@
31
31
  transform: none;
32
32
  }
33
33
 
34
+ //** For when the date and time pickers are side by side.
35
+ &.timepicker-sbs {
36
+ @include media-breakpoint-up(md) {
37
+ min-width: ($spacer * 20);
38
+ max-width: ($spacer * 20);
39
+ }
40
+ .row { align-items: center; }
41
+ .datepicker { width: ($spacer * 18.125); }
42
+ }
43
+
34
44
  //** Base date and time styles
35
45
  ul { margin: 0; }
36
46
  .datepicker, .timepicker {
@@ -136,7 +146,7 @@
136
146
  [data-action^='picker'] {
137
147
  padding-top: ($spacer * .25);
138
148
  padding-bottom: ($spacer * .25);
139
- width: ($spacer * 10);
149
+ width: ($spacer * 7.5);
140
150
  border-right: $border-width solid $border-color;
141
151
  border-left: $border-width solid $border-color;
142
152
  border-top: none;
@@ -214,9 +224,7 @@
214
224
  .btn {
215
225
  position: relative;
216
226
  display: block;
217
- padding: ($spacer * .5) 0;
218
227
  width: 100%;
219
- height: ($spacer * 1.5);
220
228
  }
221
229
  }
222
230
 
@@ -17,13 +17,13 @@ module NfgUi
17
17
  def render
18
18
  super do
19
19
  if collapsible && title
20
- concat(NfgUi::Components::Elements::Button.new({ traits: [:link, :block], collapse: collapse, class: 'no-link-color p-0 m-0' }, view_context).render {
20
+ concat(NfgUi::Components::Elements::Button.new({ traits: [:link, :block], collapse: collapse, class: 'no-link-color p-0 m-0', data: { collapse_icon: collapse_icon, collapsed_icon: collapsed_icon } }, view_context).render {
21
21
  content_tag(:div, class: 'row align-items-center') do
22
22
  concat(content_tag(:div, class: 'col-10 text-left') {
23
23
  NfgUi::Components::Foundations::Typeface.new({ heading: title, icon: icon, class: 'h4' }, view_context).render
24
24
  })
25
25
  concat(content_tag(:div, class: 'col-2 text-right') {
26
- NfgUi::Components::Foundations::Icon.new({ traits: ['caret-down fw'], tooltip: 'Show / hide additional information' }, view_context).render
26
+ NfgUi::Components::Foundations::Icon.new({ traits: ["#{contextual_collapsible_icon} fw"], tooltip: 'Show / hide additional information' }, view_context).render
27
27
  })
28
28
  end
29
29
  })
@@ -34,6 +34,21 @@ module NfgUi
34
34
  concat((block_given? ? yield : body))
35
35
  end
36
36
  end
37
+
38
+ private
39
+
40
+ def contextual_collapsible_icon
41
+ return '' unless collapsible
42
+ collapsed ? collapsed_icon : collapse_icon
43
+ end
44
+
45
+ def collapse_icon
46
+ 'caret-up'
47
+ end
48
+
49
+ def collapsed_icon
50
+ 'caret-down'
51
+ end
37
52
  end
38
53
  end
39
54
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NfgUi
4
- VERSION = '0.12.0.3'
4
+ VERSION = '0.12.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nfg_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0.3
4
+ version: 0.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Roehm
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-05-25 00:00:00.000000000 Z
12
+ date: 2021-07-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bootstrap
@@ -382,6 +382,7 @@ files:
382
382
  - app/assets/images/nfg_ui/email/nfg-logo.png
383
383
  - app/assets/javascripts/nfg_ui/application.coffee
384
384
  - app/assets/javascripts/nfg_ui/collapsible_toggle.coffee
385
+ - app/assets/javascripts/nfg_ui/datepicker.coffee
385
386
  - app/assets/javascripts/nfg_ui/datetimepicker_configuration.js
386
387
  - app/assets/javascripts/nfg_ui/document_ready.coffee
387
388
  - app/assets/javascripts/nfg_ui/file_inputs.js
@@ -493,6 +494,7 @@ files:
493
494
  - app/assets/stylesheets/nfg_ui/network_for_good/core/legacy_browser_support/nfg_theme/mixins/_grid.scss
494
495
  - app/assets/stylesheets/nfg_ui/network_for_good/core/legacy_browser_support/nfg_theme/utilities/_display.scss
495
496
  - app/assets/stylesheets/nfg_ui/network_for_good/core/legacy_browser_support/nfg_theme/utilities/_flex.scss
497
+ - app/assets/stylesheets/nfg_ui/network_for_good/core/legacy_browser_support/plugins/_datetimepicker.scss
496
498
  - app/assets/stylesheets/nfg_ui/network_for_good/core/legacy_browser_support/plugins/_sticky_div.scss
497
499
  - app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_alert.scss
498
500
  - app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_badge.scss