From ece11de942d7e93f52f00992fcaf5706b9d10820 Mon Sep 17 00:00:00 2001 From: hexeth <7627137+hexeth@users.noreply.github.com> Date: Fri, 4 Jan 2019 11:39:11 -0800 Subject: [PATCH] Fix publisher not formatting correct (#747) --- cps/static/js/caliBlur.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cps/static/js/caliBlur.js b/cps/static/js/caliBlur.js index fb4c930b..4cf54493 100644 --- a/cps/static/js/caliBlur.js +++ b/cps/static/js/caliBlur.js @@ -215,11 +215,15 @@ if ( $( 'body.book' ).length > 0 ) { .prepend( '
' ); // Fix-up book detail headings - publisher = $( '.publishers p span' ).text().split( ': ' ); +publisher = $( '.publishers p span' ).text().split( ':' ); $( '.publishers p span' ).remove(); $.each(publisher, function(i, val) { $( '.publishers' ).append( '' + publisher[i] + '' ); }); +$( '.publishers span:nth-child(2)' ).text(function() { +return $(this).text().replace(/^\s+/g, ""); +}); + published = $( '.book-meta p:contains("Publishing date")' ) .text().split(': '); $( '.book-meta p:contains("Publishing date")' )