From fa5a5bf865e86f02257f3b1bec84ba74e71319b1 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Tue, 6 Sep 2016 00:43:25 +0100 Subject: CLOUD: Move wwwroot archive to dists and script to devtools Both the data used to generate the archive and the archive itself were moved to dists/ instead of being in backends/. The script was also improved to optionally take a path as a command line argument to indicate where the wwwroot data are instead of assuming they are in the working directory. Finally a 'wwwroot' make target was also added to invoke the python script and generate the archive. with the expected path to --- dists/networking/wwwroot.zip | Bin 0 -> 242704 bytes dists/networking/wwwroot/.files.html | 60 ++++++++ dists/networking/wwwroot/.filesAJAX.html | 240 +++++++++++++++++++++++++++++++ dists/networking/wwwroot/.index.html | 18 +++ dists/networking/wwwroot/ajax.js | 48 +++++++ dists/networking/wwwroot/favicon.ico | Bin 0 -> 94081 bytes dists/networking/wwwroot/icons/7z.png | Bin 0 -> 166 bytes dists/networking/wwwroot/icons/dir.png | Bin 0 -> 150 bytes dists/networking/wwwroot/icons/txt.png | Bin 0 -> 156 bytes dists/networking/wwwroot/icons/unk.png | Bin 0 -> 142 bytes dists/networking/wwwroot/icons/up.png | Bin 0 -> 161 bytes dists/networking/wwwroot/icons/zip.png | Bin 0 -> 183 bytes dists/networking/wwwroot/logo.png | Bin 0 -> 132967 bytes dists/networking/wwwroot/style.css | 113 +++++++++++++++ 14 files changed, 479 insertions(+) create mode 100644 dists/networking/wwwroot.zip create mode 100644 dists/networking/wwwroot/.files.html create mode 100644 dists/networking/wwwroot/.filesAJAX.html create mode 100644 dists/networking/wwwroot/.index.html create mode 100644 dists/networking/wwwroot/ajax.js create mode 100644 dists/networking/wwwroot/favicon.ico create mode 100644 dists/networking/wwwroot/icons/7z.png create mode 100644 dists/networking/wwwroot/icons/dir.png create mode 100644 dists/networking/wwwroot/icons/txt.png create mode 100644 dists/networking/wwwroot/icons/unk.png create mode 100644 dists/networking/wwwroot/icons/up.png create mode 100644 dists/networking/wwwroot/icons/zip.png create mode 100644 dists/networking/wwwroot/logo.png create mode 100644 dists/networking/wwwroot/style.css (limited to 'dists/networking') diff --git a/dists/networking/wwwroot.zip b/dists/networking/wwwroot.zip new file mode 100644 index 0000000000..b767d7c5d7 Binary files /dev/null and b/dists/networking/wwwroot.zip differ diff --git a/dists/networking/wwwroot/.files.html b/dists/networking/wwwroot/.files.html new file mode 100644 index 0000000000..f05c0113f8 --- /dev/null +++ b/dists/networking/wwwroot/.files.html @@ -0,0 +1,60 @@ + + + + ScummVM + + + + +
+
+
+
+
+ + + +
{create_directory_button}{upload_files_button}
+ + +
+
+ + + {content} +
{index_of_directory}
+
+
+ + + \ No newline at end of file diff --git a/dists/networking/wwwroot/.filesAJAX.html b/dists/networking/wwwroot/.filesAJAX.html new file mode 100644 index 0000000000..d45c73069d --- /dev/null +++ b/dists/networking/wwwroot/.filesAJAX.html @@ -0,0 +1,240 @@ + + + + ScummVM + + + + +
+
+
+
+
+ + + +
{create_directory_button}{upload_files_button}
+ + +
+
+
{loading}
+
{error}
+ +
+
+
+ + + + + \ No newline at end of file diff --git a/dists/networking/wwwroot/.index.html b/dists/networking/wwwroot/.index.html new file mode 100644 index 0000000000..2a3d9d382d --- /dev/null +++ b/dists/networking/wwwroot/.index.html @@ -0,0 +1,18 @@ + + + + ScummVM + + + + +
+
+
+
+
+

{message}

