Skip to content

Commit aa68547

Browse files
authored
Merge pull request #294 from jenkinsci/html-num
[JENKINS-68823] - Add support for numbers that use HTML tags in the data
2 parents dc8bdb9 + 54c12b7 commit aa68547

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/main/java/io/jenkins/plugins/datatables/TableColumn.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,9 @@ public ColumnBuilder withType(final ColumnType columnType) {
207207
this.type = columnType;
208208
switch (columnType) {
209209
case NUMBER:
210+
case HTML_NUMBER:
210211
case FORMATTED_NUMBER:
212+
case FORMATTED_HTML_NUMBER:
211213
withHeaderClass(ColumnCss.NUMBER);
212214
break;
213215
default:
@@ -347,12 +349,22 @@ public enum ColumnType {
347349
DATE("date"),
348350
/** Numbers will be shown right aligned, and use a simple number sorting. */
349351
NUMBER("num"),
352+
/**
353+
* Numbers will be shown right aligned, and use a simple number sorting. May contain HTML tags also in the data.
354+
*/
355+
HTML_NUMBER("html-num"),
350356
/**
351357
* Formatted numbers will be shown right aligned, and use numeric sorting of formatted numbers. Numbers which
352358
* are formatted with thousands separators, currency symbols or a percentage indicator will be sorted
353359
* numerically automatically by DataTables.
354360
*/
355361
FORMATTED_NUMBER("num-fmt"),
362+
/**
363+
* Formatted numbers will be shown right aligned, and use numeric sorting of formatted numbers. Numbers which
364+
* are formatted with thousands separators, currency symbols or a percentage indicator will be sorted
365+
* numerically automatically by DataTables. May contain HTML tags also in the data.
366+
*/
367+
FORMATTED_HTML_NUMBER("html-num-fmt"),
356368
/**
357369
* Fall back type if the data in the column does not match the requirements for the other data types (above).
358370
*/

0 commit comments

Comments
 (0)