diff --git a/.travis.yml b/.travis.yml index c6e3ac1d..15d1ce1d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,11 @@ install: - export PATH="${TRAVIS_BUILD_DIR}/Godeps/_workspace/bin:$PATH" - go get github.com/mholt/caddy - go get github.com/caddyserver/caddydev +- go get github.com/BurntSushi/toml +- go get github.com/gorilla/websocket +- go get github.com/jimstudt/http-authentication/basic +- go get gopkg.in/yaml.v2 +- go get github.com/hashicorp/go-syslog - go install github.com/caddyserver/caddydev - go get github.com/hacdias/caddy-filemanager - go generate diff --git a/assets/public/js/application.js b/assets/public/js/application.js index 7c232f0c..9a556aca 100644 --- a/assets/public/js/application.js +++ b/assets/public/js/application.js @@ -259,6 +259,16 @@ var downloadEvent = function (event) { return false; } +var uploadEvent = function (event) { + event.preventDefault(); + + let button = document.getElementById("upload-input"); + button.click(); + + + return false; +} + var RemoveLastDirectoryPartOf = function (url) { var arr = url.split('/'); arr.pop(); @@ -339,6 +349,9 @@ document.addEventListener("DOMContentLoaded", function (event) { handleViewType(document.getCookie("view-list")); document.getElementById("view").addEventListener("click", viewEvent) }; + if (document.getElementById("upload")) { + document.getElementById("upload").addEventListener("click", uploadEvent); + } document.getElementById("delete").addEventListener("click", deleteEvent); document.getElementById("rename").addEventListener("click", renameEvent); document.getElementById("download").addEventListener("click", downloadEvent); diff --git a/assets/templates/listing.tmpl b/assets/templates/listing.tmpl index 43babb10..18f6390f 100644 --- a/assets/templates/listing.tmpl +++ b/assets/templates/listing.tmpl @@ -29,4 +29,6 @@ {{- end}} + + {{ end }}