Fixed weird HTML on showing encrypted fields on click
This commit is contained in:
@@ -721,6 +721,9 @@ body {
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
.bootstrap-table .fixed-table-container {
|
||||
overflow: hidden;
|
||||
}
|
||||
@media print {
|
||||
@page {
|
||||
size: A4;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -349,6 +349,9 @@ body {
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
.bootstrap-table .fixed-table-container {
|
||||
overflow: hidden;
|
||||
}
|
||||
@media print {
|
||||
@page {
|
||||
size: A4;
|
||||
|
||||
File diff suppressed because one or more lines are too long
Vendored
+6
@@ -22057,6 +22057,9 @@ body {
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
.bootstrap-table .fixed-table-container {
|
||||
overflow: hidden;
|
||||
}
|
||||
@media print {
|
||||
@page {
|
||||
size: A4;
|
||||
@@ -23855,6 +23858,9 @@ body {
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
.bootstrap-table .fixed-table-container {
|
||||
overflow: hidden;
|
||||
}
|
||||
@media print {
|
||||
@page {
|
||||
size: A4;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"/js/dist/all.js": "/js/dist/all.js?id=b7b86fa704f44a30a4593132fd496fee",
|
||||
"/css/build/overrides.css": "/css/build/overrides.css?id=ad4e3d7e90b9ceedf671d1cfcb841d22",
|
||||
"/css/build/app.css": "/css/build/app.css?id=afc194bbbf051238aabedad2e68fc42b",
|
||||
"/css/build/overrides.css": "/css/build/overrides.css?id=ce04095907063a4e5504e2a794e5112d",
|
||||
"/css/build/app.css": "/css/build/app.css?id=afa3130cba11c74d7f72a92b345e282c",
|
||||
"/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=ee0ed88465dd878588ed044eefb67723",
|
||||
"/css/dist/all.css": "/css/dist/all.css?id=f57dd86677901b6b41cdb2a9bc911c11",
|
||||
"/css/dist/all.css": "/css/dist/all.css?id=c2c4079a74ba152dc7242128be555c47",
|
||||
"/css/dist/signature-pad.css": "/css/dist/signature-pad.css?id=6a89d3cd901305e66ced1cf5f13147f7",
|
||||
"/css/dist/signature-pad.min.css": "/css/dist/signature-pad.min.css?id=6a89d3cd901305e66ced1cf5f13147f7",
|
||||
"/js/select2/i18n/af.js": "/js/select2/i18n/af.js?id=4f6fcd73488ce79fae1b7a90aceaecde",
|
||||
|
||||
@@ -340,6 +340,12 @@ body {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
|
||||
// Clip the absolutely-positioned fixed-column overlays so they cannot
|
||||
// bleed past the container's bottom edge into the pagination area.
|
||||
.bootstrap-table .fixed-table-container {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
@page {
|
||||
|
||||
@@ -2526,23 +2526,34 @@
|
||||
|
||||
// Function to add original value to elements
|
||||
function addValue($element) {
|
||||
// Get original value of the element
|
||||
var originalValue = $element.text().trim();
|
||||
var originalHtml = $element.html().trim();
|
||||
var originalText = $element.text().trim();
|
||||
var hasHtmlContent = originalHtml !== '' && originalHtml !== originalText;
|
||||
|
||||
// Show asterisks only for not empty values
|
||||
if (originalValue !== '') {
|
||||
// This is necessary to avoid loop because value is generated dynamically
|
||||
if (originalValue !== '' && originalValue !== asterisks) $element.attr('value', originalValue);
|
||||
// Show asterisks only for non-empty values
|
||||
if (originalText !== '') {
|
||||
var asterisks = '*'.repeat(11);
|
||||
// Avoid reprocessing already-asterisked elements
|
||||
if (originalText !== asterisks) {
|
||||
if (hasHtmlContent) {
|
||||
$element.data('encrypted-html', originalHtml);
|
||||
}
|
||||
$element.attr('value', originalText);
|
||||
}
|
||||
|
||||
// Hide the original value and show a fixed-length asterisk placeholder
|
||||
var asterisks = '*'.repeat(11);
|
||||
$element.text(asterisks);
|
||||
|
||||
// Add click event to show original text
|
||||
// Add click event to show original value
|
||||
$element.click(function() {
|
||||
var $this = $(this);
|
||||
if ($this.text().trim() === asterisks) {
|
||||
$this.text($this.attr('value'));
|
||||
var savedHtml = $this.data('encrypted-html');
|
||||
if (savedHtml) {
|
||||
$this.html(savedHtml);
|
||||
} else {
|
||||
$this.text($this.attr('value'));
|
||||
}
|
||||
} else {
|
||||
$this.text(asterisks);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user