+
+
+ + \ No newline at end of file diff --git a/dists/networking/wwwroot/ajax.js b/dists/networking/wwwroot/ajax.js new file mode 100644 index 0000000000..c01d7e93fc --- /dev/null +++ b/dists/networking/wwwroot/ajax.js @@ -0,0 +1,48 @@ +// the following is snippet from http://stackoverflow.com/a/18078705 +// I changed a few things though + +var ajax = {}; +ajax.x = function () { return new XMLHttpRequest(); }; // "no one uses IE6" + +ajax.send = function (url, callback, errorCallback, method, data, async) { + if (async === undefined) async = true; + + var x = ajax.x(); + x.open(method, url, async); + x.onreadystatechange = function () { + if (x.readyState == XMLHttpRequest.DONE) { + if (x.status == 200) + callback(x.responseText); + else + errorCallback(x); + } + }; + if (method == 'POST') { + x.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); + } + x.send(data) +}; + +ajax.get = function (url, data, callback, errorCallback, async) { + var query = []; + for (var key in data) { + query.push(encodeURIComponent(key) + '=' + encodeURIComponent(data[key])); + } + ajax.send(url + (query.length ? '?' + query.join('&') : ''), callback, errorCallback, 'GET', null, async) +}; + +ajax.post = function (url, data, callback, errorCallback, async) { + var query = []; + for (var key in data) { + query.push(encodeURIComponent(key) + '=' + encodeURIComponent(data[key])); + } + ajax.send(url, callback, errorCallback, 'POST', query.join('&'), async) +}; + +ajax.getAndParseJson = function (url, data, callback) { + ajax.get( + url, data, + function (responseText) { callback(JSON.parse(responseText)); }, + function (x) { console.log("error: " + x.status); } + ); +}; \ No newline at end of file diff --git a/dists/networking/wwwroot/favicon.ico b/dists/networking/wwwroot/favicon.ico new file mode 100644 index 0000000000..0283e8432e Binary files /dev/null and b/dists/networking/wwwroot/favicon.ico differ diff --git a/dists/networking/wwwroot/icons/7z.png b/dists/networking/wwwroot/icons/7z.png new file mode 100644 index 0000000000..656e7e7c62 Binary files /dev/null and b/dists/networking/wwwroot/icons/7z.png differ diff --git a/dists/networking/wwwroot/icons/dir.png b/dists/networking/wwwroot/icons/dir.png new file mode 100644 index 0000000000..bcdec04a57 Binary files /dev/null and b/dists/networking/wwwroot/icons/dir.png differ diff --git a/dists/networking/wwwroot/icons/txt.png b/dists/networking/wwwroot/icons/txt.png new file mode 100644 index 0000000000..023d2ee24a Binary files /dev/null and b/dists/networking/wwwroot/icons/txt.png differ diff --git a/dists/networking/wwwroot/icons/unk.png b/dists/networking/wwwroot/icons/unk.png new file mode 100644 index 0000000000..346eebecc3 Binary files /dev/null and b/dists/networking/wwwroot/icons/unk.png differ diff --git a/dists/networking/wwwroot/icons/up.png b/dists/networking/wwwroot/icons/up.png new file mode 100644 index 0000000000..2dc3df022b Binary files /dev/null and b/dists/networking/wwwroot/icons/up.png differ diff --git a/dists/networking/wwwroot/icons/zip.png b/dists/networking/wwwroot/icons/zip.png new file mode 100644 index 0000000000..cdfc5763dd Binary files /dev/null and b/dists/networking/wwwroot/icons/zip.png differ diff --git a/dists/networking/wwwroot/logo.png b/dists/networking/wwwroot/logo.png new file mode 100644 index 0000000000..9fdd2d0d1e Binary files /dev/null and b/dists/networking/wwwroot/logo.png differ diff --git a/dists/networking/wwwroot/style.css b/dists/networking/wwwroot/style.css new file mode 100644 index 0000000000..ba31587c4d --- /dev/null +++ b/dists/networking/wwwroot/style.css @@ -0,0 +1,113 @@ +html { + background: rgb(212, 117, 11); + background: linear-gradient(to bottom, rgb(212, 117, 11) 0%, rgb(212, 117, 11) 36%, rgb(239, 196, 24) 100%); + min-height: 100vh; +} + +.container { + width: 80%; + margin: 0 auto; +} + +.header { + padding: 10pt; + margin-bottom: 0; +} + +.content { + padding: 8pt; + background: rgb(251, 241, 206); + font-family: Tahoma; + font-size: 16pt; +} + +.content p { margin: 0 0 6pt 0; } + +.controls { + padding: 8pt; + background: #FFF; + font-family: Tahoma; + font-size: 16pt; +} + +.controls .buttons { + width: 100%; + max-width: 500pt; + margin: -8pt auto; + border: 0; + border-spacing: 0; +} + +.controls .buttons td { + width: 50%; + text-align: center; + margin: 0; + padding: 0; +} + +.controls .buttons a { + display: block; + height: 40pt; + line-height: 38pt; + vertical-align: middle; + color: #000; + text-decoration: none; +} + +.controls .buttons a:hover { + background: #F3F3F3; +} + +.modal { + margin-top: 10pt; + display: none; +} + +.modal p { margin: 0 0 6pt 0; } + +#create_directory input[type="text"], #upload_file input[type="file"] { + width: calc(100% - 2 * 5pt); +} + +.modal input { + border: 1px solid #EEE; + padding: 5pt; + font-size: 12pt; +} + +.modal input[type="submit"] { + display: block; + margin: 6pt auto; + background: #DDD; + border: 0; +} + +.modal input[type="submit"]:hover { + background: #F3F3F3; + cursor: pointer; +} + +td img { vertical-align: middle; height: 20px; } + +.directory_name { + display: block; + padding-bottom: 6px; +} + +.directory_name a { color: black; } +.directory_name a:hover { color: blue; } + +#loading_message, #error_message { + margin: -8pt; + margin-bottom: 5pt; + padding: 4pt; + text-align: center; +} + +#loading_message { + background: #99FF99; +} + +#error_message { + background: #FF9999; +} -- cgit v1.2.3