Skip to content

Commit

Permalink
Merge pull request #21 from jamiefaye/dev
Browse files Browse the repository at this point in the history
Bug fixes
  • Loading branch information
jamiefaye authored Nov 11, 2018
2 parents df9f9af + 88a6ca9 commit 5433793
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 659 deletions.
2 changes: 1 addition & 1 deletion DR/FTF/List.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions DR/xmlView/viewXML.htm
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
<title>Downrush XML Viewer</title>
<!-- https://stackoverflow.com/questions/951791/javascript-global-error-handling -->
<script type="text/javascript">

window.onerror = function(msg, url, line, col, error) {
var extra = !col ? '' : '\ncolumn: ' + col;
extra += !error ? '' : '\nerror: ' + error;
alert("Error: " + msg + "\nurl: " + url + "\nline: " + line + extra);
return true;
};

</script>
<div id="npoptemp" style="display: none;"></div>
<link rel="stylesheet" href="edit.css">
Expand Down
13 changes: 9 additions & 4 deletions FTF/src/FileBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ case 2:
}
let that = this;
let file = zonkList.shift();
let url = "/upload.cgi?DEL=" + file;
let fileEnc = encodeURIComponent(file);
let url = "/upload.cgi?DEL=" + fileEnc;
// Capture closure.
let zonkFunc = function (status) {
if (!status) {// Pass failure back up the stack.
Expand Down Expand Up @@ -280,7 +281,9 @@ case 2:

deleteFiles()
{
var boxList = this.getCheckedList(this.currentPath + '/');
let boxPath = this.currentPath;
if (boxPath !== '/') boxPath += '/';
var boxList = this.getCheckedList(boxPath);
var alertList = boxList.join('\n');
var result = confirm( "Delete "+ alertList + "?" );
let that = this;
Expand All @@ -307,7 +310,9 @@ case 2:
}

renameFile() {
let boxList = this.getCheckedList(this.currentPath + '/');
let boxPath = this.currentPath;
if (boxPath !== '/') boxPath += '/';
let boxList = this.getCheckedList(boxPath);
if (boxList.length === 0) {
alert("Please select a file to rename or move using the checkbox");
return;
Expand Down Expand Up @@ -492,7 +497,7 @@ case 2:

$('#uploadbut').click(e=>{that.upload()});
$('#newdirbut').click(e=>{that.NewDirectory()});
$('#deletebit').click(e=>{that.deleteFiles()});
$('#deletebut').click(e=>{that.deleteFiles()});
$('#renamebut').click(e=>{that.renameFile()});
$('#reloadbut').click(e=>{that.reload_list()});

Expand Down
2 changes: 1 addition & 1 deletion FTF/src/List.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ let fileManagerHTML =`<html>
<br>Drag and drop files and folders to upload here.<br><div id="statind"></div>
</div>
<input id='newdirbut' type="button" value="New Directory">
<input id='deletebit' type="button" value="Remove Checked Files">
<input id='deletebut' type="button" value="Remove Checked Files">
<input id='renamebut' type="button" value="Rename Checked File">
<hr>
<div class = 'nobord'>
Expand Down
Loading

0 comments on commit 5433793

Please sign in to comment.