five-two-nw-olivander 0.2.0.47 → 0.2.0.48

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
  SHA256:
3
- metadata.gz: bd2a2c61d70faf6f301ba6e8accf9c64fccb5acbaa22b32f73275023f6489d0f
4
- data.tar.gz: 9489350aad972f11860c79bc6600a953bb3b21365909139c9c2a1972c588e88c
3
+ metadata.gz: 9b22812b1ec4a12b08bf4438bb5a4fca7d336d3093731802bd8dcc9ff536a3aa
4
+ data.tar.gz: bb795edf8b2d5905608397b77eb1d16712b39f26428216a2899d3df56a4403ac
5
5
  SHA512:
6
- metadata.gz: 80808f7ec2804eb17d90e9ec9a67b2f800494fe982da0c62e067de519d492ef3295015db820a278d5f62e778a73530a62684e9cba57b32ebe6e0c100dc533756
7
- data.tar.gz: a7999e0e3bf9557f0c24d5ddec7fbe6246039751027b0159fe897680fd80a654e4f9fb8935e1a72b4012e41c372e974cbf54cb9cc20a837b907739fbdf9c808f
6
+ metadata.gz: c46a875fcff935a6bd0f42f810f3be80e71f688dd6b27af853d2b63504a0253eb30b132aa0062dde96a189f5e422ec036808ac5782f00fd5cd9d8a583eaa0cec
7
+ data.tar.gz: 68ce88b62806744b7c76026df4c3419ab725b19497e50765f4f893456938e516f3c3a3564164477980f0abbbf72f8c448909a59f8966504467807aa78e79e7d4
@@ -173,6 +173,12 @@ module Olivander
173
173
  (is_dev_environment? ? 'bg-danger' : 'bg-info')
174
174
  end
175
175
 
176
+ def sidebar_class
177
+ Olivander::CurrentContext.application_context.sidebar_class ||
178
+ ENV['SIDEBAR_CLASS'] ||
179
+ 'sidebar-dark-primary'
180
+ end
181
+
176
182
  def header_page_title
177
183
  [is_dev_environment? ? sidebar_context_suffix.upcase : nil, page_title].reject(&:blank?).join(' ')
178
184
  end
@@ -1,32 +1,34 @@
1
1
  class DateTimeInput < SimpleForm::Inputs::Base
2
- def input(wrapper_options)
2
+ def input(_wrapper_options)
3
3
  raw_value = parse_value(object.public_send(attribute_name), options[:date_format])
4
4
 
5
5
  disabled = options[:disabled] || false
6
6
 
7
- hash = { id: "#{attribute_name}_datetimepicker", class: 'form-control datetimepicker-input', value: raw_value, disabled: disabled, 'data-toggle': 'datetimepicker', 'data-target': "##{attribute_name}_datetimepicker" }
7
+ hash = { id: "#{attribute_name}_datetimepicker", class: 'form-control datetimepicker-input', value: raw_value,
8
+ disabled: disabled, 'data-toggle': 'datetimepicker', 'data-target': "##{attribute_name}_datetimepicker", autocomplete: 'off' }
8
9
  data = options[:data] || {}
9
10
  data.keys.each do |d|
10
11
  hash["data-#{d.to_s.dasherize}".to_sym] = data[d]
11
12
  end
12
13
  field = @builder.text_field(attribute_name, hash)
13
14
 
14
- add_on_class = options[:add_on_class] || "fa fa-calendar"
15
+ add_on_class = options[:add_on_class] || 'fa fa-calendar'
15
16
 
16
- add_on = template.content_tag(:div, class: "input-group-prepend") do
17
- add_on = template.content_tag(:div, class: "input-group-text") do
18
- hash = { class: add_on_class, 'data-toggle': 'datetimepicker', 'data-target': "##{attribute_name}_datetimepicker" }
17
+ add_on = template.content_tag(:div, class: 'input-group-prepend') do
18
+ add_on = template.content_tag(:div, class: 'input-group-text') do
19
+ hash = { class: add_on_class, 'data-toggle': 'datetimepicker',
20
+ 'data-target': "##{attribute_name}_datetimepicker" }
19
21
  template.content_tag(:i, '', hash)
20
22
  end
21
23
  end
22
24
 
23
25
  all = content_tag(:div, add_on + field, class: 'input-group')
24
26
 
25
- script = "".html_safe
26
- unless disabled then
27
- picker_options = options[:picker_options] || { "format": "MM/DD/YYYY" }
27
+ script = ''.html_safe
28
+ unless disabled
29
+ picker_options = options[:picker_options] || { "format": 'MM/DD/YYYY' }
28
30
 
29
- script = """
31
+ script = ''"
30
32
  <script>
31
33
  $(document).ready(function() {
32
34
  $('##{attribute_name}_datetimepicker').datetimepicker(
@@ -34,7 +36,7 @@ class DateTimeInput < SimpleForm::Inputs::Base
34
36
  );
35
37
  });
36
38
  </script>
37
- """.html_safe
39
+ "''.html_safe
38
40
  end
39
41
 
40
42
  all + script
@@ -1,5 +1,5 @@
1
1
  / Main Sidebar Container
2
- %aside.main-sidebar.sidebar-dark-primary.elevation-4{ data: { controller: 'left-nav' }}
2
+ %aside.main-sidebar.elevation-4{ class: sidebar_class, data: { controller: 'left-nav' }}
3
3
  / Brand Logo
4
4
  %a.brand-link{ href: "/", class: sidebar_background_class }
5
5
  %img.brand-image.img-circle.elevation-3{:alt => Olivander::CurrentContext.application_context.logo.alt, :src => Olivander::CurrentContext.application_context.logo.url, :style => "opacity: .8"}/
@@ -4,7 +4,7 @@ module Olivander
4
4
  # DTO to represent the overall application context
5
5
  class ApplicationContext
6
6
  attr_accessor :name, :logo, :login_logo, :company, :menu_items,
7
- :route_builder, :sign_out_path, :sidebar_background_class,
7
+ :route_builder, :sign_out_path, :sidebar_class, :sidebar_background_class,
8
8
  :nav_container, :nav_class, :layout_container, :layout_class,
9
9
  :sidebar, :back_to_top
10
10
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  # needed for gem
4
4
  module Olivander
5
- VERSION = '0.2.0.47'
5
+ VERSION = '0.2.0.48'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: five-two-nw-olivander
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.47
4
+ version: 0.2.0.48
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Dennis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-06-11 00:00:00.000000000 Z
11
+ date: 2025-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chartkick