card-mod-search 0.15.0 → 0.15.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65e8166a82d2feff946e6181a24c00da4cb6bf0d7ce8a16a11c2b7b22db118d3
4
- data.tar.gz: bd16364e72bfad3e63a38b0682dc9d3de2c500453b612b14030f12b72117f045
3
+ metadata.gz: b008892d84099ca72467e23c9513d17e35bbd9beec7a8cd382bf389da67a4447
4
+ data.tar.gz: ed4cdb318be0ab29ab5e072e6831e622c3affca32eb624e3ce0de7e44581b986
5
5
  SHA512:
6
- metadata.gz: aa9207b80f1c7027f273e95adfe53f81ff790584d86e1c062f4588e39f63e8039a425a1f1aea06b46af30a32062fd25bc5279cb0639f9fe2129b4f7917de114d
7
- data.tar.gz: 2881e5b1bdcf6a85411e9dad390a06f61c03ffe110503daed66b98eaf9a9e67a50551471ce77c6214f74d0bddf0aa562221b09e7ebe5cf7ddb74e4eca8705404
6
+ metadata.gz: 3d5c0967389b56328ef7a2bcd3fc3e0bc71d3fa8340d098cb11233f87228d86c321ebe1c34eaa32e544d8f2591a0a595d1a327fb7deba6a7642d7ada0737aae7
7
+ data.tar.gz: 2956a04a96dd9851e6185de5a99efd942ddde353776c23567af8523b9815af9c58bfbe029d146fe8649e128df69c2cd73a88ab737412b189afb2f22571575c4a
data/README.md CHANGED
@@ -0,0 +1,4 @@
1
+ <!--
2
+ # @title README - mod: search
3
+ -->
4
+ # Search mod
@@ -21,4 +21,5 @@ class decko.searchBox
21
21
  window.location = url if url
22
22
 
23
23
  form: -> @box.closest "form"
24
- keyword: -> @form().find("#query_keyword").val()
24
+ keyword: -> @keywordBox().val()
25
+ keywordBox: -> @form().find "#query_keyword"
@@ -0,0 +1,4 @@
1
+ de:
2
+ search_search_box_placeholder: Suche
3
+ search_results_title: Suchergebnisse
4
+ search_results_for: Ergebnisse für
@@ -1,4 +1,4 @@
1
1
  // autocomplete.js.coffee
2
2
  (function(){decko.slot.ready(function(e){return e.find("._autocomplete").each(function(){return decko.initAutoCardPlete($(this))}),e.find("._select2autocomplete").each(function(){return decko.select2Autocomplete.init($(this))})}),decko.initAutoCardPlete=function(e){var t,n;if(t=e.data("options-card"))return n=t+".json?view=name_match",e.autocomplete({source:decko.slot.path(n)})},decko.select2Autocomplete={init:function(e,t,n){var o;return o=$.extend({},this._defaults(e),t),n&&$.extend(o.ajax,n),e.select2(o)},_defaults:function(e){return{multiple:!1,width:"100%!important",minimumInputLength:0,maximumSelectionSize:1,placeholder:e.attr("placeholder"),escapeMarkup:function(e){return e},ajax:{delay:200,cache:!0,url:decko.path(":search.json"),processResults:function(e){return{results:e}},data:function(e){return{query:{keyword:e.term},view:"complete"}}}}}}}).call(this);
3
3
  // search_box.js.coffee
4
- (function(){$(window).ready(function(){var t,o;return o=$("._search-box"),t=new decko.searchBox(o),o.data("searchBox",t),t.init()}),decko.searchBox=function(){function t(t){this.box=t,this.config={source:this.box.data("completepath"),select:this.select}}return t.prototype.init=function(){return this.box.autocomplete(this.config,{html:!0})},t.prototype.select=function(t,o){var e;if((e=o.item).url)return window.location=e.url},t.prototype.goto=function(){},t.prototype.search=function(){},t}()}).call(this);
4
+ (function(){$(window).ready(function(){var t,o;return o=$("._search-box"),t=new decko.searchBox(o),o.data("searchBox",t),t.init()}),decko.searchBox=function(){function t(t){this.box=t,this.sourcepath=this.box.data("completepath"),this.originalpath=this.sourcepath,this.config={source:this.sourcepath,select:this.select}}return t.prototype.init=function(){return this.box.autocomplete(this.config,{html:!0})},t.prototype.select=function(t,o){var e;if(e=o.item.url)return window.location=e},t.prototype.form=function(){return this.box.closest("form")},t.prototype.keyword=function(){return this.keywordBox().val()},t.prototype.keywordBox=function(){return this.form().find("#query_keyword")},t}()}).call(this);
@@ -96,15 +96,6 @@ end
96
96
 
97
97
  format :csv do
98
98
  view :core, :core, mod: All::Csv::CsvFormat
99
- #
100
- # view :card_list do
101
- # items = super()
102
- # if depth.zero?
103
- # title_row + items
104
- # else
105
- # items
106
- # end
107
- # end
108
99
  end
109
100
 
110
101
  format :html do
@@ -50,6 +50,8 @@ def each_item_name_with_options _content=nil
50
50
  end
51
51
 
52
52
  format do
53
+ view(:count, cache: :never) { super() }
54
+
53
55
  def search_with_params
54
56
  @search_with_params ||= search_with_rescue search_params
55
57
  end
@@ -76,3 +78,7 @@ format do
76
78
  Card::View.normalize view
77
79
  end
78
80
  end
81
+
82
+ format :html do
83
+ view(:count, cache: :never) { super() }
84
+ end
data/set/type/cardtype.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  include_set Abstract::CqlSearch
2
2
 
3
+ # should name sorting be hard coded here??
3
4
  def cql_content
4
5
  { type_id: id, sort_by: :name }
5
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-search
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-01-04 00:00:00.000000000 Z
13
+ date: 2023-03-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: card
@@ -18,56 +18,56 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.105.0
21
+ version: 1.105.1
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 1.105.0
28
+ version: 1.105.1
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: card-mod-collection
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.15.0
35
+ version: 0.15.1
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.15.0
42
+ version: 0.15.1
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: card-mod-format
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.15.0
49
+ version: 0.15.1
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - '='
55
55
  - !ruby/object:Gem::Version
56
- version: 0.15.0
56
+ version: 0.15.1
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: card-mod-help
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.15.0
63
+ version: 0.15.1
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - '='
69
69
  - !ruby/object:Gem::Version
70
- version: 0.15.0
70
+ version: 0.15.1
71
71
  description: ''
72
72
  email:
73
73
  - info@decko.org
@@ -79,11 +79,12 @@ files:
79
79
  - assets/script/autocomplete.js.coffee
80
80
  - assets/script/search_box.js.coffee
81
81
  - assets/style/search.scss
82
+ - config/locales/de.yml
83
+ - config/locales/en.yml
82
84
  - data/files/mod_search_script_asset_output/file.js
83
85
  - data/real.yml
84
86
  - data/test.yml
85
87
  - lib/card/mod/search.rb
86
- - locales/en.yml
87
88
  - set/abstract/0_search.rb
88
89
  - set/abstract/0_search/checkbox_item.haml
89
90
  - set/abstract/0_search/search_params.rb
File without changes