effective_search 0.8.0 → 0.8.1

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: 83d826d688fa3d81c054904cb345337677d2be1ba45d16114c774be17c4d7034
4
- data.tar.gz: 51895c70ac58d0d5972e44e0cd97491924b8f537cbb32320ffec60705f3fc7cb
3
+ metadata.gz: f66cb55a46136100462799b067534d975e5db7bd905b92f7b57e60453ef1040a
4
+ data.tar.gz: 203f28a6bcc556d6eee19ced21300f9ee1f3214a574606be7976524f5c60737c
5
5
  SHA512:
6
- metadata.gz: 2c5a18018ad7a3501a00316107ddfb27d5d518081021e927b2a853ccc7cac7091f09b7401981284c2deb054e1131a2ab4e91e8a93a1085f14b1c9217ebbfa737
7
- data.tar.gz: b4257f2cd361ba2a71d78966ec7cb779bfbcd2f24d7d599f9f42a47aff406df2dea3c63d2757538c7016a3d7a3b4f7e2b04c280fa44b59ff54779a0a046afef1
6
+ metadata.gz: 726f69c2abd7a31d1eb16cef94ae30aea6404592aeefdb48c51c0073583862c42c5e2240e0f4f52e74fe9279a2796d1f8ffd2b74752dfa22c239c62191fd4cad
7
+ data.tar.gz: fae20d7458c4601e83d347f51b92bba5f3853c80700ee17181fe27e0bfd6d14106afb2d6cb1444210558782b97215d97e210856d04242e04f0c9592d36221087
@@ -63,8 +63,11 @@ $(document).on('keydown', function(event) {
63
63
  var tag = event.target.tagName;
64
64
  if (tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT' || event.target.isContentEditable) return;
65
65
 
66
+ var $modal = $('#effective-search-admin-modal');
67
+ if ($modal.length === 0) return;
68
+
66
69
  event.preventDefault();
67
- $('#effective-search-admin-modal').modal('show');
70
+ $modal.modal('show');
68
71
  });
69
72
 
70
73
  // Auto focus the search input when the modal is shown
@@ -1,9 +1,10 @@
1
- #effective-search-admin-modal.modal.fade{tabindex: '-1', role: 'dialog'}
2
- .modal-dialog.modal-lg{role: 'document'}
3
- .modal-content
4
- .modal-body
5
- - search = EffectiveSearch.AdminSearch.new
6
- = render('admin/search/search', search: search, modal: true)
1
+ - if EffectiveResources.authorized?(self, :index, EffectiveSearch.AdminSearch)
2
+ #effective-search-admin-modal.modal.fade{tabindex: '-1', role: 'dialog'}
3
+ .modal-dialog.modal-lg{role: 'document'}
4
+ .modal-content
5
+ .modal-body
6
+ - search = EffectiveSearch.AdminSearch.new
7
+ = render('admin/search/search', search: search, modal: true)
7
8
 
8
- .modal-footer.bg-light.p-1
9
- %small.text-muted Search by name, title, email, or order number. Quick open with forward slash.
9
+ .modal-footer.bg-light.p-1
10
+ %small.text-muted Search by name, title, email, or order number. Quick open with forward slash.
@@ -1,3 +1,3 @@
1
1
  module EffectiveSearch
2
- VERSION = '0.8.0'.freeze
2
+ VERSION = '0.8.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_search
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect