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

refactor

parent 4f96443b
......@@ -157,7 +157,7 @@ function recurseLocal(parent_resource, paths, loadedCB) {
})
}
function selectLocal () {
document.getElementById('selectLocalButton').onclick = function selectLocal () {
resource = {name: 'root'}
resource_stats = {files: {count: 0, size: 0}, directories: {count: 0}, mime:{}}
dialog.showOpenDialog({properties:['openFile', 'openDirectory', 'multiSelections']}, function selectedPath(_paths) {
......@@ -200,6 +200,7 @@ function selectLocal () {
function initialize() {
if (!data) {
data = JSON.parse(clipboard.readText())
clipboard.clear()
......
......@@ -15,7 +15,7 @@
<h1 id="userName">Tere</h1>
<div id="selectLocal" hidden>
<p id="selectLocalMessage">Palun vali fail(id) ja/või kataloog(id), mida soovid üles laadida.</p>
<button id="selectLocalButton" onclick="selectLocal()">Vali</button>
<button id="selectLocalButton">Vali</button>
</div>
<div id="resourceName" hidden="">
<p id="resourceNameMessage">Muuda ressursi nimi sobivaks.</p>
......
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