effective_search 0.3.0 → 0.3.2
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/effective_search/base.js +24 -0
- data/app/assets/stylesheets/effective_search/base.scss +26 -1
- data/app/views/admin/search/_user.html.haml +12 -11
- data/app/views/effective/search/_form_nav_icon.html.haml +3 -1
- data/lib/effective_search/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cdff688df4f3ff9af7c692fd7f0d93fe50930516572f05713f437796d3e217b4
|
|
4
|
+
data.tar.gz: 564d67a8426d0f4d33a3732e6aeca69b6cfa25523a231ae967c3778ebe8a3b8d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9e31933471bc10e0468e73a6a77522d4389e24b0e7c957066bf6cfe93ec012af031dac21570ae07b9f0662d8e7daea3d692f2fb91a16339a7b3524dfc414a9ce
|
|
7
|
+
data.tar.gz: 244590f2c1d6a07aab61d5de6c0d8d537b41639fba125e31d5b7dade17a699a05190e6795800b61f48b0143b919f592ac7ad91b53db7863022a2152c8e7e1a6b
|
|
@@ -1,7 +1,31 @@
|
|
|
1
|
+
$(document).on('show.bs.collapse', '#effective-search-icon-form', function () {
|
|
2
|
+
var $form = $(this);
|
|
3
|
+
$("#effective-search-overlay").addClass('active');
|
|
4
|
+
|
|
5
|
+
// Fade in form: wait for browser to paint opacity:0, then transition to 1
|
|
6
|
+
requestAnimationFrame(function() {
|
|
7
|
+
requestAnimationFrame(function() {
|
|
8
|
+
$form.css('opacity', '1');
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
|
|
1
13
|
$(document).on('shown.bs.collapse', '#effective-search-icon-form', function () {
|
|
14
|
+
$(this).css('opacity', '');
|
|
2
15
|
$("#effective-search-input").focus();
|
|
3
16
|
});
|
|
4
17
|
|
|
18
|
+
$(document).on('hide.bs.collapse', '#effective-search-icon-form', function () {
|
|
19
|
+
$("#effective-search-overlay").removeClass('active');
|
|
20
|
+
});
|
|
21
|
+
|
|
5
22
|
$(document).on('hidden.bs.collapse', '#effective-search-icon-form', function () {
|
|
23
|
+
$(this).css('opacity', '');
|
|
6
24
|
$("#effective-search-input").blur();
|
|
7
25
|
});
|
|
26
|
+
|
|
27
|
+
$(document).on('keydown', function (e) {
|
|
28
|
+
if (e.key === 'Escape' && $('#effective-search-icon-form').hasClass('show')) {
|
|
29
|
+
$('#effective-search-icon-form').collapse('hide');
|
|
30
|
+
}
|
|
31
|
+
});
|
|
@@ -62,13 +62,38 @@ div.effective-search {
|
|
|
62
62
|
text-decoration: none;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
#effective-search-overlay {
|
|
66
|
+
position: fixed;
|
|
67
|
+
top: 0;
|
|
68
|
+
left: 0;
|
|
69
|
+
width: 100vw;
|
|
70
|
+
height: 100vh;
|
|
71
|
+
// background-color: #f8f9fc;
|
|
72
|
+
opacity: 0;
|
|
73
|
+
z-index: 8999;
|
|
74
|
+
pointer-events: none;
|
|
75
|
+
transition: opacity 0.35s ease;
|
|
76
|
+
|
|
77
|
+
&.active {
|
|
78
|
+
opacity: 0.5;
|
|
79
|
+
pointer-events: auto;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
65
83
|
#effective-search-icon-form {
|
|
66
|
-
position:
|
|
84
|
+
position: fixed;
|
|
67
85
|
left: 0;
|
|
68
86
|
top: 0;
|
|
69
87
|
z-index: 9000;
|
|
70
88
|
height: 90px;
|
|
71
89
|
border-bottom: solid 1px;
|
|
90
|
+
|
|
91
|
+
&.collapsing {
|
|
92
|
+
height: 90px !important;
|
|
93
|
+
width: 100% !important;
|
|
94
|
+
opacity: 0;
|
|
95
|
+
transition: opacity 0.35s ease !important;
|
|
96
|
+
}
|
|
72
97
|
}
|
|
73
98
|
|
|
74
99
|
#effective-search-icon {
|
|
@@ -5,17 +5,18 @@
|
|
|
5
5
|
= user.to_s
|
|
6
6
|
%br
|
|
7
7
|
%small.text-muted
|
|
8
|
-
- if
|
|
9
|
-
= membership.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
- if user.class.try(:effective_memberships_owner?)
|
|
9
|
+
- if(membership = user.try(:membership) || user.try(:organizations).try(:first).try(:membership)).present?
|
|
10
|
+
= membership.statuses.to_sentence
|
|
11
|
+
= membership.categories.to_sentence
|
|
12
|
+
member
|
|
13
|
+
- if membership.number.present?
|
|
14
|
+
= ' #' + membership.number
|
|
15
|
+
- elsif user.membership_removed?
|
|
16
|
+
Removed member
|
|
17
|
+
- else
|
|
18
|
+
Not a member
|
|
19
|
+
= ' • '.html_safe
|
|
19
20
|
|
|
20
21
|
= user.email
|
|
21
22
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
%li.nav-item.effective-search-nav-item.d-flex
|
|
2
|
-
#effective-search-icon-form.collapse.width.w-100.bg-
|
|
2
|
+
#effective-search-icon-form.collapse.width.w-100.bg-primary.shadow-sm.rounded-0
|
|
3
3
|
.d-flex.p-4
|
|
4
4
|
= effective_form_with(scope: :q, model: EffectiveSearch.Search.new, method: :get, url: effective_search.search_path, layout: :inline, class: "w-100") do |f|
|
|
5
5
|
= f.text_field :term, label: false, placeholder: 'Search', autofocus: false, id: "effective-search-input", class: "form-control-lg border-0 w-100"
|
|
@@ -7,5 +7,7 @@
|
|
|
7
7
|
.nav-link.ml-auto.flex-shrink-1.text-white{"data-toggle":"collapse", "data-target":"#effective-search-icon-form", role: "button"}
|
|
8
8
|
= icon('x', class: "big-1")
|
|
9
9
|
|
|
10
|
+
#effective-search-overlay.bg-primary{"data-toggle":"collapse", "data-target":"#effective-search-icon-form"}
|
|
11
|
+
|
|
10
12
|
.nav-link#effective-search-icon.d-flex.align-items-center{"data-target":"#effective-search-icon-form", "data-toggle":"collapse"}
|
|
11
13
|
= icon('search')
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: effective_search
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Code and Effect
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-02-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|