Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Private/New-TablePercentageBarInternal.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
)

if ($ConditionalFormatting) {
$JsonConditions = $ConditionalFormatting | ConvertTo-Json
$JsonConditions = $ConditionalFormatting | ConvertTo-Json -Compress
[ordered]@{
targets = $ColumnID
render = "`$.fn.dataTable.render.percentBar('$Type','$TextColor', '$BorderColor', '$BarColor', '$BackgroundColor', $RoundValue, '$BorderStyle', $JsonConditions)"
Expand All @@ -70,4 +70,4 @@
render = "`$.fn.dataTable.render.percentBar('$Type','$TextColor', '$BorderColor', '$BarColor', '$BackgroundColor', $RoundValue, '$BorderStyle')"
}
}
}
}
7 changes: 6 additions & 1 deletion Public/New-HTMLTable.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,12 @@
# Before: "display": "$.fn.dataTable.Responsive.display.childRowImmediate"
# After: "display": $.fn.dataTable.Responsive.display.childRowImmediate
$Options = $Options -replace '"(\$\.fn\.dataTable\.Responsive\.display\.childRowImmediate)"', '$1'
$Options = $Options -replace '"(\$\.fn\.dataTable\.render\.percentBar\(.+\))"', '$1'
# $Options = $Options -replace '"(\$\.fn\.dataTable\.render\.percentBar\(.+\))"', '$1'
$Options = [regex]::Replace(
$Options,
'(?s)"(\$\.fn\.dataTable\.render\.percentBar\(.+?\))"',
{ param($m) ($m.Groups[1].Value -replace '\\\"', '"' -replace '\\u0027', "'" ) }
)
# we need to cleanup $Options for columnDefs/render, remove \r\n
#$Options = $Options -replace '\\r\\n', '\r\n' #-replace "\\`"",'"'

Expand Down
Loading