compony 0.5.1 → 0.5.3
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 +14 -0
- data/README.md +33 -0
- data/VERSION +1 -1
- data/compony.gemspec +4 -4
- data/config/routes.rb +9 -6
- data/doc/ComponentGenerator.html +3 -3
- data/doc/Components.html +3 -3
- data/doc/ComponentsGenerator.html +3 -3
- data/doc/Compony/Component.html +3 -3
- data/doc/Compony/ComponentMixins/Default/Labelling.html +3 -3
- data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +3 -3
- data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +40 -28
- data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +3 -3
- data/doc/Compony/ComponentMixins/Default/Standalone.html +3 -3
- data/doc/Compony/ComponentMixins/Default.html +3 -3
- data/doc/Compony/ComponentMixins/Resourceful.html +3 -3
- data/doc/Compony/ComponentMixins.html +3 -3
- data/doc/Compony/Components/Button.html +11 -7
- data/doc/Compony/Components/Destroy.html +3 -3
- data/doc/Compony/Components/Edit.html +3 -3
- data/doc/Compony/Components/Form.html +148 -77
- data/doc/Compony/Components/New.html +3 -3
- data/doc/Compony/Components/WithForm.html +3 -3
- data/doc/Compony/Components.html +3 -3
- data/doc/Compony/ControllerMixin.html +3 -3
- data/doc/Compony/Engine.html +3 -3
- data/doc/Compony/MethodAccessibleHash.html +3 -3
- data/doc/Compony/ModelFields/Anchormodel.html +3 -3
- data/doc/Compony/ModelFields/Association.html +4 -4
- data/doc/Compony/ModelFields/Attachment.html +3 -3
- data/doc/Compony/ModelFields/Base.html +3 -3
- data/doc/Compony/ModelFields/Boolean.html +3 -3
- data/doc/Compony/ModelFields/Color.html +3 -3
- data/doc/Compony/ModelFields/Currency.html +3 -3
- data/doc/Compony/ModelFields/Date.html +3 -3
- data/doc/Compony/ModelFields/Datetime.html +3 -3
- data/doc/Compony/ModelFields/Decimal.html +3 -3
- data/doc/Compony/ModelFields/Email.html +3 -3
- data/doc/Compony/ModelFields/Float.html +3 -3
- data/doc/Compony/ModelFields/Integer.html +3 -3
- data/doc/Compony/ModelFields/Percentage.html +3 -3
- data/doc/Compony/ModelFields/Phone.html +3 -3
- data/doc/Compony/ModelFields/RichText.html +3 -3
- data/doc/Compony/ModelFields/String.html +3 -3
- data/doc/Compony/ModelFields/Text.html +3 -3
- data/doc/Compony/ModelFields/Time.html +3 -3
- data/doc/Compony/ModelFields/Url.html +3 -3
- data/doc/Compony/ModelFields.html +3 -3
- data/doc/Compony/ModelMixin.html +3 -3
- data/doc/Compony/NaturalOrdering.html +3 -3
- data/doc/Compony/RequestContext.html +3 -3
- data/doc/Compony/Version.html +3 -3
- data/doc/Compony/ViewHelpers.html +32 -14
- data/doc/Compony.html +4 -4
- data/doc/ComponyController.html +3 -3
- data/doc/_index.html +4 -4
- data/doc/class_list.html +6 -3
- data/doc/css/full_list.css +3 -3
- data/doc/css/style.css +6 -0
- data/doc/file.README.html +36 -3
- data/doc/file_list.html +5 -2
- data/doc/frames.html +10 -5
- data/doc/index.html +36 -3
- data/doc/js/app.js +294 -264
- data/doc/js/full_list.js +30 -4
- data/doc/method_list.html +152 -141
- data/doc/top-level-namespace.html +3 -3
- data/lib/compony/component_mixins/default/standalone/standalone_dsl.rb +7 -1
- data/lib/compony/components/button.rb +5 -3
- data/lib/compony/components/form.rb +9 -1
- data/lib/compony/model_fields/association.rb +1 -1
- data/lib/compony/view_helpers.rb +12 -4
- data/lib/compony.rb +1 -1
- metadata +3 -3
data/doc/js/full_list.js
CHANGED
@@ -62,8 +62,25 @@ 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
|
+
});
|
65
68
|
highlight();
|
66
69
|
});
|
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
|
+
});
|
67
84
|
}
|
68
85
|
|
69
86
|
function populateSearchCache() {
|
@@ -91,7 +108,7 @@ function enableSearch() {
|
|
91
108
|
}
|
92
109
|
});
|
93
110
|
|
94
|
-
$('#full_list').after("<div id='noresults' style='display:none'></div>");
|
111
|
+
$('#full_list').after("<div id='noresults' role='status' style='display: none'></div>");
|
95
112
|
}
|
96
113
|
|
97
114
|
function ignoredKeyPress(event) {
|
@@ -154,11 +171,14 @@ function partialSearch(searchString, offset) {
|
|
154
171
|
function searchDone() {
|
155
172
|
searchTimeout = null;
|
156
173
|
highlight();
|
157
|
-
|
158
|
-
|
174
|
+
var found = $('#full_list li:visible').size();
|
175
|
+
if (found === 0) {
|
176
|
+
$('#noresults').text('No results were found.');
|
159
177
|
} else {
|
160
|
-
|
178
|
+
// This is read out to screen readers
|
179
|
+
$('#noresults').text('There are ' + found + ' results.');
|
161
180
|
}
|
181
|
+
$('#noresults').show();
|
162
182
|
$('#content').removeClass('insearch');
|
163
183
|
}
|
164
184
|
|
@@ -188,6 +208,12 @@ function expandTo(path) {
|
|
188
208
|
$target.addClass('clicked');
|
189
209
|
$target.removeClass('collapsed');
|
190
210
|
$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
|
+
|
191
217
|
if($target[0]) {
|
192
218
|
window.scrollTo(window.scrollX, $target.offset().top - 250);
|
193
219
|
highlight();
|