compony 0.5.0 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +31 -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 +3 -3
- data/doc/Compony/Components/Destroy.html +3 -3
- data/doc/Compony/Components/Edit.html +3 -3
- data/doc/Compony/Components/Form.html +3 -3
- 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 +25 -25
- 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 +3 -3
- data/doc/Compony.html +3 -3
- 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 +33 -3
- data/doc/file_list.html +5 -2
- data/doc/frames.html +10 -5
- data/doc/index.html +33 -3
- data/doc/js/app.js +294 -264
- data/doc/js/full_list.js +30 -4
- data/doc/method_list.html +5 -2
- data/doc/top-level-namespace.html +3 -3
- data/lib/compony/component_mixins/default/standalone/standalone_dsl.rb +7 -1
- data/lib/compony/model_fields/association.rb +1 -1
- data/lib/compony/model_mixin.rb +5 -1
- metadata +3 -3
data/doc/js/app.js
CHANGED
@@ -1,314 +1,344 @@
|
|
1
|
-
(function() {
|
1
|
+
(function () {
|
2
|
+
var localStorage = {},
|
3
|
+
sessionStorage = {};
|
4
|
+
try {
|
5
|
+
localStorage = window.localStorage;
|
6
|
+
} catch (e) {}
|
7
|
+
try {
|
8
|
+
sessionStorage = window.sessionStorage;
|
9
|
+
} catch (e) {}
|
2
10
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
function() {
|
15
|
-
$(this).parent().nextAll('.source_code').slideUp(100);
|
11
|
+
function createSourceLinks() {
|
12
|
+
$(".method_details_list .source_code").before(
|
13
|
+
"<span class='showSource'>[<a href='#' class='toggleSource'>View source</a>]</span>"
|
14
|
+
);
|
15
|
+
$(".toggleSource").toggle(
|
16
|
+
function () {
|
17
|
+
$(this).parent().nextAll(".source_code").slideDown(100);
|
18
|
+
$(this).text("Hide source");
|
19
|
+
},
|
20
|
+
function () {
|
21
|
+
$(this).parent().nextAll(".source_code").slideUp(100);
|
16
22
|
$(this).text("View source");
|
17
|
-
|
18
|
-
|
23
|
+
}
|
24
|
+
);
|
25
|
+
}
|
19
26
|
|
20
|
-
function createDefineLinks() {
|
27
|
+
function createDefineLinks() {
|
21
28
|
var tHeight = 0;
|
22
|
-
$(
|
23
|
-
$(
|
29
|
+
$(".defines").after(" <a href='#' class='toggleDefines'>more...</a>");
|
30
|
+
$(".toggleDefines").toggle(
|
31
|
+
function () {
|
24
32
|
tHeight = $(this).parent().prev().height();
|
25
|
-
$(this).prev().css(
|
33
|
+
$(this).prev().css("display", "inline");
|
26
34
|
$(this).parent().prev().height($(this).parent().height());
|
27
35
|
$(this).text("(less)");
|
28
|
-
|
29
|
-
|
36
|
+
},
|
37
|
+
function () {
|
30
38
|
$(this).prev().hide();
|
31
39
|
$(this).parent().prev().height(tHeight);
|
32
40
|
$(this).text("more...");
|
33
|
-
|
34
|
-
|
41
|
+
}
|
42
|
+
);
|
43
|
+
}
|
35
44
|
|
36
|
-
function createFullTreeLinks() {
|
45
|
+
function createFullTreeLinks() {
|
37
46
|
var tHeight = 0;
|
38
|
-
$(
|
47
|
+
$(".inheritanceTree").toggle(
|
48
|
+
function () {
|
39
49
|
tHeight = $(this).parent().prev().height();
|
40
|
-
$(this).parent().toggleClass(
|
50
|
+
$(this).parent().toggleClass("showAll");
|
41
51
|
$(this).text("(hide)");
|
42
52
|
$(this).parent().prev().height($(this).parent().height());
|
43
|
-
|
44
|
-
|
45
|
-
$(this).parent().toggleClass(
|
53
|
+
},
|
54
|
+
function () {
|
55
|
+
$(this).parent().toggleClass("showAll");
|
46
56
|
$(this).parent().prev().height(tHeight);
|
47
57
|
$(this).text("show all");
|
58
|
+
}
|
59
|
+
);
|
60
|
+
}
|
61
|
+
|
62
|
+
function searchFrameButtons() {
|
63
|
+
$(".full_list_link").click(function () {
|
64
|
+
toggleSearchFrame(this, $(this).attr("href"));
|
65
|
+
return false;
|
66
|
+
});
|
67
|
+
window.addEventListener("message", function (e) {
|
68
|
+
if (e.data === "navEscape") {
|
69
|
+
$("#nav").slideUp(100);
|
70
|
+
$("#search a").removeClass("active inactive");
|
71
|
+
$(window).focus();
|
72
|
+
}
|
48
73
|
});
|
49
|
-
}
|
50
74
|
|
51
|
-
function
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
$('#search a').removeClass('active inactive');
|
60
|
-
$(window).focus();
|
61
|
-
}
|
62
|
-
});
|
75
|
+
$(window).resize(function () {
|
76
|
+
if ($("#search:visible").length === 0) {
|
77
|
+
$("#nav").removeAttr("style");
|
78
|
+
$("#search a").removeClass("active inactive");
|
79
|
+
$(window).focus();
|
80
|
+
}
|
81
|
+
});
|
82
|
+
}
|
63
83
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
84
|
+
function toggleSearchFrame(id, link) {
|
85
|
+
var frame = $("#nav");
|
86
|
+
$("#search a").removeClass("active").addClass("inactive");
|
87
|
+
if (frame.attr("src") === link && frame.css("display") !== "none") {
|
88
|
+
frame.slideUp(100);
|
89
|
+
$("#search a").removeClass("active inactive");
|
90
|
+
} else {
|
91
|
+
$(id).addClass("active").removeClass("inactive");
|
92
|
+
if (frame.attr("src") !== link) frame.attr("src", link);
|
93
|
+
frame.slideDown(100);
|
69
94
|
}
|
70
|
-
});
|
71
|
-
}
|
72
|
-
|
73
|
-
function toggleSearchFrame(id, link) {
|
74
|
-
var frame = $('#nav');
|
75
|
-
$('#search a').removeClass('active').addClass('inactive');
|
76
|
-
if (frame.attr('src') === link && frame.css('display') !== "none") {
|
77
|
-
frame.slideUp(100);
|
78
|
-
$('#search a').removeClass('active inactive');
|
79
95
|
}
|
80
|
-
else {
|
81
|
-
$(id).addClass('active').removeClass('inactive');
|
82
|
-
if (frame.attr('src') !== link) frame.attr('src', link);
|
83
|
-
frame.slideDown(100);
|
84
|
-
}
|
85
|
-
}
|
86
96
|
|
87
|
-
function linkSummaries() {
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
}
|
97
|
+
function linkSummaries() {
|
98
|
+
$(".summary_signature").click(function () {
|
99
|
+
document.location = $(this).find("a").attr("href");
|
100
|
+
});
|
101
|
+
}
|
92
102
|
|
93
|
-
function summaryToggle() {
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
}
|
103
|
+
function summaryToggle() {
|
104
|
+
$(".summary_toggle").click(function (e) {
|
105
|
+
e.preventDefault();
|
106
|
+
localStorage.summaryCollapsed = $(this).text();
|
107
|
+
$(".summary_toggle").each(function () {
|
108
|
+
$(this).text($(this).text() == "collapse" ? "expand" : "collapse");
|
109
|
+
var next = $(this).parent().parent().nextAll("ul.summary").first();
|
110
|
+
if (next.hasClass("compact")) {
|
111
|
+
next.toggle();
|
112
|
+
next.nextAll("ul.summary").first().toggle();
|
113
|
+
} else if (next.hasClass("summary")) {
|
114
|
+
var list = $('<ul class="summary compact" />');
|
115
|
+
list.html(next.html());
|
116
|
+
list.find(".summary_desc, .note").remove();
|
117
|
+
list.find("a").each(function () {
|
118
|
+
$(this).html($(this).find("strong").html());
|
119
|
+
$(this).parent().html($(this)[0].outerHTML);
|
120
|
+
});
|
121
|
+
next.before(list);
|
122
|
+
next.toggle();
|
123
|
+
}
|
124
|
+
});
|
125
|
+
return false;
|
115
126
|
});
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
}
|
127
|
+
if (localStorage.summaryCollapsed == "collapse") {
|
128
|
+
$(".summary_toggle").first().click();
|
129
|
+
} else {
|
130
|
+
localStorage.summaryCollapsed = "expand";
|
131
|
+
}
|
132
|
+
}
|
122
133
|
|
123
|
-
function constantSummaryToggle() {
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
};
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
}
|
134
|
+
function constantSummaryToggle() {
|
135
|
+
$(".constants_summary_toggle").click(function (e) {
|
136
|
+
e.preventDefault();
|
137
|
+
localStorage.summaryCollapsed = $(this).text();
|
138
|
+
$(".constants_summary_toggle").each(function () {
|
139
|
+
$(this).text($(this).text() == "collapse" ? "expand" : "collapse");
|
140
|
+
var next = $(this).parent().parent().nextAll("dl.constants").first();
|
141
|
+
if (next.hasClass("compact")) {
|
142
|
+
next.toggle();
|
143
|
+
next.nextAll("dl.constants").first().toggle();
|
144
|
+
} else if (next.hasClass("constants")) {
|
145
|
+
var list = $('<dl class="constants compact" />');
|
146
|
+
list.html(next.html());
|
147
|
+
list.find("dt").each(function () {
|
148
|
+
$(this).addClass("summary_signature");
|
149
|
+
$(this).text($(this).text().split("=")[0]);
|
150
|
+
if ($(this).has(".deprecated").length) {
|
151
|
+
$(this).addClass("deprecated");
|
152
|
+
}
|
153
|
+
});
|
154
|
+
// Add the value of the constant as "Tooltip" to the summary object
|
155
|
+
list.find("pre.code").each(function () {
|
156
|
+
console.log($(this).parent());
|
157
|
+
var dt_element = $(this).parent().prev();
|
158
|
+
var tooltip = $(this).text();
|
159
|
+
if (dt_element.hasClass("deprecated")) {
|
160
|
+
tooltip = "Deprecated. " + tooltip;
|
161
|
+
}
|
162
|
+
dt_element.attr("title", tooltip);
|
163
|
+
});
|
164
|
+
list.find(".docstring, .tags, dd").remove();
|
165
|
+
next.before(list);
|
166
|
+
next.toggle();
|
167
|
+
}
|
168
|
+
});
|
169
|
+
return false;
|
158
170
|
});
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
}
|
171
|
+
if (localStorage.summaryCollapsed == "collapse") {
|
172
|
+
$(".constants_summary_toggle").first().click();
|
173
|
+
} else {
|
174
|
+
localStorage.summaryCollapsed = "expand";
|
175
|
+
}
|
176
|
+
}
|
165
177
|
|
166
|
-
function generateTOC() {
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
$(tags.join(', ')).each(function() {
|
179
|
-
if ($(this).parents('.method_details .docstring').length != 0) return;
|
180
|
-
if (this.id == "filecontents") return;
|
181
|
-
show = true;
|
182
|
-
var thisTag = parseInt(this.tagName[1], 10);
|
183
|
-
if (this.id.length === 0) {
|
184
|
-
var proposedId = $(this).attr('toc-id');
|
185
|
-
if (typeof(proposedId) != "undefined") this.id = proposedId;
|
186
|
-
else {
|
187
|
-
var proposedId = $(this).text().replace(/[^a-z0-9-]/ig, '_');
|
188
|
-
if ($('#' + proposedId).length > 0) { proposedId += counter; counter++; }
|
189
|
-
this.id = proposedId;
|
190
|
-
}
|
178
|
+
function generateTOC() {
|
179
|
+
if ($("#filecontents").length === 0) return;
|
180
|
+
var _toc = $('<ol class="top"></ol>');
|
181
|
+
var show = false;
|
182
|
+
var toc = _toc;
|
183
|
+
var counter = 0;
|
184
|
+
var tags = ["h2", "h3", "h4", "h5", "h6"];
|
185
|
+
var i;
|
186
|
+
var curli;
|
187
|
+
if ($("#filecontents h1").length > 1) tags.unshift("h1");
|
188
|
+
for (i = 0; i < tags.length; i++) {
|
189
|
+
tags[i] = "#filecontents " + tags[i];
|
191
190
|
}
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
191
|
+
var lastTag = parseInt(tags[0][1], 10);
|
192
|
+
$(tags.join(", ")).each(function () {
|
193
|
+
if ($(this).parents(".method_details .docstring").length != 0) return;
|
194
|
+
if (this.id == "filecontents") return;
|
195
|
+
show = true;
|
196
|
+
var thisTag = parseInt(this.tagName[1], 10);
|
197
|
+
if (this.id.length === 0) {
|
198
|
+
var proposedId = $(this).attr("toc-id");
|
199
|
+
if (typeof proposedId != "undefined") this.id = proposedId;
|
200
|
+
else {
|
201
|
+
var proposedId = $(this)
|
202
|
+
.text()
|
203
|
+
.replace(/[^a-z0-9-]/gi, "_");
|
204
|
+
if ($("#" + proposedId).length > 0) {
|
205
|
+
proposedId += counter;
|
206
|
+
counter++;
|
207
|
+
}
|
208
|
+
this.id = proposedId;
|
197
209
|
}
|
198
|
-
toc = $('<ol/>');
|
199
|
-
curli.append(toc);
|
200
|
-
curli = undefined;
|
201
210
|
}
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
211
|
+
if (thisTag > lastTag) {
|
212
|
+
for (i = 0; i < thisTag - lastTag; i++) {
|
213
|
+
if (typeof curli == "undefined") {
|
214
|
+
curli = $("<li/>");
|
215
|
+
toc.append(curli);
|
216
|
+
}
|
217
|
+
toc = $("<ol/>");
|
218
|
+
curli.append(toc);
|
219
|
+
curli = undefined;
|
220
|
+
}
|
207
221
|
}
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
$(
|
225
|
-
$(
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
222
|
+
if (thisTag < lastTag) {
|
223
|
+
for (i = 0; i < lastTag - thisTag; i++) {
|
224
|
+
toc = toc.parent();
|
225
|
+
toc = toc.parent();
|
226
|
+
}
|
227
|
+
}
|
228
|
+
var title = $(this).attr("toc-title");
|
229
|
+
if (typeof title == "undefined") title = $(this).text();
|
230
|
+
curli = $('<li><a href="#' + this.id + '">' + title + "</a></li>");
|
231
|
+
toc.append(curli);
|
232
|
+
lastTag = thisTag;
|
233
|
+
});
|
234
|
+
if (!show) return;
|
235
|
+
html =
|
236
|
+
'<div id="toc"><p class="title hide_toc"><a href="#"><strong>Table of Contents</strong></a></p></div>';
|
237
|
+
$("#content").prepend(html);
|
238
|
+
$("#toc").append(_toc);
|
239
|
+
$("#toc .hide_toc").toggle(
|
240
|
+
function () {
|
241
|
+
$("#toc .top").slideUp("fast");
|
242
|
+
$("#toc").toggleClass("hidden");
|
243
|
+
$("#toc .title small").toggle();
|
244
|
+
},
|
245
|
+
function () {
|
246
|
+
$("#toc .top").slideDown("fast");
|
247
|
+
$("#toc").toggleClass("hidden");
|
248
|
+
$("#toc .title small").toggle();
|
249
|
+
}
|
250
|
+
);
|
234
251
|
}
|
235
252
|
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
function navResizeFnStop() {
|
242
|
-
$(window).unbind('mousemove', navResizeFn);
|
243
|
-
window.removeEventListener('message', navMessageFn, false);
|
244
|
-
}
|
245
|
-
|
246
|
-
function navMessageFn(e) {
|
247
|
-
if (e.data.action === 'mousemove') navResizeFn(e.data.event);
|
248
|
-
if (e.data.action === 'mouseup') navResizeFnStop();
|
249
|
-
}
|
253
|
+
function navResizeFn(e) {
|
254
|
+
if (e.which !== 1) {
|
255
|
+
navResizeFnStop();
|
256
|
+
return;
|
257
|
+
}
|
250
258
|
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
window.addEventListener('message', navMessageFn, false);
|
256
|
-
});
|
257
|
-
$(window).mouseup(navResizeFnStop);
|
259
|
+
sessionStorage.navWidth = e.pageX.toString();
|
260
|
+
$(".nav_wrap").css("width", e.pageX);
|
261
|
+
$(".nav_wrap").css("-ms-flex", "inherit");
|
262
|
+
}
|
258
263
|
|
259
|
-
|
260
|
-
|
264
|
+
function navResizeFnStop() {
|
265
|
+
$(window).unbind("mousemove", navResizeFn);
|
266
|
+
window.removeEventListener("message", navMessageFn, false);
|
261
267
|
}
|
262
|
-
}
|
263
268
|
|
264
|
-
function
|
265
|
-
|
266
|
-
|
267
|
-
if (done) return;
|
268
|
-
clearTimeout(timer);
|
269
|
-
var opts = { action: 'expand', path: pathId };
|
270
|
-
document.getElementById('nav').contentWindow.postMessage(opts, '*');
|
271
|
-
done = true;
|
269
|
+
function navMessageFn(e) {
|
270
|
+
if (e.data.action === "mousemove") navResizeFn(e.data.event);
|
271
|
+
if (e.data.action === "mouseup") navResizeFnStop();
|
272
272
|
}
|
273
273
|
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
274
|
+
function navResizer() {
|
275
|
+
$("#resizer").mousedown(function (e) {
|
276
|
+
e.preventDefault();
|
277
|
+
$(window).mousemove(navResizeFn);
|
278
|
+
window.addEventListener("message", navMessageFn, false);
|
279
|
+
});
|
280
|
+
$(window).mouseup(navResizeFnStop);
|
279
281
|
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
$(hash)[0].scrollIntoView();
|
282
|
+
if (sessionStorage.navWidth) {
|
283
|
+
navResizeFn({ which: 1, pageX: parseInt(sessionStorage.navWidth, 10) });
|
284
|
+
}
|
284
285
|
}
|
285
286
|
|
286
|
-
|
287
|
-
|
287
|
+
function navExpander() {
|
288
|
+
if (typeof pathId === "undefined") return;
|
289
|
+
var done = false,
|
290
|
+
timer = setTimeout(postMessage, 500);
|
291
|
+
function postMessage() {
|
292
|
+
if (done) return;
|
293
|
+
clearTimeout(timer);
|
294
|
+
var opts = { action: "expand", path: pathId };
|
295
|
+
document.getElementById("nav").contentWindow.postMessage(opts, "*");
|
296
|
+
done = true;
|
297
|
+
}
|
288
298
|
|
289
|
-
|
290
|
-
|
291
|
-
|
299
|
+
window.addEventListener(
|
300
|
+
"message",
|
301
|
+
function (event) {
|
302
|
+
if (event.data === "navReady") postMessage();
|
303
|
+
return false;
|
304
|
+
},
|
305
|
+
false
|
306
|
+
);
|
307
|
+
}
|
308
|
+
|
309
|
+
function mainFocus() {
|
292
310
|
var hash = window.location.hash;
|
293
|
-
if (hash !==
|
311
|
+
if (hash !== "" && $(hash)[0]) {
|
294
312
|
$(hash)[0].scrollIntoView();
|
295
313
|
}
|
296
|
-
};
|
297
|
-
}
|
298
314
|
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
createDefineLinks();
|
304
|
-
createFullTreeLinks();
|
305
|
-
searchFrameButtons();
|
306
|
-
linkSummaries();
|
307
|
-
summaryToggle();
|
308
|
-
constantSummaryToggle();
|
309
|
-
generateTOC();
|
310
|
-
mainFocus();
|
311
|
-
navigationChange();
|
312
|
-
});
|
315
|
+
setTimeout(function () {
|
316
|
+
$("#main").focus();
|
317
|
+
}, 10);
|
318
|
+
}
|
313
319
|
|
320
|
+
function navigationChange() {
|
321
|
+
// This works around the broken anchor navigation with the YARD template.
|
322
|
+
window.onpopstate = function () {
|
323
|
+
var hash = window.location.hash;
|
324
|
+
if (hash !== "" && $(hash)[0]) {
|
325
|
+
$(hash)[0].scrollIntoView();
|
326
|
+
}
|
327
|
+
};
|
328
|
+
}
|
329
|
+
|
330
|
+
$(document).ready(function () {
|
331
|
+
navResizer();
|
332
|
+
navExpander();
|
333
|
+
createSourceLinks();
|
334
|
+
createDefineLinks();
|
335
|
+
createFullTreeLinks();
|
336
|
+
searchFrameButtons();
|
337
|
+
linkSummaries();
|
338
|
+
summaryToggle();
|
339
|
+
constantSummaryToggle();
|
340
|
+
generateTOC();
|
341
|
+
mainFocus();
|
342
|
+
navigationChange();
|
343
|
+
});
|
314
344
|
})();
|