<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8"/>
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>Webbox</title>
		<link rel="stylesheet" type="text/css" href="webbox-html/webbox.css"/>
		<link rel="shortcut icon" href="webbox-html/favicon.ico" type="image/x-icon"/>
		<script src="webbox-html/webbox.js"></script>
	</head>
	<body onload="initMainpage();">
		<div>
			<table>
				<tr>
				<td class="title">Webbox</td>
				<td class="menusymbol" onclick="showMenu();"><img src="webbox-html/menu.png" alt=""/></td>
				</tr>
			</table>
			<input id="uploadfile" type="file" onchange="onUploadFile();" multiple hidden/>
			<table class="menu">
				<tr>
					<td class="firsttd"></td>
					<td class="entry" onclick="refresh();"><img src="webbox-html/refresh-inverted.png" alt=""/></td>
				</tr>
			</table>
		</div>
		<div id="list">
		</div>

		<div class="greyout fullscreen" id="greyout" hidden>
		</div>

		<div class="dialogwindow" id="dialogwindow" hidden>
			<div id="dialog" class="dialog">
			</div>
			<button class="button leftbutton" id="cancelbutton">Cancel</button>
			<button class="button rightbutton" id="okbutton">OK</button>
		</div>

		<div class="menuwindow" id="menuwindow" hidden>
			<div class="menudiv">
				<table class="menudialog">
					<tr class="writecommand"><td class="entry" onclick="hideMenu(); createDir();">New Folder</td></tr>
					<tr><td class="entry" onclick="hideMenu(); download();">Download</td></tr>
					<tr class="writecommand"><td class="entry" onclick="hideMenu(); upload();">Upload</td></tr>
					<tr class="writecommand"><td class="entry" onclick="hideMenu(); deleteItems();">Delete</td></tr>
					<tr class="writecommand"><td class="entry" onclick="hideMenu(); copy();">Copy</td></tr>
					<tr class="writecommand"><td class="entry" onclick="hideMenu(); move();">Move</td></tr>
					<tr class="writecommand"><td class="entry" onclick="hideMenu(); rename();">Rename</td></tr>
					<tr><td class="entry" onclick="hideMenu(); info();">Info</td></tr>
					<tr><td class="entry" onclick="hideMenu(); selectAll();">Select/Unselect All</td></tr>
					<tr id="logoutcommand" hidden><td class="entry" onclick="hideMenu(); logout();">Logout</td></tr>
					<tr><td class="entry" onclick="hideMenu();">Close Menu</td></tr>
				</table>
			</div>
		</div>

		<div class="progresswindow" id="progresswindow" hidden>
			<canvas id="progresscanvas" class="progresscanvas" width="100" height="100"></canvas>
		</div>

		<div id="create-dir-dialog" hidden>
			New folder:<br>
			<input type="text" id="newdir" class="textinput"></input>
		</div>

		<div id="download-zip-dialog" hidden>
			Download multiple files as ZIP?<br>
		</div>

		<div id="copy-dialog" hidden>
			Copying files to folder:<br>
			<input type="text" id="copydir" class="textinput"></input>
			<br/>
			Files to copy:
			<br/>
			<div id="copyfiles"></div>
		</div>

		<div id="move-dialog" hidden>
			Moving files to folder:<br>
			<input type="text" id="movedir" class="textinput"></input>
			<br/>
			Files to move:
			<br/>
			<div id="movefiles"></div>
		</div>

		<div id="rename-dialog" hidden>
			Old name:
			<br/>
			<div id="renameold"></div>
			<br/>
			New name:<br>
			<input type="text" id="renamenew" class="textinput"></input>
			<br/>
		</div>
		
		<div id="login-dialog" hidden>
			<span id="logintitle">Webbox</span><br/>
			<br/>
			Username:<br/>
			<input type="text" id="loginusername" class="textinput"></input>
			Password:<br/>
			<input type="password" id="loginpassword" class="textinput"></input>
		</div>

		<div id="logout-dialog" hidden>
			Are you sure you want to log out?
		</div>

		<a id="download-a" hidden></a>

		<div class="footer">
		</div>
		
	</body>
</html>