66 lines
2.1 KiB
HTML
66 lines
2.1 KiB
HTML
|
<!doctype html>
|
||
|
<html class="no-js" lang="en" dir="ltr">
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
<title>Snapchat Wall Admin</title>
|
||
|
<meta http-equiv="refresh" content="30">
|
||
|
<link rel="stylesheet" href="/static/css/foundation.css">
|
||
|
<link rel="stylesheet" href="/static/css/app.css">
|
||
|
<script>
|
||
|
function httpGetAsync(theUrl, callback) {
|
||
|
var xmlHttp = new XMLHttpRequest();
|
||
|
xmlHttp.onreadystatechange = function() {
|
||
|
if (xmlHttp.readyState == 4 && xmlHttp.status == 200)
|
||
|
callback(xmlHttp.responseText);
|
||
|
}
|
||
|
xmlHttp.open("GET", theUrl, true); // true for asynchronous
|
||
|
xmlHttp.send(null);
|
||
|
}
|
||
|
function approveSnap(myself) {
|
||
|
function cb(success) {
|
||
|
if (success == "True") {
|
||
|
myself.parentNode.removeChild(myself);
|
||
|
} else {
|
||
|
alert("Failed!");
|
||
|
}
|
||
|
}
|
||
|
url = myself.src;
|
||
|
filename = url.substring(url.lastIndexOf('/')+1);
|
||
|
if (confirm("Approve this snap?")) {
|
||
|
httpGetAsync("/admin/snap/approve?filename=" + filename, cb);
|
||
|
} else {
|
||
|
httpGetAsync("/admin/snap/reject?filename=" + filename, cb);
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div class="row">
|
||
|
<div class="large-12 columns">
|
||
|
<h1>Snapchat Wall · Admin</h1>
|
||
|
<ul class="menu">
|
||
|
<li class="active"><a>Inbox</a></li>
|
||
|
<li><a>Approved</a></li>
|
||
|
<li><a>Rejected</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="row">
|
||
|
<div class="large-12 columns">
|
||
|
<div class="callout">
|
||
|
<p>Click on snap to review:</p>
|
||
|
<img style="width: 30%; min-width: 15em;" onclick="approveSnap(this)" class="thumbnail" src="/snaps/inbox/IMAGE_HERE" alt="" />
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<script src="/static/js/vendor/jquery.js"></script>
|
||
|
<script src="/static/js/vendor/what-input.js"></script>
|
||
|
<script src="/static/js/vendor/foundation.js"></script>
|
||
|
<script src="/static/js/app.js"></script>
|
||
|
</body>
|
||
|
</html>
|