Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
38b3b4a
handle prohibited chars in file names
qqmyers Jun 4, 2024
42711ab
css for bad chars warning
qqmyers Jun 4, 2024
3c6af7d
i18n re: badChars
qqmyers Jun 4, 2024
c4d8539
check for bad paths, munge path/filename before comparing with existing
qqmyers Jun 5, 2024
ee691b7
fix path munging in good case
qqmyers Jun 5, 2024
ff76b80
i18n fix
qqmyers Jun 5, 2024
f78fd4d
fix regex
qqmyers Jun 5, 2024
9bf81a9
fix highlight, cleanup warning
qqmyers Jun 5, 2024
62336b4
use origPath in rawFileMap
qqmyers Jun 5, 2024
e385b7c
latest libraries
qqmyers Jun 4, 2024
21f03f8
localinstall script
qqmyers Jun 4, 2024
104e985
fix sha512 async issue
qqmyers Jun 5, 2024
81b57d8
update version
qqmyers Jun 5, 2024
05421fc
remove console.log msgs
qqmyers Aug 20, 2024
92dd4a0
Merge pull request #33 from gdcc/Update_libraries
qqmyers Aug 20, 2024
586a2a7
Merge remote-tracking branch 'origin/develop' into shafixtodev
qqmyers Aug 20, 2024
55d5afa
Merge pull request #34 from gdcc/shafixtodev
qqmyers Aug 20, 2024
f37df24
Merge pull request #35 from gdcc/v0.3
qqmyers Aug 20, 2024
242ef6e
regex updates to match Dataverse/DVUploader
qqmyers Mar 4, 2025
5270eb0
Fix for #24
qqmyers Mar 4, 2025
825f01d
warn if need to go to draft version
qqmyers Mar 5, 2025
6e7076b
cut/paste err
qqmyers Apr 22, 2025
95b1299
add error message
qqmyers Apr 22, 2025
518de9f
add select/deselect buttons
qqmyers Apr 22, 2025
a685e74
add max files
qqmyers Apr 22, 2025
aabe0f0
adjust reaction to max file change, tweak styling
qqmyers Apr 22, 2025
32c5882
avoid null in toggleUpload when not a checkbox change
qqmyers Apr 22, 2025
5ec3ca3
remove updateCheckboxes ref
qqmyers Apr 22, 2025
e0b3287
remove decrement on uncheck - already handled
qqmyers Apr 22, 2025
fe43cb3
do decrement when reversing check over max
qqmyers Apr 22, 2025
422d66d
replace warning when not needed
qqmyers Apr 22, 2025
0f06a34
enable/disable start upload as needed
qqmyers Apr 22, 2025
d9b81b0
style updates for disabled
qqmyers Apr 22, 2025
709c4b0
stop border color change in disabled
qqmyers Apr 22, 2025
8ae969c
misspelled msgs
qqmyers Apr 22, 2025
2c8e0c2
hover color for sm buttons
qqmyers Apr 23, 2025
948f631
Cherry pick from PR#22
luddaniel Sep 6, 2023
2d8aab5
allow html msg
qqmyers Apr 23, 2025
98a2ac4
update text
qqmyers Apr 23, 2025
d363462
readme updates
qqmyers Apr 23, 2025
84da551
use upid not nth file for progress, error reporting
qqmyers Apr 23, 2025
2435caa
add id after start, cleanup
qqmyers Apr 23, 2025
00d2545
fill rows
qqmyers Apr 23, 2025
69b392b
update msg after dir select in empty ds case
qqmyers Apr 23, 2025
b232742
typo in msg
qqmyers Apr 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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+):

Expand Down
62 changes: 62 additions & 0 deletions localinstall.sh
Original file line number Diff line number Diff line change
@@ -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/.*<link.*href="\(http[^"]*\)".*/\1/p' *.html | sort -u | sed -n 's/^\(.*\/\)*\(.*\)/sed -i \x27s,\0\,lib\/\2,\x27 *.html/p' > replace_css.sh
sed -n 's/.*<link.*href="\(http[^"]*\)".*/\1/p' *.html | sort -u > 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
41 changes: 36 additions & 5 deletions src/css/dvwebloader.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand All @@ -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;
Expand All @@ -45,6 +58,10 @@ label {
background-color: beige;
padding: 10px;
}
.warn {
background-color: bisque;
padding: 10px;
}
.file-exists {
background-color: lightblue;
}
Expand All @@ -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;
}
6 changes: 3 additions & 3 deletions src/dvwebloader.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<title>Dataverse WebLoader</title>
<link type="text/css" rel="stylesheet" href="css/dvwebloader.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/core.js"></script>
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/core.js"></script>
<script type="module" src="js/fileupload2.js"></script>
<script src="js/logoHandler.js"></script>

Expand All @@ -26,7 +26,7 @@ <h1><span id="title-text">Folder Upload</span></h1>
</div>
<div id="filelist"></div>
<div id="credit">
<a href='https://github.com/gdcc/dvwebloader' target='_blank'>DVWebloader v0.2</a><span id="sponsor-text">, development sponsored by UiT/DataverseNO</span>
<a href='https://github.com/gdcc/dvwebloader' target='_blank'>DVWebloader v0.3</a><span id="sponsor-text">, development sponsored by UiT/DataverseNO</span>
</div>
<script>
var input = document
Expand Down
Loading