nfg_ui 0.12.0.4 → 0.12.4

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: 41f8171ddefd10b3c6b64f79667eb31d50c808215744e10f193c9d3bd462f016
4
- data.tar.gz: a524d26295f2bdcd049a097fdad89d624175d6be13e47fc5f94b5127755c1c33
3
+ metadata.gz: 40569cc7dc02fb3dc270f37b4b90e4b2eb094630a00538be57354e09bedb9258
4
+ data.tar.gz: 5be6e2cb820eac1a40da4df26e1ec9518aab7580073664e9ee6daaf07145aa41
5
5
  SHA512:
6
- metadata.gz: b1fea97db28cb2dff4091dc841b67266dcb23a29744b3a39582f7bc5d266975d81fad41b6a4b7fd5ad3c90bd533515ab457f51788c5ef3adf3e8e2f6b5e22bc6
7
- data.tar.gz: 9b1f401f051641bd0933f1ce3a07aa0b864488be5d3cb682ea4a41dc6073b80d2c0df39591330a97ee2f6552ef4bf9346b7dacf4cb122e3f98e67ae688689573
6
+ metadata.gz: 2645cc8d2743636e1fc02511a21a5df83d067d0e42131562c4779c15580fe1b05acb66569901a75106f84be6ba0e61d52009f85a92ddfeef6dc7c725088353b9
7
+ data.tar.gz: c084418fa8b0fede0aaa8015b2f211bae1952837b14e3e3872e41a967099568d72b8f3f0b9c683873aeba689097a29fc14c7fedda2ce31a66b2ebbdfc83df180
@@ -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);
@@ -8,6 +8,7 @@
8
8
 
9
9
  // Plugins
10
10
  @import 'nfg_ui/network_for_good/core/plugins/intercom';
11
+ @import 'nfg_ui/network_for_good/core/plugins/multi';
11
12
  @import 'nfg_ui/network_for_good/core/plugins/turbolinks';
12
13
  @import 'nfg_ui/network_for_good/core/plugins/twitter_typeahead';
13
14
 
@@ -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,7 +14,7 @@
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 {
17
+ #redactor-modal-close {
18
18
  border: none;
19
19
  background: none;
20
20
  }
@@ -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
 
@@ -0,0 +1,64 @@
1
+ //** Multi plugin used in export contacts/donations modal in DM
2
+
3
+ .multi-wrapper {
4
+ border: $border-width solid $border-color;
5
+ border-radius: $border-radius;
6
+ width: 100%;
7
+ .search-input {
8
+ border: 0;
9
+ border-bottom: $border-width solid $border-color;
10
+ border-radius: 0;
11
+ display: block;
12
+ font-size: $font-size-base;
13
+ margin: 0;
14
+ outline: 0;
15
+ padding: $input-btn-padding-y $input-btn-padding-x;
16
+ width: 100%;
17
+ box-sizing: border-box;
18
+ }
19
+ .item {
20
+ cursor: pointer;
21
+ display: block;
22
+ position: relative;
23
+ padding: ($spacer * .25);
24
+ border-radius: $border-radius;
25
+ &:hover { background: $gray-200; }
26
+ }
27
+ .non-selected-wrapper, .selected-wrapper {
28
+ box-sizing: border-box;
29
+ display: inline-block;
30
+ height: ($spacer * 8);
31
+ overflow-y: scroll;
32
+ padding: ($spacer * .5);
33
+ vertical-align: top;
34
+ width: 50%;
35
+ }
36
+ .non-selected-wrapper {
37
+ background: $body-bg;
38
+ border-right: $border-width solid $border-color;
39
+ .item.selected {
40
+ padding-right: $spacer;
41
+ color: inherit;
42
+ background: $gray-200;
43
+ opacity: 0.5;
44
+ &:hover {
45
+ background: $gray-200;
46
+ cursor: inherit;
47
+ }
48
+ &:after {
49
+ position: absolute;
50
+ top: ($spacer * .25);
51
+ right: 0;
52
+ width: $spacer;
53
+ font-family: "FontAwesome";
54
+ font-size: $font-size-base;
55
+ line-height: 1.5;
56
+ color: inherit;
57
+ text-align: center;
58
+ content: '\f00c';
59
+ z-index: 5;
60
+ }
61
+ }
62
+ }
63
+ .selected-wrapper { background: $white; }
64
+ }
@@ -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.4'
4
+ VERSION = '0.12.4'
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.4
4
+ version: 0.12.4
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-06-03 00:00:00.000000000 Z
12
+ date: 2021-07-08 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
@@ -528,6 +530,7 @@ files:
528
530
  - app/assets/stylesheets/nfg_ui/network_for_good/core/plugins/_datepicker.scss
529
531
  - app/assets/stylesheets/nfg_ui/network_for_good/core/plugins/_datetimepicker.scss
530
532
  - app/assets/stylesheets/nfg_ui/network_for_good/core/plugins/_intercom.scss
533
+ - app/assets/stylesheets/nfg_ui/network_for_good/core/plugins/_multi.scss
531
534
  - app/assets/stylesheets/nfg_ui/network_for_good/core/plugins/_select2.scss
532
535
  - app/assets/stylesheets/nfg_ui/network_for_good/core/plugins/_sticky_div.scss
533
536
  - app/assets/stylesheets/nfg_ui/network_for_good/core/plugins/_turbolinks.scss