Newer
Older
<!DOCTYPE html>
<html lang="en">
<head>
<link href="{{ url_for('static', filename='style.css') }}" rel="stylesheet">
<title>URL shorter</title>
</head>
<body>
<div id="loginbar">{{loginbar | safe}}</div>
<div class="login-page">
<div class="form">
{{content | safe}}
</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>
$( "#dialog" ).dialog({
autoOpen: false
});
// Link to open the dialog
/*$( "#dialog-link" ).click(function( event ) {
document.getElementById("dialogContent").innerText = "xxx"
$( "#dialog" ).dialog( "open" );
event.preventDefault();
});*/
function buttonListener(value){
value = "/user/makeqr?link=" + value
$.get(value, function(data, status){
document.getElementById("dialogContent").src = data;
$( "#dialog" ).dialog( "open" );
setTimeout(function(){
$('#dialog').dialog({width: document.getElementById("dialogContent").width + 35});
}, 1);
});
}
</script>