replace html in js

This commit is contained in:
Raphael 2023-05-05 14:18:32 +02:00
parent b93c78e760
commit cc2dd0dd5f

View File

@ -407,45 +407,41 @@ function initWhiteboard() {
var webdavusername = localStorage.getItem("webdavusername") || ""; var webdavusername = localStorage.getItem("webdavusername") || "";
var webdavpassword = localStorage.getItem("webdavpassword") || ""; var webdavpassword = localStorage.getItem("webdavpassword") || "";
var webDavHtml = $( var webDavHtml = $(
"<div>" + `<div>
"<table>" + <table>
"<tr>" + <tr>
"<td>Server URL:</td>" + <td>Server URL:</td>
'<td><input class="webdavserver" type="text" value="' + <td><input class="webdavserver" type="text" value="${webdavserver}" placeholder="https://yourserver.com/remote.php/webdav/"></td>
webdavserver + <td></td>
'" placeholder="https://yourserver.com/remote.php/webdav/"></td>' + </tr>
"<td></td>" + <tr>
"</tr>" + <td>Path:</td>
"<tr>" + <td><input class="webdavpath" type="text" placeholder="folder" value="${webdavpath}"></td>
"<td>Path:</td>" + <td style="font-size: 0.7em;"><i>path always have to start & end with "/"</i></td>
'<td><input class="webdavpath" type="text" placeholder="folder" value="' + </tr>
webdavpath + <tr>
'"></td>' + <td>Username:</td>
'<td style="font-size: 0.7em;"><i>path always have to start & end with "/"</i></td>' + <td><input class="webdavusername" type="text" value="${webdavusername}" placeholder="username"></td>
"</tr>" + <td style="font-size: 0.7em;"></td>
"<tr>" + </tr>
"<td>Username:</td>" + <tr>
'<td><input class="webdavusername" type="text" value="' + <td>Password:</td>
webdavusername + <td><input class="webdavpassword" type="password" value="${webdavpassword}" placeholder="password"></td>
'" placeholder="username"></td>' + <td style="font-size: 0.7em;"></td>
'<td style="font-size: 0.7em;"></td>' + </tr>
"</tr>" + <tr>
"<tr>" + <td style="font-size: 0.7em;" colspan="3">
"<td>Password:</td>" + Note: You have to generate and use app credentials if you have 2 Factor Auth activated on your dav/nextcloud server!
'<td><input class="webdavpassword" type="password" value="' + </td>
webdavpassword + </tr>
'" placeholder="password"></td>' + <tr>
'<td style="font-size: 0.7em;"></td>' + <td></td>
"</tr>" + <td colspan="2">
"<tr>" + <span class="loadingWebdavText" style="display:none;">Saving to webdav, please wait...</span><button class="modalBtn webdavUploadBtn"><i class="fas fa-upload"></i> Start Upload</button>
'<td style="font-size: 0.7em;" colspan="3">Note: You have to generate and use app credentials if you have 2 Factor Auth activated on your dav/nextcloud server!</td>' + </td>
"</tr>" + </tr>
"<tr>" + </table>
"<td></td>" + </div>`
'<td colspan="2"><span class="loadingWebdavText" style="display:none;">Saving to webdav, please wait...</span><button class="modalBtn webdavUploadBtn"><i class="fas fa-upload"></i> Start Upload</button></td>' +
"</tr>" +
"</table>" +
"</div>"
); );
webDavHtml webDavHtml
.find(".webdavUploadBtn") .find(".webdavUploadBtn")