anchormodel 0.2.6 → 0.3.0

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.
data/doc/js/full_list.js CHANGED
@@ -62,25 +62,8 @@ function enableToggles() {
62
62
  evt.stopPropagation();
63
63
  evt.preventDefault();
64
64
  $(this).parent().parent().toggleClass('collapsed');
65
- $(this).attr('aria-expanded', function (i, attr) {
66
- return attr == 'true' ? 'false' : 'true'
67
- });
68
65
  highlight();
69
66
  });
70
-
71
- // navigation of nested classes using keyboard
72
- $('#full_list a.toggle').on('keypress',function(evt) {
73
- // enter key is pressed
74
- if (evt.which == 13) {
75
- evt.stopPropagation();
76
- evt.preventDefault();
77
- $(this).parent().parent().toggleClass('collapsed');
78
- $(this).attr('aria-expanded', function (i, attr) {
79
- return attr == 'true' ? 'false' : 'true'
80
- });
81
- highlight();
82
- }
83
- });
84
67
  }
85
68
 
86
69
  function populateSearchCache() {
@@ -108,7 +91,7 @@ function enableSearch() {
108
91
  }
109
92
  });
110
93
 
111
- $('#full_list').after("<div id='noresults' role='status' style='display: none'></div>");
94
+ $('#full_list').after("<div id='noresults' style='display:none'></div>");
112
95
  }
113
96
 
114
97
  function ignoredKeyPress(event) {
@@ -171,14 +154,11 @@ function partialSearch(searchString, offset) {
171
154
  function searchDone() {
172
155
  searchTimeout = null;
173
156
  highlight();
174
- var found = $('#full_list li:visible').size();
175
- if (found === 0) {
176
- $('#noresults').text('No results were found.');
157
+ if ($('#full_list li:visible').size() === 0) {
158
+ $('#noresults').text('No results were found.').hide().fadeIn();
177
159
  } else {
178
- // This is read out to screen readers
179
- $('#noresults').text('There are ' + found + ' results.');
160
+ $('#noresults').text('').hide();
180
161
  }
181
- $('#noresults').show();
182
162
  $('#content').removeClass('insearch');
183
163
  }
184
164
 
@@ -208,12 +188,6 @@ function expandTo(path) {
208
188
  $target.addClass('clicked');
209
189
  $target.removeClass('collapsed');
210
190
  $target.parentsUntil('#full_list', 'li').removeClass('collapsed');
211
-
212
- $target.find('a.toggle').attr('aria-expanded', 'true')
213
- $target.parentsUntil('#full_list', 'li').each(function(i, el) {
214
- $(el).find('> div > a.toggle').attr('aria-expanded', 'true');
215
- });
216
-
217
191
  if($target[0]) {
218
192
  window.scrollTo(window.scrollX, $target.offset().top - 250);
219
193
  highlight();
data/doc/method_list.html CHANGED
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html>
2
- <html >
2
+ <html>
3
3
  <head>
4
4
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
5
  <meta charset="utf-8" />
@@ -38,10 +38,7 @@
38
38
 
39
39
  </div>
40
40
 
41
- <div id="search">
42
- <label for="search-class">Search:</label>
43
- <input id="search-class" type="text" />
44
- </div>
41
+ <div id="search">Search: <input type="text" /></div>
45
42
  </div>
46
43
 
47
44
  <ul id="full_list" class="method">
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Top Level Namespace
8
8
 
9
- &mdash; Documentation by YARD 0.9.37
9
+ &mdash; Documentation by YARD 0.9.28
10
10
 
11
11
  </title>
12
12
 
@@ -100,9 +100,9 @@
100
100
  </div>
101
101
 
102
102
  <div id="footer">
103
- Generated on Thu Aug 7 15:55:29 2025 by
103
+ Generated on Thu Jan 22 13:11:54 2026 by
104
104
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
105
- 0.9.37 (ruby-3.3.5).
105
+ 0.9.28 (ruby-3.3.5).
106
106
  </div>
107
107
 
108
108
  </div>
data/lib/anchormodel.rb CHANGED
@@ -57,6 +57,7 @@ class Anchormodel
57
57
  end
58
58
 
59
59
  # Register self
60
+ fail("Duplicate anchor model key #{key.inspect} for #{self.class}.") if entries_hash.key?(key)
60
61
  entries_list << self
61
62
  entries_hash[key] = self
62
63
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anchormodel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandro Kalbermatter
@@ -263,7 +263,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
263
263
  - !ruby/object:Gem::Version
264
264
  version: '0'
265
265
  requirements: []
266
- rubygems_version: 3.6.9
266
+ rubygems_version: 4.0.4
267
267
  specification_version: 4
268
268
  summary: Bringing object-oriented programming to Rails enums
269
269
  test_files: []