Skip to content
Snippets Groups Projects
Verified Commit e10c2190 authored by Jonas Leder's avatar Jonas Leder
Browse files

remove jquery

parent cc0929ae
Branches
No related tags found
No related merge requests found
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<link href="/static/jquery-ui.css" rel="stylesheet">
<link href="/static/style.css" rel="stylesheet"> <link href="/static/style.css" rel="stylesheet">
<link href="/static/font.css" rel="stylesheet"> <link href="/static/font.css" rel="stylesheet">
<link href="/static/darkmode.css" rel="stylesheet"> <link href="/static/darkmode.css" rel="stylesheet">
...@@ -20,30 +19,7 @@ ...@@ -20,30 +19,7 @@
<p><a href="/user/api"><button id="small">API</button></a>&#09;<a href="/"><button id="small">home</button></a></p> <p><a href="/user/api"><button id="small">API</button></a>&#09;<a href="/"><button id="small">home</button></a></p>
</div> </div>
</div> </div>
<!-- ui-dialog -->
<div id="dialog" title="QRCODE">
<img id="dialogContent" src="">
</div>
<script src="/static/external/jquery/jquery.js"></script>
<script src="/static/jquery-ui.js"></script>
<script> <script>
$( "#dialog" ).dialog({
autoOpen: false
});
function buttonListener(value){
value = "/user/makeqr"
$.post(value, {link: value} , function(data, status){
document.getElementById("dialogContent").src = data;
$( "#dialog" ).dialog( "open" );
setTimeout(function(){
$('#dialog').dialog({width: document.getElementById("dialogContent").width + 37});
}, 1);
});
}
function deleteLink(link, elementId) { function deleteLink(link, elementId) {
if(confirm("Do you realy wan't to delete this")){ if(confirm("Do you realy wan't to delete this")){
var xhttp = new XMLHttpRequest(); var xhttp = new XMLHttpRequest();
......
...@@ -33,7 +33,7 @@ def userProfile(request, cookieNotice, s, pageNumber, url_scheme): ...@@ -33,7 +33,7 @@ def userProfile(request, cookieNotice, s, pageNumber, url_scheme):
calls = str(cursor2.execute('SELECT CALLS FROM ANALYTICS WHERE SHORT_URL=?', [entries[1]]).fetchone()[0]) calls = str(cursor2.execute('SELECT CALLS FROM ANALYTICS WHERE SHORT_URL=?', [entries[1]]).fetchone()[0])
except: except:
calls = "0" calls = "0"
response = response + "<tr id=tr_" + str(idCounter) + ">\n<td>" + entries[0] + "</td>\n<td><a href=\"" + url_scheme + "://" + entries[1] + '">' + entries[1] + '</a></td>\n<td>' + calls + '</td>\n<td><a id="red" href="javascript:deleteLink(\'' + escape(entries[1].replace("'", "\\'")) + '\', \'tr_' + str(idCounter) + '\')">delete</a> <a href="#" id="dialog-link" onclick="buttonListener(\'' + entries[1] + '\', this)">QR</a></tr>\n' response = response + "<tr id=tr_" + str(idCounter) + ">\n<td>" + entries[0] + "</td>\n<td><a href=\"" + url_scheme + "://" + entries[1] + '">' + entries[1] + '</a></td>\n<td>' + calls + '</td>\n<td><a id="red" href="javascript:deleteLink(\'' + escape(entries[1].replace("'", "\\'")) + '\', \'tr_' + str(idCounter) + '\')">delete</a></tr>\n'
idCounter=idCounter+1 idCounter=idCounter+1
response = response + "</table>" #Close the table response = response + "</table>" #Close the table
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment