diff --git a/README.md b/README.md index d062ede..8af3385 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # dvwebloader A web tool for uploading folders of files to a Dataverse dataset. See [the wiki](https://github.com/gdcc/dvwebloader/wiki) for further details. -Hosted at https://gdcc.github.io/dvwebloader +The Hosted version at https://gdcc.github.io/dvwebloader can be used for testing. You should fork or install a local copy for production use (to avoid changes made in this repository immediately being available from your Dataverse installation.) +You may also want to run the localinstall.sh script in the directory you download to to make and local copies of the libraries used. ### Current integration mechanism (v5.13+): diff --git a/localinstall.sh b/localinstall.sh new file mode 100644 index 0000000..ef8a47a --- /dev/null +++ b/localinstall.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +echo Creating version of DVWebloader that uses only local libraries +echo Run this script in the directory with the dvwebloader.html file + + +dirLocal=$(pwd) + +echo Downloading local copies of remote JavaScript libraries: +sed -n 's/.*src="\(http[^"]*\)".*/\1/p' *.html | sort -u | sed -n 's/^\(.*\/\)*\(.*\)/sed -i \x27s,\0\,lib\/\2,\x27 *.html/p' > replace_js.sh +sed -n 's/.*src="\(http[^"]*\)".*/\1/p' *.html | sort -u > urls_js.txt +source replace_js.sh +cat urls_js.txt + +echo Downloading local copies of remote JavaScript libraries referenced in js files: +cd ./js +sed -n 's/.*src[ ]*=[ ]*"\(http[^"]*\)".*/\1/p' *.js | sort -u | sed -n 's/^\(.*\/\)*\(.*\)/sed -i \x27s,\0\,lib\/\2,\x27 *.js/p' > replacejs_js.sh +sed -n 's/.*src[ ]*=[ ]*"\(http[^"]*\)".*/\1/p' *.js | sort -u > urlsjs_js.txt +source replacejs_js.sh +cat urlsjs_js.txt +cd .. + +echo Downloading local copies of remote CSS files: +sed -n 's/.* replace_css.sh +sed -n 's/.* urls_css.txt +source replace_css.sh +cat urls_css.txt + +if [ ! -d ./lib ]; then + mkdir ./lib +fi +cd ./lib +while read url; do + wget --quiet $url +done < "../urls_js.txt" +while read url; do + wget --quiet $url +done < "../js/urlsjs_js.txt" + + +cd ".." +if [ ! -d ./css ]; then + mkdir ./css +fi +cd ./css +while read url; do + wget --quiet $url +done < "../urls_css.txt" + +cd .. + + +echo Cleaning Up... +rm urls_js.txt +rm urls_css.txt +rm replace_js.sh +rm replace_css.sh +rm js/urlsjs_js.txt +rm js/replacejs_js.sh + +echo Done +exit 0 diff --git a/src/css/dvwebloader.css b/src/css/dvwebloader.css index a413c03..a4de1ac 100644 --- a/src/css/dvwebloader.css +++ b/src/css/dvwebloader.css @@ -3,14 +3,11 @@ } .ui-fileupload-row { display: inline-flex; - width: 90%; + width: 100%; } .ui-fileupload-row > div { padding: 5px; } -.ui-fileupload-row{ - display:table-row; -} .ui-fileupload-row>div{ display:table-cell; padding:4px 10px; @@ -26,7 +23,7 @@ label { -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; - border: solid 1px #20538D; + border: solid 2px #20538D; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4); -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2); -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2); @@ -37,6 +34,22 @@ label { text-decoration: none; margin: 20px; } +.button-sm { + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + border: solid 2px #20538D; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2); + margin: 5px; +} +.input-sm { + margin-left:10px; + width: 80px; + display:inline-block; +} .success { background-color: lightgreen; padding: 10px; @@ -45,6 +58,10 @@ label { background-color: beige; padding: 10px; } +.warn { + background-color: bisque; + padding: 10px; +} .file-exists { background-color: lightblue; } @@ -67,3 +84,17 @@ h1 { width: 58%; display:inline-block; } +.button:disabled { + background: gray; + border-color: gray!important; +} +.button:hover { + border-color: lightblue; +} +.button-sm:hover { + border-color: lightblue; +} +.badchars { + background-color: bisque; + padding: 10px; +} diff --git a/src/dvwebloader.html b/src/dvwebloader.html index 8e41d24..a4446e2 100644 --- a/src/dvwebloader.html +++ b/src/dvwebloader.html @@ -3,8 +3,8 @@ Dataverse WebLoader - - + + @@ -26,7 +26,7 @@

Folder Upload

- DVWebloader v0.2 + DVWebloader v0.3