Skip to content

Commit

Permalink
Adding jsdoc.json and the docs folder
Browse files Browse the repository at this point in the history
  • Loading branch information
spond committed Oct 2, 2024
1 parent 1d5ffdf commit 39d08c1
Show file tree
Hide file tree
Showing 50 changed files with 183,165 additions and 20 deletions.
2,026 changes: 2,026 additions & 0 deletions docs/HIVTxNetwork.html

Large diffs are not rendered by default.

5,566 changes: 5,566 additions & 0 deletions docs/classes.list.html

Large diffs are not rendered by default.

Binary file added docs/fonts/glyphicons-halflings-regular.eot
Binary file not shown.
288 changes: 288 additions & 0 deletions docs/fonts/glyphicons-halflings-regular.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/fonts/glyphicons-halflings-regular.ttf
Binary file not shown.
Binary file added docs/fonts/glyphicons-halflings-regular.woff
Binary file not shown.
Binary file added docs/fonts/glyphicons-halflings-regular.woff2
Binary file not shown.
5,552 changes: 5,552 additions & 0 deletions docs/global.html

Large diffs are not rendered by default.

686 changes: 686 additions & 0 deletions docs/hivtrace_generate_svg_polygon.html

Large diffs are not rendered by default.

Binary file added docs/img/glyphicons-halflings-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/glyphicons-halflings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
585 changes: 585 additions & 0 deletions docs/index.html

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions docs/quicksearch.html

Large diffs are not rendered by default.

22,646 changes: 22,646 additions & 0 deletions docs/scripts/docstrap.lib.js

Large diffs are not rendered by default.

92 changes: 92 additions & 0 deletions docs/scripts/fulltext-search-ui.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
window.SearcherDisplay = (function ($) {
/**
* This class provides support for displaying quick search text results to users.
*/
function SearcherDisplay() {}

SearcherDisplay.prototype.init = function () {
this._displayQuickSearch();
};

/**
* This method creates the quick text search entry in navigation menu and wires all required events.
*/
SearcherDisplay.prototype._displayQuickSearch = function () {
var quickSearch = $(document.createElement("iframe")),
body = $("body"),
self = this;

quickSearch.attr("src", "quicksearch.html");
quickSearch.css("width", "0px");
quickSearch.css("height", "0px");

body.append(quickSearch);

$(window).on("message", function (msg) {
var msgData = msg.originalEvent.data;

if (msgData.msgid != "docstrap.quicksearch.done") {
return;
}

var results = msgData.results || [];

self._displaySearchResults(results);
});

function startSearch() {
var searchTerms = $("#search-input").prop("value");
if (searchTerms) {
quickSearch[0].contentWindow.postMessage(
{
searchTerms: searchTerms,
msgid: "docstrap.quicksearch.start",
},
"*"
);
}
}

$("#search-input").on("keyup", function (evt) {
if (evt.keyCode != 13) {
return;
}
startSearch();
return false;
});
$("#search-submit").on("click", function () {
startSearch();
return false;
});
};

/**
* This method displays the quick text search results in a modal dialog.
*/
SearcherDisplay.prototype._displaySearchResults = function (results) {
var resultsHolder = $($("#searchResults").find(".modal-body")),
fragment = document.createDocumentFragment(),
resultsList = document.createElement("ul");

resultsHolder.empty();

for (var idx = 0; idx < results.length; idx++) {
var result = results[idx],
item = document.createElement("li"),
link = document.createElement("a");

link.href = result.id;
link.innerHTML = result.title;

item.appendChild(link);
resultsList.appendChild(item);
}

fragment.appendChild(resultsList);
resultsHolder.append(fragment);

$("#searchResults").modal({ show: true });
};

return new SearcherDisplay();
})($);
36 changes: 36 additions & 0 deletions docs/scripts/fulltext-search.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
window.Searcher = (function () {
function Searcher() {
this._index = lunr(function () {
this.field("title", { boost: 10 });
this.field("body");
this.ref("id");
});

this._indexContent = undefined;
}

Searcher.prototype.init = function () {
var self = this;

$("script[type='text/x-docstrap-searchdb']").each(function (idx, item) {
self._indexContent = JSON.parse(item.innerHTML);

for (var entryId in self._indexContent) {
self._index.add(self._indexContent[entryId]);
}
});
};

Searcher.prototype.search = function (searchTerm) {
var results = [],
searchResults = this._index.search(searchTerm);

for (var idx = 0; idx < searchResults.length; idx++) {
results.push(this._indexContent[searchResults[idx].ref]);
}

return results;
};

return new Searcher();
})();
Loading

0 comments on commit 39d08c1

Please sign in to comment.