anchormodel 0.2.5 → 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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/Gemfile.lock +27 -21
- data/README.md +3 -3
- data/VERSION +1 -1
- data/anchormodel.gemspec +4 -4
- data/doc/Anchormodel/ActiveModelTypeValueMulti.html +3 -3
- data/doc/Anchormodel/ActiveModelTypeValueSingle.html +3 -3
- data/doc/Anchormodel/Attribute.html +3 -3
- data/doc/Anchormodel/ModelMixin.html +3 -3
- data/doc/Anchormodel/SimpleFormInputs/Helpers/AnchormodelInputsCommon.html +27 -5
- data/doc/Anchormodel/SimpleFormInputs/Helpers.html +3 -3
- data/doc/Anchormodel/SimpleFormInputs.html +3 -3
- data/doc/Anchormodel/Util.html +3 -3
- data/doc/Anchormodel/Version.html +3 -3
- data/doc/Anchormodel.html +22 -20
- data/doc/AnchormodelCheckBoxesInput.html +3 -3
- data/doc/AnchormodelGenerator.html +3 -3
- data/doc/AnchormodelInput.html +3 -3
- data/doc/AnchormodelRadioButtonsInput.html +3 -3
- data/doc/_index.html +4 -4
- data/doc/class_list.html +3 -6
- data/doc/css/full_list.css +3 -3
- data/doc/css/style.css +0 -6
- data/doc/file.README.html +5 -5
- data/doc/file_list.html +2 -5
- data/doc/frames.html +5 -10
- data/doc/index.html +5 -5
- data/doc/js/app.js +264 -294
- data/doc/js/full_list.js +4 -30
- data/doc/method_list.html +2 -5
- data/doc/top-level-namespace.html +3 -3
- data/lib/anchormodel/simple_form_inputs/helpers/anchormodel_inputs_common.rb +12 -1
- data/lib/anchormodel.rb +1 -0
- metadata +3 -3
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'
|
|
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
|
-
|
|
175
|
-
|
|
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
|
-
|
|
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
|
-
— Documentation by YARD 0.9.
|
|
9
|
+
— 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
|
|
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.
|
|
105
|
+
0.9.28 (ruby-3.3.5).
|
|
106
106
|
</div>
|
|
107
107
|
|
|
108
108
|
</div>
|
|
@@ -40,7 +40,18 @@ Affected object: #{object.inspect}")
|
|
|
40
40
|
sf_selection_key => selected_key
|
|
41
41
|
)
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
if options[:collection]
|
|
44
|
+
# Case where collection is given as an option consisting of an array of pairs
|
|
45
|
+
if options[:collection].first.is_a?(Enumerable) && options[:collection].first&.size == 2
|
|
46
|
+
@collection = options[:collection]
|
|
47
|
+
else
|
|
48
|
+
# Case where collection is given as an option consisting of an array of anchormodels
|
|
49
|
+
@collection = collect(options[:collection])
|
|
50
|
+
end
|
|
51
|
+
else
|
|
52
|
+
# Case where collection is not given
|
|
53
|
+
@collection = collect(am_class.all)
|
|
54
|
+
end
|
|
44
55
|
|
|
45
56
|
before_render_input
|
|
46
57
|
|
data/lib/anchormodel.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: anchormodel
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sandro Kalbermatter
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: rails
|
|
@@ -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:
|
|
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: []
|