five-two-nw-olivander 0.2.0.40 → 0.2.0.41
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5f4e902162ea861a5acb228fa96555d9d4ecd5a6a6f0c9a618f481617c32b1f
|
4
|
+
data.tar.gz: 93946759f63ee81a1bfae3eaff2bfba446c68daa1d25fdf02f93124dfe52e0fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9a23fe88b64c6b7835cd7e2899ae4f37d9b3bea5bd147463b7a19ec38ff96bf752835062e5df86870d5778a8040712a109855902420d99f4190d8ad692c9984
|
7
|
+
data.tar.gz: 59ef2ac3778b8216062052596ca5c8b087b4b30102b9a5bc5dcfd819756ca4680f573daeda6cd858216f11fefaa60ba8810856bcba63536fbfbe1873601be397
|
@@ -37,4 +37,17 @@ $(document).ready(function(e) {
|
|
37
37
|
})
|
38
38
|
label.appendChild(helpCircle)
|
39
39
|
})
|
40
|
+
|
41
|
+
$(window).scroll(function() {
|
42
|
+
if ($(this).scrollTop() > 100) {
|
43
|
+
$('#back-to-top').fadeIn();
|
44
|
+
} else {
|
45
|
+
$('#back-to-top').fadeOut();
|
46
|
+
}
|
47
|
+
});
|
48
|
+
|
49
|
+
$('#back-to-top').click(function(e) {
|
50
|
+
e.preventDefault();
|
51
|
+
$('html, body').animate({ scrollTop: 0 }, '500');
|
52
|
+
});
|
40
53
|
})
|
@@ -48,4 +48,17 @@ ul.no-bullets {
|
|
48
48
|
padding: 0; /* Remove padding */
|
49
49
|
margin: 0; /* Remove margins */
|
50
50
|
}
|
51
|
-
table.dataTable.table-striped > tbody > tr:nth-of-type(2n+1) { background: rgba(0, 0, 0, 0.05); }
|
51
|
+
table.dataTable.table-striped > tbody > tr:nth-of-type(2n+1) { background: rgba(0, 0, 0, 0.05); }
|
52
|
+
/* Back to Top Button */
|
53
|
+
#back-to-top {
|
54
|
+
position: fixed;
|
55
|
+
bottom: 20px;
|
56
|
+
right: 20px;
|
57
|
+
display: none;
|
58
|
+
z-index: 100000;
|
59
|
+
font-size: 18px;
|
60
|
+
padding: 10px 15px;
|
61
|
+
border-radius: 50%;
|
62
|
+
}
|
63
|
+
/* Hover effect */
|
64
|
+
#back-to-top:hover { background-color: #999; color: white; }
|
@@ -9,6 +9,9 @@
|
|
9
9
|
-# .preloader.flex-column.justify-content-center.align-items-center
|
10
10
|
-# %img.animation__shake{:alt => "FFES Logo", :height => "60", :src => image_path("logo.gif")}
|
11
11
|
= render partial: 'layouts/olivander/adminlte/navbar'
|
12
|
+
- if Olivander::CurrentContext.application_context.back_to_top?
|
13
|
+
%a.btn.btn-secondary.btn-lg#back-to-top{ href: '#' }
|
14
|
+
%i.fa.fa-arrow-up
|
12
15
|
- if Olivander::CurrentContext.application_context.sidebar?
|
13
16
|
= render partial: 'layouts/olivander/adminlte/sidebar'
|
14
17
|
-# = render partial: 'layouts/olivander/adminlte/content'
|
@@ -1,21 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Olivander
|
4
|
+
# DTO to represent the overall application context
|
2
5
|
class ApplicationContext
|
3
6
|
attr_accessor :name, :logo, :login_logo, :company, :menu_items,
|
4
7
|
:route_builder, :sign_out_path, :sidebar_background_class,
|
5
8
|
:nav_container, :nav_class, :layout_container, :layout_class,
|
6
|
-
:sidebar
|
7
|
-
|
8
|
-
DEFAULT_APPLICATION_NAME = 'Application Name'
|
9
|
-
DEFAULT_SIGN_OUT_PATH = '/users/sign_out'
|
10
|
-
DEFAULT_HEADER_CLASSES = ''
|
11
|
-
DEFAULT_LOGO_URL = '/images/olivander_logo.png'
|
12
|
-
DEFAULT_LOGO_ALT = 'Logo Image'
|
13
|
-
DEFAULT_LOGIN_LOGO_URL = '/images/olivander_login_logo.png'
|
14
|
-
DEFAULT_LOGIN_LOGO_ALT = 'Login Logo Image'
|
15
|
-
DEFAULT_COMPANY_URL = '/'
|
16
|
-
DEFAULT_COMPANY_ALT = 'Company Name'
|
17
|
-
DEFAULT_LAYOUT_CLASS = 'hold-transition sidebar-mini layout-fixed'
|
18
|
-
DEFAULT_NAV_CLASS = 'navbar-expand navbar-white navbar-light'
|
9
|
+
:sidebar, :back_to_top
|
10
|
+
|
11
|
+
DEFAULT_APPLICATION_NAME = 'Application Name'
|
12
|
+
DEFAULT_SIGN_OUT_PATH = '/users/sign_out'
|
13
|
+
DEFAULT_HEADER_CLASSES = ''
|
14
|
+
DEFAULT_LOGO_URL = '/images/olivander_logo.png'
|
15
|
+
DEFAULT_LOGO_ALT = 'Logo Image'
|
16
|
+
DEFAULT_LOGIN_LOGO_URL = '/images/olivander_login_logo.png'
|
17
|
+
DEFAULT_LOGIN_LOGO_ALT = 'Login Logo Image'
|
18
|
+
DEFAULT_COMPANY_URL = '/'
|
19
|
+
DEFAULT_COMPANY_ALT = 'Company Name'
|
20
|
+
DEFAULT_LAYOUT_CLASS = 'hold-transition sidebar-mini layout-fixed'
|
21
|
+
DEFAULT_NAV_CLASS = 'navbar-expand navbar-white navbar-light'
|
19
22
|
|
20
23
|
def initialize(**kwargs)
|
21
24
|
self.name = kwargs[:name] || ENV['OLIVANDER_APP_NAME'] || DEFAULT_APPLICATION_NAME
|
@@ -24,11 +27,12 @@ module Olivander
|
|
24
27
|
self.company = kwargs[:company] || Company.new(name: kwargs[:company_name], url: kwargs[:company_url])
|
25
28
|
self.sign_out_path = kwargs[:sign_out_path] || DEFAULT_SIGN_OUT_PATH
|
26
29
|
self.menu_items = kwargs[:menu_items] || []
|
27
|
-
self.nav_container = kwargs[:nav_container] || 'false'
|
30
|
+
self.nav_container = kwargs[:nav_container] || 'false' == 'true'
|
28
31
|
self.nav_class = kwargs[:nav_class] || DEFAULT_NAV_CLASS
|
29
|
-
self.layout_container = kwargs[:layout_container] || 'false'
|
32
|
+
self.layout_container = kwargs[:layout_container] || 'false' == 'true'
|
30
33
|
self.layout_class = kwargs[:layout_class] || DEFAULT_LAYOUT_CLASS
|
31
|
-
self.sidebar = kwargs[:sidebar] ||
|
34
|
+
self.sidebar = (kwargs[:sidebar] || true)
|
35
|
+
self.back_to_top = (kwargs[:back_to_top] || true)
|
32
36
|
begin
|
33
37
|
self.route_builder = RouteBuilder.new
|
34
38
|
rescue NameError
|
@@ -36,16 +40,20 @@ module Olivander
|
|
36
40
|
end
|
37
41
|
end
|
38
42
|
|
43
|
+
def back_to_top?
|
44
|
+
back_to_top.to_s == 'true'
|
45
|
+
end
|
46
|
+
|
39
47
|
def nav_container?
|
40
|
-
nav_container == true
|
48
|
+
nav_container.to_s == 'true'
|
41
49
|
end
|
42
50
|
|
43
51
|
def layout_container?
|
44
|
-
layout_container == true
|
52
|
+
layout_container.to_s == 'true'
|
45
53
|
end
|
46
54
|
|
47
55
|
def sidebar?
|
48
|
-
sidebar == true
|
56
|
+
sidebar.to_s == 'true'
|
49
57
|
end
|
50
58
|
|
51
59
|
def visible_modules
|
@@ -65,6 +73,7 @@ module Olivander
|
|
65
73
|
end
|
66
74
|
end
|
67
75
|
|
76
|
+
# DTO for the current application logo
|
68
77
|
class Logo
|
69
78
|
attr_accessor :url, :alt
|
70
79
|
|
@@ -74,6 +83,7 @@ module Olivander
|
|
74
83
|
end
|
75
84
|
end
|
76
85
|
|
86
|
+
# DTO for the current login logo
|
77
87
|
class LoginLogo
|
78
88
|
attr_accessor :url, :alt
|
79
89
|
|
@@ -83,6 +93,7 @@ module Olivander
|
|
83
93
|
end
|
84
94
|
end
|
85
95
|
|
96
|
+
# DTO for information about the Company for which this app is deployed
|
86
97
|
class Company
|
87
98
|
attr_accessor :name, :url
|
88
99
|
|
@@ -93,12 +104,13 @@ module Olivander
|
|
93
104
|
end
|
94
105
|
end
|
95
106
|
|
107
|
+
# DTO for state in the current thread of execution
|
96
108
|
class CurrentContext < ActiveSupport::CurrentAttributes
|
97
109
|
attribute :application_context
|
98
110
|
attribute :user, :ability
|
99
|
-
DEFAULT_USER_DISPLAY
|
111
|
+
DEFAULT_USER_DISPLAY = 'No User Set'
|
100
112
|
|
101
|
-
def build
|
113
|
+
def build
|
102
114
|
self.application_context ||= ::Olivander::ApplicationContext.new
|
103
115
|
self.user ||= build_dummy_user
|
104
116
|
self.ability ||= build_dummy_ability
|
data/lib/olivander/version.rb
CHANGED
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.
|
4
|
+
version: 0.2.0.41
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Dennis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chartkick
|