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

win

parent 64242444
......@@ -58,8 +58,8 @@ app.on('ready', function() {
mainWindow.center()
var view_path = path.join(app.getAppPath(), 'code', 'panu_view.html')
mainWindow.webContents.loadUrl('file://' + view_path)
if (IS_DEV) {
mainWindow.webContents.openDevTools(true)
if (IS_DEV) {
}
windows['authWindow'].close()
delete windows['authWindow']
......
......@@ -32,10 +32,11 @@ var upload = function upload() {
}
var resourcesCreated = function resourcesCreated(err) {
// if (err) { throw(err) }
if (err) { throw(err) }
async.parallelLimit(file_upload_tasks, 3, function filesUploaded() {
setFormState('uploaded')
document.getElementById('resource_entu_link').setAttribute('href', 'https://entu.keeleressursid.ee/entity/resource/' + resource.eid)
document.getElementById('resource_entu_link').innerHTML = 'https://entu.keeleressursid.ee/entity/resource/' + resource.eid
document.getElementById('resource_entu_link').onclick = openResourceInBrowser
// ipc.send('data', resource)
clearInterval(renderer_interval)
......@@ -85,7 +86,10 @@ var createEntuResource = function createEntuResource(parent_eid, resource, callb
xhr.setRequestHeader('X-Auth-UserId', user_data['user_id'])
xhr.setRequestHeader('X-Auth-Token', user_data['session_key'])
xhr.onload = function (err) {
if (err) { return callback(err) }
// if (err) {
// console.log(err)
// return callback(err)
// }
var new_eid = op.get(JSON.parse(this.responseText), ['result', 'id'], false)
console.log('Looking for new EID:', 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