made the page a little prettier
This commit is contained in:
parent
4af4487846
commit
c6952b54c7
|
@ -29,6 +29,11 @@ events.forEach(function (event) {
|
||||||
});
|
});
|
||||||
|
|
||||||
document.body.addEventListener('drop', function (ev) {
|
document.body.addEventListener('drop', function (ev) {
|
||||||
|
var area = document.body.getElementsByClassName('drag-n-drop')[0];
|
||||||
|
if (!area.contains(ev.target)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var files = Array.prototype.map.call(ev.dataTransfer.files, function (file) {
|
var files = Array.prototype.map.call(ev.dataTransfer.files, function (file) {
|
||||||
return file.path;
|
return file.path;
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<link href="./style.css" type="text/css" rel="stylesheet" media="screen">
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -8,7 +9,7 @@
|
||||||
<script>require('./notifications')</script>
|
<script>require('./notifications')</script>
|
||||||
<script>require('./drag-drop-render')</script>
|
<script>require('./drag-drop-render')</script>
|
||||||
|
|
||||||
<div>
|
<div class="notify">
|
||||||
<h3>Notifications</h3>
|
<h3>Notifications</h3>
|
||||||
<button class="start-notify">Start</button>
|
<button class="start-notify">Start</button>
|
||||||
<button class="stop-notify">Stop</button>
|
<button class="stop-notify">Stop</button>
|
||||||
|
|
Loading…
Reference in New Issue