WebClient: remove inline style from HTML elements

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino 2023-11-07 18:09:24 +01:00
parent 6295be786f
commit 96c614550f
No known key found for this signature in database
GPG key ID: 935D2952DEC4EECF
2 changed files with 7 additions and 3 deletions

View file

@ -141,6 +141,10 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
.wrap-word {
overflow-wrap: break-word;
}
.line-through {
text-decoration: line-through;
}
</style>
{{- end}}

View file

@ -366,11 +366,11 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
recList.empty();
$.each(response.data, function(key, item) {
itemCode = escapeHTML(item.code);
let style = "";
let txtStyleClass = "";
if (item.used) {
style = `style="text-decoration: line-through;"`;
txtStyleClass = "line-through";
}
recList.append(`<li class="d-flex align-items-center py-2 fw-semibold fs-5 text-gray-800" ${style}><span class="bullet bullet-dot me-5"></span>${itemCode}</li>`);
recList.append(`<li class="d-flex align-items-center py-2 fw-semibold fs-5 text-gray-800 ${txtStyleClass}"><span class="bullet bullet-dot me-5"></span>${itemCode}</li>`);
});
recCodesModal.show();
}).catch(function (error){