Commit faf48d99 authored by Mihkel Putrinš's avatar Mihkel Putrinš

Merge branch 'test'

parents 7beac051 37f25c4d
...@@ -101,7 +101,7 @@ var resourceLoaded = function resourceLoaded() { ...@@ -101,7 +101,7 @@ var resourceLoaded = function resourceLoaded() {
} }
var renderResource = function renderResource() { var renderResource = function renderResource() {
console.log(JSON.stringify(op.get(resource_stats, 'mime'), null, 2)) // console.log(JSON.stringify(op.get(resource_stats, 'mime'), null, 2))
document.getElementById('resourceStats').removeAttribute('hidden') document.getElementById('resourceStats').removeAttribute('hidden')
document.getElementById('resourceDirectories').innerHTML = '' document.getElementById('resourceDirectories').innerHTML = ''
document.getElementById('resourceFiles').innerHTML = '' document.getElementById('resourceFiles').innerHTML = ''
......
...@@ -35,12 +35,14 @@ ...@@ -35,12 +35,14 @@
<p id="uploadResourceMessage">Ressurss on üleslaadimiseks valmis.</p> <p id="uploadResourceMessage">Ressurss on üleslaadimiseks valmis.</p>
<button id="uploadResourceButton">Panusta!</button> <button id="uploadResourceButton">Panusta!</button>
</div> </div>
<div id="uploading" hidden=""> <span>Kataloogid: </span><span id="uploadedResources">0</span><span>/</span><span id="uploadTotalResources">0</span> <div id="uploading" hidden="">
<span>Kataloogid: </span><span id="uploadedResources">0</span><span>/</span><span id="uploadTotalResources">0</span>
<span>Failid: </span><span id="uploadedSize">0</span><span>/</span><span id="uploadTotalSize">0</span>
<div id="resourceProgressbarOuter"> <div id="resourceProgressbarOuter">
<div id="resourceProgressbarInner"> <div id="resourceProgressbarInner">
<div id="fileProgressbarInner"></div> <div id="fileProgressbarInner"></div>
</div> </div>
</div><span>Failid: </span><span id="uploadedSize">0</span><span>/</span><span id="uploadTotalSize">0</span> </div>
<pre id="status"></pre> <pre id="status"></pre>
</div> </div>
<div id="thankYou" hidden=""> <div id="thankYou" hidden="">
......
#resourceProgressbarOuter { #resourceProgressbarOuter {
width: 100%; margin-top: 0.5em;
left: 1em;
right: 120px;
position: absolute;
border-radius: 25px; border-radius: 25px;
height: 9px; height: 9px;
background-color: #E8E8C3; background-color: #E8E8C3;
...@@ -12,13 +15,6 @@ ...@@ -12,13 +15,6 @@
background-color: #92CC6F; background-color: #92CC6F;
/*border: 0px solid green;*/ /*border: 0px solid green;*/
} }
#fileProgressbarOuter {
width: 100%;
border-radius: 25px;
height: 9px;
background-color: #cdf;
border: 0px solid black;
}
#fileProgressbarInner { #fileProgressbarInner {
width: 0%; width: 0%;
border-radius: 25px; border-radius: 25px;
......
...@@ -84,7 +84,8 @@ var createEntuResource = function createEntuResource(parent_eid, resource, callb ...@@ -84,7 +84,8 @@ var createEntuResource = function createEntuResource(parent_eid, resource, callb
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded") xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded")
xhr.setRequestHeader('X-Auth-UserId', user_data['user_id']) xhr.setRequestHeader('X-Auth-UserId', user_data['user_id'])
xhr.setRequestHeader('X-Auth-Token', user_data['session_key']) xhr.setRequestHeader('X-Auth-Token', user_data['session_key'])
xhr.onload = function () { xhr.onload = function (err) {
if (err) { return callback(err) }
var new_eid = op.get(JSON.parse(this.responseText), ['result', 'id'], false) var new_eid = op.get(JSON.parse(this.responseText), ['result', 'id'], false)
console.log('Looking for new EID:', new_eid) console.log('Looking for new EID:', new_eid)
if (new_eid) { if (new_eid) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment