mirror of
https://gitlab.com/hagrid-keyserver/hagrid.git
synced 2023-02-13 20:55:02 -05:00
externalize all js
This commit is contained in:
parent
2440d37485
commit
2eaec0b7dd
2 changed files with 15 additions and 16 deletions
14
dist/assets/js/upload.js
vendored
Normal file
14
dist/assets/js/upload.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
var body = document.getElementsByTagName("body")[0];
|
||||||
|
|
||||||
|
body.addEventListener('dragover', function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
}, false);
|
||||||
|
|
||||||
|
body.addEventListener('drop', function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
if (e.dataTransfer) {
|
||||||
|
document.getElementById('keytext').files = e.dataTransfer.files;
|
||||||
|
}
|
||||||
|
}, false);
|
17
dist/templates/upload/upload.html.hbs
vendored
17
dist/templates/upload/upload.html.hbs
vendored
|
@ -15,21 +15,6 @@
|
||||||
Need more info? Check our <a target="_blank" href="/about">intro</a> and <a target="_blank" href="/about/usage">usage guide</a>!
|
Need more info? Check our <a target="_blank" href="/about">intro</a> and <a target="_blank" href="/about/usage">usage guide</a>!
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<script>
|
<script src="/assets/js/upload.js" async />
|
||||||
var body = document.getElementsByTagName("body")[0];
|
|
||||||
|
|
||||||
body.addEventListener('dragover', function(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
e.stopPropagation();
|
|
||||||
}, false);
|
|
||||||
|
|
||||||
body.addEventListener('drop', function(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
e.stopPropagation();
|
|
||||||
if (e.dataTransfer) {
|
|
||||||
document.getElementById('keytext').files = e.dataTransfer.files;
|
|
||||||
}
|
|
||||||
}, false);
|
|
||||||
</script>
|
|
||||||
</div>
|
</div>
|
||||||
{{/layout}}
|
{{/layout}}
|
||||||
|
|
Loading…
Reference in a new issue