arctic_admin 3.2.1 → 4.0.0.alpha
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 +4 -4
- data/app/assets/javascripts/arctic_admin/base.js +0 -2
- data/app/assets/javascripts/arctic_admin/main.js +41 -90
- data/app/assets/stylesheets/arctic_admin/layouts/_filter.scss +18 -1
- data/app/assets/stylesheets/arctic_admin/layouts/_sidebar.scss +6 -0
- data/app/assets/stylesheets/arctic_admin/pages/_index.scss +6 -0
- data/lib/arctic_admin/version.rb +1 -1
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d80f79149e44a52c1d586e425e82313f2d83aea8455d59eaba12a72fb94abc30
|
4
|
+
data.tar.gz: ff9b250756327bb54eb0ee374d4cacb0a9cb7b6090da861ee85beceda2534f62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6844d6c0fbd22ce592aa64c9f5f27e93033564f44bd7856a3e9d2f3f0ab52ffb5c8a44c106ec9eac85e7dd50c6213649930bfa303a451b4ea867405bc9ded0fd
|
7
|
+
data.tar.gz: 159bce7c3570d89754af6964c035497b6adbc0a87f6f709a06fa556c4ddfdd924a48866518336e6424a81cd0efa6ae87df472c3e9f8442d10bf4ef846bb62548
|
@@ -1,99 +1,50 @@
|
|
1
|
-
|
2
|
-
var animationFilterDone = true
|
3
|
-
$(document).on('click touchstart', '#sidebar', function (e) {
|
4
|
-
if (animationFilterDone == true) {
|
5
|
-
var position = $(this).position()
|
6
|
-
var width = $(this).width()
|
7
|
-
var target = e.target
|
8
|
-
if (
|
9
|
-
e.pageX < position.left &&
|
10
|
-
target.tagName != 'SELECT' &&
|
11
|
-
target.tagName != 'OPTION'
|
12
|
-
) {
|
13
|
-
if ($(this).css('right') == '0px') {
|
14
|
-
$(this).css('position', 'fixed')
|
15
|
-
$(this).animate(
|
16
|
-
{
|
17
|
-
right: '-=' + width
|
18
|
-
},
|
19
|
-
600,
|
20
|
-
function () {
|
21
|
-
$(this).removeAttr('style')
|
22
|
-
animationFilterDone = true
|
23
|
-
}
|
24
|
-
)
|
25
|
-
} else {
|
26
|
-
$(this).animate(
|
27
|
-
{
|
28
|
-
right: '+=' + width
|
29
|
-
},
|
30
|
-
600,
|
31
|
-
function () {
|
32
|
-
$(this).css('position', 'absolute')
|
33
|
-
animationFilterDone = true
|
34
|
-
}
|
35
|
-
)
|
36
|
-
}
|
37
|
-
}
|
38
|
-
}
|
39
|
-
})
|
1
|
+
document.addEventListener('DOMContentLoaded', () => {
|
40
2
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
animationDone = false
|
49
|
-
if (tabs.css('left') == '0px') {
|
50
|
-
tabs.animate(
|
51
|
-
{
|
52
|
-
left: '-=' + width
|
53
|
-
},
|
54
|
-
400,
|
55
|
-
function () {
|
56
|
-
animationDone = true
|
57
|
-
}
|
58
|
-
)
|
59
|
-
} else {
|
60
|
-
tabs.animate(
|
61
|
-
{
|
62
|
-
left: '+=' + width
|
63
|
-
},
|
64
|
-
400,
|
65
|
-
function () {
|
66
|
-
animationDone = true
|
67
|
-
}
|
68
|
-
)
|
69
|
-
}
|
3
|
+
// right filter sidebar
|
4
|
+
const sidebar = document.querySelector('#sidebar')
|
5
|
+
if (sidebar) {
|
6
|
+
sidebar.addEventListener('click', event => {
|
7
|
+
const insideSection = document.querySelector('#filters_sidebar_section')
|
8
|
+
if (!(event.target === insideSection || insideSection.contains(event.target))) {
|
9
|
+
sidebar.classList.toggle('sidebar_open')
|
70
10
|
}
|
11
|
+
})
|
12
|
+
}
|
13
|
+
|
14
|
+
const menuButton = document.querySelector('#utility_nav')
|
15
|
+
const menu = document.querySelector('#tabs')
|
16
|
+
|
17
|
+
// toggle menu sidebar with the menu button
|
18
|
+
menuButton.addEventListener('click', event => {
|
19
|
+
const currentUser = document.querySelector('#current_user')
|
20
|
+
const logout = document.querySelector('#logout')
|
21
|
+
const forbiddenLinks = event.target === logout ||
|
22
|
+
logout.contains(event.target) ||
|
23
|
+
event.target === currentUser ||
|
24
|
+
currentUser.contains(event.target)
|
25
|
+
if (!forbiddenLinks) {
|
26
|
+
menu.classList.toggle('tabs_open')
|
71
27
|
}
|
72
28
|
})
|
73
29
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
{
|
83
|
-
left: '-=' + width
|
84
|
-
},
|
85
|
-
400,
|
86
|
-
function () {
|
87
|
-
animationDone = true
|
88
|
-
}
|
89
|
-
)
|
90
|
-
}
|
91
|
-
}
|
30
|
+
// close left menu sidebar on any click outside
|
31
|
+
document.body.addEventListener('click', event => {
|
32
|
+
const forbiddenLinks = event.target === menu ||
|
33
|
+
menu.contains(event.target) ||
|
34
|
+
event.target === menuButton ||
|
35
|
+
menuButton.contains(event.target)
|
36
|
+
if (menu.classList.contains('tabs_open') && !forbiddenLinks) {
|
37
|
+
menu.classList.remove('tabs_open')
|
92
38
|
}
|
93
39
|
})
|
94
40
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
41
|
+
// toggle of nested menu items
|
42
|
+
const nestedMenuItem = document.querySelector('#tabs .has_nested')
|
43
|
+
if (nestedMenuItem) {
|
44
|
+
nestedMenuItem.addEventListener('click', (e) => {
|
45
|
+
e.stopPropagation()
|
46
|
+
nestedMenuItem.classList.toggle('open')
|
47
|
+
})
|
48
|
+
}
|
49
|
+
|
99
50
|
})
|
@@ -49,6 +49,11 @@
|
|
49
49
|
.filter_date_range input {
|
50
50
|
width: 45%;
|
51
51
|
display: inline-block;
|
52
|
+
|
53
|
+
// consistent look of all filters
|
54
|
+
&:nth-child(2) {
|
55
|
+
float: right;
|
56
|
+
}
|
52
57
|
}
|
53
58
|
|
54
59
|
input[type="submit"] {
|
@@ -56,9 +61,21 @@
|
|
56
61
|
line-height: 31px;
|
57
62
|
margin-right: 10px;
|
58
63
|
}
|
64
|
+
|
65
|
+
&.panel {
|
66
|
+
position: relative;
|
67
|
+
}
|
59
68
|
}
|
60
69
|
|
61
70
|
#search-status-_sidebar_section {
|
62
71
|
font-size: 14px;
|
63
72
|
}
|
64
|
-
|
73
|
+
|
74
|
+
// 'Filter' and 'Clear Filters' buttons
|
75
|
+
.buttons {
|
76
|
+
display: flex;
|
77
|
+
justify-content: space-between;
|
78
|
+
align-items: center;
|
79
|
+
margin-top: 1rem;
|
80
|
+
}
|
81
|
+
}
|
@@ -94,8 +94,14 @@ body.index {
|
|
94
94
|
|
95
95
|
#sidebar {
|
96
96
|
position: fixed;
|
97
|
+
transition: .5s;
|
98
|
+
transition-timing-function: ease-in-out;
|
97
99
|
right: - $filter-width;
|
98
100
|
|
101
|
+
&.sidebar_open {
|
102
|
+
right: 0;
|
103
|
+
}
|
104
|
+
|
99
105
|
@media screen and (min-width: $x-lg-width) {
|
100
106
|
right: - $lg-filter-width;
|
101
107
|
}
|
data/lib/arctic_admin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arctic_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0.alpha
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clément Prod'homme
|
@@ -58,20 +58,6 @@ dependencies:
|
|
58
58
|
- - "<"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '3.0'
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: jquery-rails
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - ">="
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '0'
|
68
|
-
type: :runtime
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - ">="
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '0'
|
75
61
|
- !ruby/object:Gem::Dependency
|
76
62
|
name: font-awesome-sass
|
77
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -168,9 +154,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
168
154
|
version: '0'
|
169
155
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
170
156
|
requirements:
|
171
|
-
- - "
|
157
|
+
- - ">"
|
172
158
|
- !ruby/object:Gem::Version
|
173
|
-
version:
|
159
|
+
version: 1.3.1
|
174
160
|
requirements: []
|
175
161
|
rubygems_version: 3.0.3
|
176
162
|
signing_key:
|