doing 2.1.97 → 2.1.101
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 +42 -0
- data/Gemfile.lock +1 -1
- data/README.md +8 -2
- data/bin/commands/done.rb +8 -4
- data/bin/commands/finish.rb +1 -1
- data/bin/commands/reset.rb +3 -3
- data/bin/commands/view.rb +5 -0
- data/bin/doing +92 -2
- data/docs/doc/Array.html +3 -3
- data/docs/doc/BooleanTermParser/Clause.html +3 -3
- data/docs/doc/BooleanTermParser/Operator.html +3 -3
- data/docs/doc/BooleanTermParser/Query.html +3 -3
- data/docs/doc/BooleanTermParser/QueryParser.html +3 -3
- data/docs/doc/BooleanTermParser/QueryTransformer.html +3 -3
- data/docs/doc/BooleanTermParser.html +3 -3
- data/docs/doc/Doing/ArrayCleanup.html +3 -3
- data/docs/doc/Doing/ArrayNestedHash.html +3 -3
- data/docs/doc/Doing/ArrayTags.html +9 -9
- data/docs/doc/Doing/ByDayExport.html +3 -3
- data/docs/doc/Doing/CSVExport.html +3 -3
- data/docs/doc/Doing/CalendarImport.html +3 -3
- data/docs/doc/Doing/Change.html +3 -3
- data/docs/doc/Doing/Changes.html +3 -3
- data/docs/doc/Doing/ChronifyArray.html +3 -3
- data/docs/doc/Doing/ChronifyNumeric.html +3 -3
- data/docs/doc/Doing/ChronifyString.html +6 -6
- data/docs/doc/Doing/Color.html +16 -16
- data/docs/doc/Doing/Completion/BashCompletions.html +3 -3
- data/docs/doc/Doing/Completion/FigCompletions.html +3 -3
- data/docs/doc/Doing/Completion/FishCompletions.html +3 -3
- data/docs/doc/Doing/Completion/StringUtils.html +3 -3
- data/docs/doc/Doing/Completion/ZshCompletions.html +3 -3
- data/docs/doc/Doing/Completion.html +3 -3
- data/docs/doc/Doing/Configuration.html +3 -3
- data/docs/doc/Doing/DayOneRenderer.html +3 -3
- data/docs/doc/Doing/DayoneExport.html +3 -3
- data/docs/doc/Doing/DoingExport.html +3 -3
- data/docs/doc/Doing/DoingImport.html +3 -3
- data/docs/doc/Doing/Entry.html +3 -3
- data/docs/doc/Doing/Errors/DoingNoTraceError.html +3 -3
- data/docs/doc/Doing/Errors/DoingRuntimeError.html +3 -3
- data/docs/doc/Doing/Errors/DoingStandardError.html +3 -3
- data/docs/doc/Doing/Errors/EmptyInput.html +3 -3
- data/docs/doc/Doing/Errors/HistoryLimitError.html +3 -3
- data/docs/doc/Doing/Errors/InvalidPlugin.html +3 -3
- data/docs/doc/Doing/Errors/MissingBackupFile.html +3 -3
- data/docs/doc/Doing/Errors/NoResults.html +3 -3
- data/docs/doc/Doing/Errors/PluginException.html +3 -3
- data/docs/doc/Doing/Errors/UserCancelled.html +3 -3
- data/docs/doc/Doing/Errors/WrongCommand.html +3 -3
- data/docs/doc/Doing/Errors.html +3 -3
- data/docs/doc/Doing/HTMLExport.html +3 -3
- data/docs/doc/Doing/Hooks.html +3 -3
- data/docs/doc/Doing/Item.html +3 -3
- data/docs/doc/Doing/ItemDates.html +3 -3
- data/docs/doc/Doing/ItemQuery.html +3 -3
- data/docs/doc/Doing/ItemState.html +3 -3
- data/docs/doc/Doing/ItemTags.html +3 -3
- data/docs/doc/Doing/Items.html +3 -3
- data/docs/doc/Doing/JSONExport.html +3 -3
- data/docs/doc/Doing/JSONImport.html +3 -3
- data/docs/doc/Doing/Logger.html +3 -3
- data/docs/doc/Doing/MarkdownExport.html +3 -3
- data/docs/doc/Doing/Note.html +3 -3
- data/docs/doc/Doing/Pager.html +3 -3
- data/docs/doc/Doing/Plugins.html +3 -3
- data/docs/doc/Doing/Prompt.html +3 -3
- data/docs/doc/Doing/PromptChoose.html +3 -3
- data/docs/doc/Doing/PromptFZF.html +3 -3
- data/docs/doc/Doing/PromptInput.html +3 -3
- data/docs/doc/Doing/PromptSTD.html +3 -3
- data/docs/doc/Doing/PromptYN.html +3 -3
- data/docs/doc/Doing/Section.html +3 -3
- data/docs/doc/Doing/StringHighlight.html +3 -3
- data/docs/doc/Doing/StringNormalize.html +115 -3
- data/docs/doc/Doing/StringQuery.html +4 -4
- data/docs/doc/Doing/StringTags.html +3 -3
- data/docs/doc/Doing/StringTransform.html +3 -3
- data/docs/doc/Doing/StringTruncate.html +3 -3
- data/docs/doc/Doing/StringURL.html +3 -3
- data/docs/doc/Doing/SymbolNormalize.html +37 -3
- data/docs/doc/Doing/TaskPaperExport.html +3 -3
- data/docs/doc/Doing/TemplateExport.html +3 -3
- data/docs/doc/Doing/TemplateString.html +4 -4
- data/docs/doc/Doing/TimingImport.html +3 -3
- data/docs/doc/Doing/Types.html +13 -3
- data/docs/doc/Doing/Util/Backup.html +3 -3
- data/docs/doc/Doing/Util.html +4 -4
- data/docs/doc/Doing/Version.html +3 -3
- data/docs/doc/Doing/WWID.html +5 -5
- data/docs/doc/Doing.html +4 -4
- data/docs/doc/FalseClass.html +3 -3
- data/docs/doc/GLI/Commands/Help.html +3 -3
- data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +3 -3
- data/docs/doc/GLI/Commands.html +3 -3
- data/docs/doc/GLI.html +3 -3
- data/docs/doc/Hash.html +4 -4
- data/docs/doc/Numeric.html +3 -3
- data/docs/doc/Object.html +3 -3
- data/docs/doc/PhraseParser/Operator.html +3 -3
- data/docs/doc/PhraseParser/PhraseClause.html +3 -3
- data/docs/doc/PhraseParser/Query.html +3 -3
- data/docs/doc/PhraseParser/QueryParser.html +3 -3
- data/docs/doc/PhraseParser/QueryTransformer.html +3 -3
- data/docs/doc/PhraseParser/TermClause.html +3 -3
- data/docs/doc/PhraseParser.html +3 -3
- data/docs/doc/Status.html +3 -3
- data/docs/doc/String.html +4 -4
- data/docs/doc/Symbol.html +4 -4
- data/docs/doc/Time.html +3 -3
- data/docs/doc/TrueClass.html +3 -3
- data/docs/doc/_index.html +4 -4
- data/docs/doc/class_list.html +3 -6
- data/docs/doc/css/full_list.css +3 -3
- data/docs/doc/css/style.css +15 -8
- data/docs/doc/file.README.html +13 -5
- data/docs/doc/file_list.html +2 -5
- data/docs/doc/frames.html +1 -1
- data/docs/doc/index.html +13 -5
- data/docs/doc/js/app.js +267 -348
- data/docs/doc/js/full_list.js +24 -52
- data/docs/doc/method_list.html +403 -382
- data/docs/doc/top-level-namespace.html +3 -3
- data/doing.rdoc +65 -1
- data/lib/completion/_doing.zsh +9 -9
- data/lib/completion/doing.bash +16 -16
- data/lib/completion/doing.fish +8 -0
- data/lib/completion/doing.ts +90 -0
- data/lib/doing/add_options.rb +4 -0
- data/lib/doing/chronify/string.rb +3 -3
- data/lib/doing/normalize.rb +25 -0
- data/lib/doing/plugins/export/dayone_export.rb +2 -1
- data/lib/doing/plugins/export/html_export.rb +1 -1
- data/lib/doing/plugins/export/json_export.rb +2 -1
- data/lib/doing/plugins/export/markdown_export.rb +2 -1
- data/lib/doing/plugins/export/template_export.rb +2 -1
- data/lib/doing/prompt/input.rb +8 -4
- data/lib/doing/prompt/yn.rb +2 -2
- data/lib/doing/types.rb +2 -0
- data/lib/doing/version.rb +1 -1
- data/lib/doing/wwid/timers.rb +146 -94
- data/lib/doing.rb +7 -1
- data/lib/examples/plugins/wiki_export/wiki_export.rb +1 -1
- metadata +2 -2
data/docs/doc/js/app.js
CHANGED
|
@@ -1,395 +1,314 @@
|
|
|
1
|
-
|
|
2
|
-
var localStorage = {},
|
|
3
|
-
sessionStorage = {};
|
|
4
|
-
try {
|
|
5
|
-
localStorage = window.localStorage;
|
|
6
|
-
} catch (e) {}
|
|
7
|
-
try {
|
|
8
|
-
sessionStorage = window.sessionStorage;
|
|
9
|
-
} catch (e) {}
|
|
1
|
+
(function() {
|
|
10
2
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
3
|
+
var localStorage = {}, sessionStorage = {};
|
|
4
|
+
try { localStorage = window.localStorage; } catch (e) { }
|
|
5
|
+
try { sessionStorage = window.sessionStorage; } catch (e) { }
|
|
6
|
+
|
|
7
|
+
function createSourceLinks() {
|
|
8
|
+
$('.method_details_list .source_code').
|
|
9
|
+
before("<span class='showSource'>[<a href='#' class='toggleSource'>View source</a>]</span>");
|
|
10
|
+
$('.toggleSource').toggle(function() {
|
|
11
|
+
$(this).parent().nextAll('.source_code').slideDown(100);
|
|
12
|
+
$(this).text("Hide source");
|
|
13
|
+
},
|
|
14
|
+
function() {
|
|
15
|
+
$(this).parent().nextAll('.source_code').slideUp(100);
|
|
22
16
|
$(this).text("View source");
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
17
|
+
});
|
|
18
|
+
}
|
|
26
19
|
|
|
27
|
-
|
|
20
|
+
function createDefineLinks() {
|
|
28
21
|
var tHeight = 0;
|
|
29
|
-
$(
|
|
30
|
-
$(
|
|
31
|
-
function () {
|
|
22
|
+
$('.defines').after(" <a href='#' class='toggleDefines'>more...</a>");
|
|
23
|
+
$('.toggleDefines').toggle(function() {
|
|
32
24
|
tHeight = $(this).parent().prev().height();
|
|
33
|
-
$(this).prev().css(
|
|
25
|
+
$(this).prev().css('display', 'inline');
|
|
34
26
|
$(this).parent().prev().height($(this).parent().height());
|
|
35
27
|
$(this).text("(less)");
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
},
|
|
29
|
+
function() {
|
|
38
30
|
$(this).prev().hide();
|
|
39
31
|
$(this).parent().prev().height(tHeight);
|
|
40
32
|
$(this).text("more...");
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
44
35
|
|
|
45
|
-
|
|
36
|
+
function createFullTreeLinks() {
|
|
46
37
|
var tHeight = 0;
|
|
47
|
-
$(
|
|
48
|
-
function () {
|
|
38
|
+
$('.inheritanceTree').toggle(function() {
|
|
49
39
|
tHeight = $(this).parent().prev().height();
|
|
50
|
-
$(this).parent().toggleClass(
|
|
40
|
+
$(this).parent().toggleClass('showAll');
|
|
51
41
|
$(this).text("(hide)");
|
|
52
42
|
$(this).parent().prev().height($(this).parent().height());
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
$(this).parent().toggleClass(
|
|
43
|
+
},
|
|
44
|
+
function() {
|
|
45
|
+
$(this).parent().toggleClass('showAll');
|
|
56
46
|
$(this).parent().prev().height(tHeight);
|
|
57
47
|
$(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
|
-
}
|
|
73
48
|
});
|
|
49
|
+
}
|
|
74
50
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
51
|
+
function searchFrameButtons() {
|
|
52
|
+
$('.full_list_link').click(function() {
|
|
53
|
+
toggleSearchFrame(this, $(this).attr('href'));
|
|
54
|
+
return false;
|
|
55
|
+
});
|
|
56
|
+
window.addEventListener('message', function(e) {
|
|
57
|
+
if (e.data === 'navEscape') {
|
|
58
|
+
$('#nav').slideUp(100);
|
|
59
|
+
$('#search a').removeClass('active inactive');
|
|
60
|
+
$(window).focus();
|
|
61
|
+
}
|
|
62
|
+
});
|
|
83
63
|
|
|
84
|
-
function
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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);
|
|
64
|
+
$(window).resize(function() {
|
|
65
|
+
if ($('#search:visible').length === 0) {
|
|
66
|
+
$('#nav').removeAttr('style');
|
|
67
|
+
$('#search a').removeClass('active inactive');
|
|
68
|
+
$(window).focus();
|
|
94
69
|
}
|
|
95
|
-
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
96
72
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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');
|
|
101
79
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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;
|
|
126
|
-
});
|
|
127
|
-
if (localStorage.summaryCollapsed == "collapse") {
|
|
128
|
-
$(".summary_toggle").first().click();
|
|
129
|
-
} else {
|
|
130
|
-
localStorage.summaryCollapsed = "expand";
|
|
131
|
-
}
|
|
80
|
+
else {
|
|
81
|
+
$(id).addClass('active').removeClass('inactive');
|
|
82
|
+
if (frame.attr('src') !== link) frame.attr('src', link);
|
|
83
|
+
frame.slideDown(100);
|
|
132
84
|
}
|
|
85
|
+
}
|
|
133
86
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
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
|
-
var dt_element = $(this).parent().prev();
|
|
157
|
-
var tooltip = $(this).text();
|
|
158
|
-
if (dt_element.hasClass("deprecated")) {
|
|
159
|
-
tooltip = "Deprecated. " + tooltip;
|
|
160
|
-
}
|
|
161
|
-
dt_element.attr("title", tooltip);
|
|
162
|
-
});
|
|
163
|
-
list.find(".docstring, .tags, dd").remove();
|
|
164
|
-
next.before(list);
|
|
165
|
-
next.toggle();
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
return false;
|
|
169
|
-
});
|
|
170
|
-
if (localStorage.summaryCollapsed == "collapse") {
|
|
171
|
-
$(".constants_summary_toggle").first().click();
|
|
172
|
-
} else {
|
|
173
|
-
localStorage.summaryCollapsed = "expand";
|
|
174
|
-
}
|
|
175
|
-
}
|
|
87
|
+
function linkSummaries() {
|
|
88
|
+
$('.summary_signature').click(function() {
|
|
89
|
+
document.location = $(this).find('a').attr('href');
|
|
90
|
+
});
|
|
91
|
+
}
|
|
176
92
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
for (i = 0; i < tags.length; i++) {
|
|
188
|
-
tags[i] = "#filecontents " + tags[i];
|
|
189
|
-
}
|
|
190
|
-
var lastTag = parseInt(tags[0][1], 10);
|
|
191
|
-
$(tags.join(", ")).each(function () {
|
|
192
|
-
if ($(this).parents(".method_details .docstring").length != 0) return;
|
|
193
|
-
if (this.id == "filecontents") return;
|
|
194
|
-
show = true;
|
|
195
|
-
var thisTag = parseInt(this.tagName[1], 10);
|
|
196
|
-
if (this.id.length === 0) {
|
|
197
|
-
var proposedId = $(this).attr("toc-id");
|
|
198
|
-
if (typeof proposedId != "undefined") this.id = proposedId;
|
|
199
|
-
else {
|
|
200
|
-
var proposedId = $(this)
|
|
201
|
-
.text()
|
|
202
|
-
.replace(/[^a-z0-9-]/gi, "_");
|
|
203
|
-
if ($("#" + proposedId).length > 0) {
|
|
204
|
-
proposedId += counter;
|
|
205
|
-
counter++;
|
|
206
|
-
}
|
|
207
|
-
this.id = proposedId;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
if (thisTag > lastTag) {
|
|
211
|
-
for (i = 0; i < thisTag - lastTag; i++) {
|
|
212
|
-
if (typeof curli == "undefined") {
|
|
213
|
-
curli = $("<li/>");
|
|
214
|
-
toc.append(curli);
|
|
215
|
-
}
|
|
216
|
-
toc = $("<ol/>");
|
|
217
|
-
curli.append(toc);
|
|
218
|
-
curli = undefined;
|
|
219
|
-
}
|
|
93
|
+
function summaryToggle() {
|
|
94
|
+
$('.summary_toggle').click(function(e) {
|
|
95
|
+
e.preventDefault();
|
|
96
|
+
localStorage.summaryCollapsed = $(this).text();
|
|
97
|
+
$('.summary_toggle').each(function() {
|
|
98
|
+
$(this).text($(this).text() == "collapse" ? "expand" : "collapse");
|
|
99
|
+
var next = $(this).parent().parent().nextAll('ul.summary').first();
|
|
100
|
+
if (next.hasClass('compact')) {
|
|
101
|
+
next.toggle();
|
|
102
|
+
next.nextAll('ul.summary').first().toggle();
|
|
220
103
|
}
|
|
221
|
-
if (
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
104
|
+
else if (next.hasClass('summary')) {
|
|
105
|
+
var list = $('<ul class="summary compact" />');
|
|
106
|
+
list.html(next.html());
|
|
107
|
+
list.find('.summary_desc, .note').remove();
|
|
108
|
+
list.find('a').each(function() {
|
|
109
|
+
$(this).html($(this).find('strong').html());
|
|
110
|
+
$(this).parent().html($(this)[0].outerHTML);
|
|
111
|
+
});
|
|
112
|
+
next.before(list);
|
|
113
|
+
next.toggle();
|
|
226
114
|
}
|
|
227
|
-
var title = $(this).attr("toc-title");
|
|
228
|
-
if (typeof title == "undefined") title = $(this).text();
|
|
229
|
-
curli = $('<li><a href="#' + this.id + '">' + title + "</a></li>");
|
|
230
|
-
toc.append(curli);
|
|
231
|
-
lastTag = thisTag;
|
|
232
115
|
});
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
$(
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
116
|
+
return false;
|
|
117
|
+
});
|
|
118
|
+
if (localStorage.summaryCollapsed == "collapse") {
|
|
119
|
+
$('.summary_toggle').first().click();
|
|
120
|
+
} else { localStorage.summaryCollapsed = "expand"; }
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function constantSummaryToggle() {
|
|
124
|
+
$('.constants_summary_toggle').click(function(e) {
|
|
125
|
+
e.preventDefault();
|
|
126
|
+
localStorage.summaryCollapsed = $(this).text();
|
|
127
|
+
$('.constants_summary_toggle').each(function() {
|
|
128
|
+
$(this).text($(this).text() == "collapse" ? "expand" : "collapse");
|
|
129
|
+
var next = $(this).parent().parent().nextAll('dl.constants').first();
|
|
130
|
+
if (next.hasClass('compact')) {
|
|
131
|
+
next.toggle();
|
|
132
|
+
next.nextAll('dl.constants').first().toggle();
|
|
248
133
|
}
|
|
249
|
-
|
|
250
|
-
|
|
134
|
+
else if (next.hasClass('constants')) {
|
|
135
|
+
var list = $('<dl class="constants compact" />');
|
|
136
|
+
list.html(next.html());
|
|
137
|
+
list.find('dt').each(function() {
|
|
138
|
+
$(this).addClass('summary_signature');
|
|
139
|
+
$(this).text( $(this).text().split('=')[0]);
|
|
140
|
+
if ($(this).has(".deprecated").length) {
|
|
141
|
+
$(this).addClass('deprecated');
|
|
142
|
+
};
|
|
143
|
+
});
|
|
144
|
+
// Add the value of the constant as "Tooltip" to the summary object
|
|
145
|
+
list.find('pre.code').each(function() {
|
|
146
|
+
console.log($(this).parent());
|
|
147
|
+
var dt_element = $(this).parent().prev();
|
|
148
|
+
var tooltip = $(this).text();
|
|
149
|
+
if (dt_element.hasClass("deprecated")) {
|
|
150
|
+
tooltip = 'Deprecated. ' + tooltip;
|
|
151
|
+
};
|
|
152
|
+
dt_element.attr('title', tooltip);
|
|
153
|
+
});
|
|
154
|
+
list.find('.docstring, .tags, dd').remove();
|
|
155
|
+
next.before(list);
|
|
156
|
+
next.toggle();
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
return false;
|
|
160
|
+
});
|
|
161
|
+
if (localStorage.summaryCollapsed == "collapse") {
|
|
162
|
+
$('.constants_summary_toggle').first().click();
|
|
163
|
+
} else { localStorage.summaryCollapsed = "expand"; }
|
|
164
|
+
}
|
|
251
165
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
166
|
+
function generateTOC() {
|
|
167
|
+
if ($('#filecontents').length === 0) return;
|
|
168
|
+
var _toc = $('<ol class="top"></ol>');
|
|
169
|
+
var show = false;
|
|
170
|
+
var toc = _toc;
|
|
171
|
+
var counter = 0;
|
|
172
|
+
var tags = ['h2', 'h3', 'h4', 'h5', 'h6'];
|
|
173
|
+
var i;
|
|
174
|
+
var curli;
|
|
175
|
+
if ($('#filecontents h1').length > 1) tags.unshift('h1');
|
|
176
|
+
for (i = 0; i < tags.length; i++) { tags[i] = '#filecontents ' + tags[i]; }
|
|
177
|
+
var lastTag = parseInt(tags[0][1], 10);
|
|
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
|
+
}
|
|
191
|
+
}
|
|
192
|
+
if (thisTag > lastTag) {
|
|
193
|
+
for (i = 0; i < thisTag - lastTag; i++) {
|
|
194
|
+
if ( typeof(curli) == "undefined" ) {
|
|
195
|
+
curli = $('<li/>');
|
|
196
|
+
toc.append(curli);
|
|
277
197
|
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
e.stopPropagation();
|
|
283
|
-
},
|
|
284
|
-
false
|
|
285
|
-
);
|
|
286
|
-
|
|
287
|
-
if (sessionStorage.navWidth) {
|
|
288
|
-
$(".nav_wrap").css(
|
|
289
|
-
"width",
|
|
290
|
-
Math.max(200, parseInt(sessionStorage.navWidth, 10))
|
|
291
|
-
);
|
|
198
|
+
toc = $('<ol/>');
|
|
199
|
+
curli.append(toc);
|
|
200
|
+
curli = undefined;
|
|
201
|
+
}
|
|
292
202
|
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
timer = setTimeout(postMessage, 500);
|
|
299
|
-
function postMessage() {
|
|
300
|
-
if (done) return;
|
|
301
|
-
clearTimeout(timer);
|
|
302
|
-
var opts = { action: "expand", path: pathId };
|
|
303
|
-
document.getElementById("nav").contentWindow.postMessage(opts, "*");
|
|
304
|
-
done = true;
|
|
203
|
+
if (thisTag < lastTag) {
|
|
204
|
+
for (i = 0; i < lastTag - thisTag; i++) {
|
|
205
|
+
toc = toc.parent();
|
|
206
|
+
toc = toc.parent();
|
|
207
|
+
}
|
|
305
208
|
}
|
|
209
|
+
var title = $(this).attr('toc-title');
|
|
210
|
+
if (typeof(title) == "undefined") title = $(this).text();
|
|
211
|
+
curli =$('<li><a href="#' + this.id + '">' + title + '</a></li>');
|
|
212
|
+
toc.append(curli);
|
|
213
|
+
lastTag = thisTag;
|
|
214
|
+
});
|
|
215
|
+
if (!show) return;
|
|
216
|
+
html = '<div id="toc"><p class="title hide_toc"><a href="#"><strong>Table of Contents</strong></a></p></div>';
|
|
217
|
+
$('#content').prepend(html);
|
|
218
|
+
$('#toc').append(_toc);
|
|
219
|
+
$('#toc .hide_toc').toggle(function() {
|
|
220
|
+
$('#toc .top').slideUp('fast');
|
|
221
|
+
$('#toc').toggleClass('hidden');
|
|
222
|
+
$('#toc .title small').toggle();
|
|
223
|
+
}, function() {
|
|
224
|
+
$('#toc .top').slideDown('fast');
|
|
225
|
+
$('#toc').toggleClass('hidden');
|
|
226
|
+
$('#toc .title small').toggle();
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
function navResizeFn(e) {
|
|
231
|
+
if (e.which !== 1) {
|
|
232
|
+
navResizeFnStop();
|
|
233
|
+
return;
|
|
306
234
|
}
|
|
307
235
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}
|
|
236
|
+
sessionStorage.navWidth = e.pageX.toString();
|
|
237
|
+
$('.nav_wrap').css('width', e.pageX);
|
|
238
|
+
$('.nav_wrap').css('-ms-flex', 'inherit');
|
|
239
|
+
}
|
|
313
240
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
241
|
+
function navResizeFnStop() {
|
|
242
|
+
$(window).unbind('mousemove', navResizeFn);
|
|
243
|
+
window.removeEventListener('message', navMessageFn, false);
|
|
244
|
+
}
|
|
318
245
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
if (hash !== "" && $(hash)[0]) {
|
|
324
|
-
$(hash)[0].scrollIntoView();
|
|
325
|
-
}
|
|
326
|
-
};
|
|
327
|
-
}
|
|
246
|
+
function navMessageFn(e) {
|
|
247
|
+
if (e.data.action === 'mousemove') navResizeFn(e.data.event);
|
|
248
|
+
if (e.data.action === 'mouseup') navResizeFnStop();
|
|
249
|
+
}
|
|
328
250
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
createFullTreeLinks();
|
|
335
|
-
searchFrameButtons();
|
|
336
|
-
linkSummaries();
|
|
337
|
-
summaryToggle();
|
|
338
|
-
constantSummaryToggle();
|
|
339
|
-
generateTOC();
|
|
340
|
-
mainFocus();
|
|
341
|
-
navigationChange();
|
|
251
|
+
function navResizer() {
|
|
252
|
+
$('#resizer').mousedown(function(e) {
|
|
253
|
+
e.preventDefault();
|
|
254
|
+
$(window).mousemove(navResizeFn);
|
|
255
|
+
window.addEventListener('message', navMessageFn, false);
|
|
342
256
|
});
|
|
343
|
-
|
|
344
|
-
window.__app();
|
|
345
|
-
|
|
346
|
-
window.addEventListener(
|
|
347
|
-
"message",
|
|
348
|
-
async (e) => {
|
|
349
|
-
if (e.data.action === "navigate") {
|
|
350
|
-
const response = await fetch(e.data.url);
|
|
351
|
-
const text = await response.text();
|
|
352
|
-
const parser = new DOMParser();
|
|
353
|
-
const doc = parser.parseFromString(text, "text/html");
|
|
257
|
+
$(window).mouseup(navResizeFnStop);
|
|
354
258
|
|
|
355
|
-
|
|
356
|
-
|
|
259
|
+
if (sessionStorage.navWidth) {
|
|
260
|
+
navResizeFn({which: 1, pageX: parseInt(sessionStorage.navWidth, 10)});
|
|
261
|
+
}
|
|
262
|
+
}
|
|
357
263
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
}
|
|
368
|
-
});
|
|
264
|
+
function navExpander() {
|
|
265
|
+
var done = false, timer = setTimeout(postMessage, 500);
|
|
266
|
+
function postMessage() {
|
|
267
|
+
if (done) return;
|
|
268
|
+
clearTimeout(timer);
|
|
269
|
+
var opts = { action: 'expand', path: pathId };
|
|
270
|
+
document.getElementById('nav').contentWindow.postMessage(opts, '*');
|
|
271
|
+
done = true;
|
|
272
|
+
}
|
|
369
273
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
const newScript = document.createElement("script");
|
|
376
|
-
newScript.type = "text/javascript";
|
|
377
|
-
newScript.textContent = script.textContent;
|
|
378
|
-
document.head.appendChild(newScript);
|
|
379
|
-
}
|
|
380
|
-
});
|
|
274
|
+
window.addEventListener('message', function(event) {
|
|
275
|
+
if (event.data === 'navReady') postMessage();
|
|
276
|
+
return false;
|
|
277
|
+
}, false);
|
|
278
|
+
}
|
|
381
279
|
|
|
382
|
-
|
|
280
|
+
function mainFocus() {
|
|
281
|
+
var hash = window.location.hash;
|
|
282
|
+
if (hash !== '' && $(hash)[0]) {
|
|
283
|
+
$(hash)[0].scrollIntoView();
|
|
284
|
+
}
|
|
383
285
|
|
|
384
|
-
|
|
286
|
+
setTimeout(function() { $('#main').focus(); }, 10);
|
|
287
|
+
}
|
|
385
288
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
289
|
+
function navigationChange() {
|
|
290
|
+
// This works around the broken anchor navigation with the YARD template.
|
|
291
|
+
window.onpopstate = function() {
|
|
292
|
+
var hash = window.location.hash;
|
|
293
|
+
if (hash !== '' && $(hash)[0]) {
|
|
294
|
+
$(hash)[0].scrollIntoView();
|
|
392
295
|
}
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
$(document).ready(function() {
|
|
300
|
+
navResizer();
|
|
301
|
+
navExpander();
|
|
302
|
+
createSourceLinks();
|
|
303
|
+
createDefineLinks();
|
|
304
|
+
createFullTreeLinks();
|
|
305
|
+
searchFrameButtons();
|
|
306
|
+
linkSummaries();
|
|
307
|
+
summaryToggle();
|
|
308
|
+
constantSummaryToggle();
|
|
309
|
+
generateTOC();
|
|
310
|
+
mainFocus();
|
|
311
|
+
navigationChange();
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
})();
|