From 56964a890bcefe725229ba35ce0ecf7834c8e1de Mon Sep 17 00:00:00 2001 From: Simon Latapie Date: Sat, 11 Jan 2020 08:27:57 +0100 Subject: [PATCH] caliBlur theme: fix custom column display that contain colons --- cps/static/js/caliBlur.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cps/static/js/caliBlur.js b/cps/static/js/caliBlur.js index 53f033ba..1bd5f69c 100644 --- a/cps/static/js/caliBlur.js +++ b/cps/static/js/caliBlur.js @@ -159,10 +159,12 @@ if ( $( 'body.book' ).length > 0 ) { real_custom_column = $( '.real_custom_columns' ); // $( '.real_custom_columns' ).remove(); $.each(real_custom_column, function(i, val) { - real_cc = $(this).text().split( ':' ); + var split = $(this).text().split( ':' ); + real_cc_key = split.shift(); + real_cc_value = split.join(':'); $( this ).text(""); - if (real_cc.length > 1) { - $( this ).append( '' + real_cc[0] + '' + real_cc[1] + '' ); + if (real_cc_value != "") { + $( this ).append( '' + real_cc_key + '' + real_cc_value + '' ); } }); //$( '.real_custom_columns:nth-child(3)' ).text(function() {