Skip to content

Commit

Permalink
Need to replaceAll in a few places.
Browse files Browse the repository at this point in the history
References #1688
  • Loading branch information
cpinkham committed Dec 3, 2023
1 parent b5cd8a8 commit c445310
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions www/js/fpp.js
Original file line number Diff line number Diff line change
Expand Up @@ -4981,15 +4981,15 @@ function RenameFile(dir, file) {
}

function DownloadFile(dir, file) {
location.href = "api/file/" + dir + "/" + encodeURIComponent(file).replace('%2F','/');
location.href = "api/file/" + dir + "/" + encodeURIComponent(file).replaceAll('%2F','/');
}

function DownloadFiles(dir, files) {
if (files.length == 1) {
DownloadFile(dir, files[0]);
} else {
for (var i = 0; i < files.length; i++) {
window.open("api/file/" + dir + "/" + encodeURIComponent(files[i]).replace('%2F','/'));
window.open("api/file/" + dir + "/" + encodeURIComponent(files[i]).replaceAll('%2F','/'));
}
}
}
Expand All @@ -5004,11 +5004,11 @@ function ViewImage(file) {
}

function ViewFile(dir, file) {
var url = "api/file/" + dir + "/" + encodeURIComponent(file).replace('%2F','/');
var url = "api/file/" + dir + "/" + encodeURIComponent(file).replaceAll('%2F','/');
ViewFileImpl(url, file);
}
function TailFile(dir, file, lines) {
var url = "api/file/" + dir + "/" + encodeURIComponent(file).replace('%2F','/') + "?tail=" + lines;
var url = "api/file/" + dir + "/" + encodeURIComponent(file).replaceAll('%2F','/') + "?tail=" + lines;
//console.log(url);
ViewFileImpl(url, file);
}
Expand Down Expand Up @@ -5042,7 +5042,7 @@ function ViewFileImpl(url, file, html = '') {

function DeleteFile(dir, row, file, silent = false) {
$.ajax({
url: "api/file/" + dir + "/" + encodeURIComponent(file).replace('%2F','/'),
url: "api/file/" + dir + "/" + encodeURIComponent(file).replaceAll('%2F','/'),
type: 'DELETE'
}).done(function (data) {
if (data.status == "OK") {
Expand Down

0 comments on commit c445310

Please sign in to comment.