Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove jQuery #1330

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion datafiles/templates/Html/candidate-index.html.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html>

<head>
<script src="/static/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.11.4/sp-1.4.0/datatables.min.css"/>
$hackageCssTheme()$

Expand Down
1 change: 0 additions & 1 deletion datafiles/templates/Html/candidate-page.html.st
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="search" href="/packages/opensearch.xml" type="application/opensearchdescription+xml" title="Hackage"/>
<link rel="canonical" href="/package/$package.name$"/>
<script src="/static/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>
</head>

Expand Down
6 changes: 3 additions & 3 deletions datafiles/templates/Html/graph.html.st
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</body>
<script type='text/javascript'>

\$.getJSON('/packages/graph.json', onLoad)
fetch('/packages/graph.json').then(onLoad);

function onLoad(json) {
var graphGenerator = Viva.Graph.generator();
Expand Down Expand Up @@ -134,7 +134,7 @@
renderer.run();

\$('.input-group input').on('keyup', function() {
var val = \$.trim(this.value);
var val = this.value.trim;
var resultSet = \$.grep(json, function(e) {
return (e.name.indexOf(val) != -1);
});
Expand All @@ -143,7 +143,7 @@
"count": resultSet.length
};
if (val.length > 0) {
\$.each(resultSet, function(i) {
resultSet.forEach( function(i) {
var nodeInfo = graph.getNode(resultSet[i].name);
// console.dir(nodeInfo)
count = nodeCount(nodeInfo);
Expand Down
1 change: 0 additions & 1 deletion datafiles/templates/Html/package-page.html.st
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<meta name="robots" contents="noindex">
$endif$
<link rel="canonical" href="$sbaseurl$/package/$package.name$" />
<script src="/static/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>
<base href="$baseurl$/package/$package.name$-$package.version$/" />
</head>
Expand Down
5 changes: 2 additions & 3 deletions datafiles/templates/Html/tag-edit.html.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<head>
$hackageCssTheme()$
<title>Edit package tags | Hackage</title>
<script src="/static/jquery.min.js"></script>
<style>
.accept {
color: green;
Expand Down Expand Up @@ -109,7 +108,7 @@

if ("$addns$".trim() != "") {
var ads = "$addns$".replace(/\s/g, '').split(',')
\$.each(ads, function(i) {
ads.forEach( function(i) {
var li = \$('<li/>')
.text(ads[i])
.appendTo(aList);
Expand All @@ -122,7 +121,7 @@
if ("$delns$".trim() != "") {
var dels = "$delns$".replace(/\s/g, '').split(',')

\$.each(dels, function(i) {
dels.forEach( function(i) {
var li = \$('<li/>')
.text(dels[i])
.appendTo(dList);
Expand Down