From cf67c1afa166e75f97ad7b4d970b17fc8ba796f3 Mon Sep 17 00:00:00 2001 From: sabdelmalik Date: Sat, 30 Sep 2023 19:05:34 -0400 Subject: [PATCH] Fix font issues for Version Reference columns --- .../webapp/js/backbone/views/view_display.js | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/step-web/src/main/webapp/js/backbone/views/view_display.js b/step-web/src/main/webapp/js/backbone/views/view_display.js index cdb6d1a29d..83fa874cf6 100644 --- a/step-web/src/main/webapp/js/backbone/views/view_display.js +++ b/step-web/src/main/webapp/js/backbone/views/view_display.js @@ -90,16 +90,23 @@ var DisplayView = Backbone.View.extend({ } else if (interlinearMode.indexOf("INTERLEAVED") != -1) { step.util.ui._applyCssClassesRepeatByGroup(passageContent, ".verseGrouping", fonts, undefined, 0, '.singleVerse'); } else if (interlinearMode.indexOf("COLUMN") != -1) { + var versionRef= (options.indexOf('X') > -1); + if(versionRef) + { // cater for inserted verse references // instead of lang1 lang2 lang3 .. we have lang1 r lang2 ref lang3 ref - var newFonts = [fonts[0]]; - if(fonts.length > 1){ - for(var i=1; i < fonts.length; i++){ - newFonts.push(undefined); - newFonts.push(fonts[i]); - } - } - step.util.ui._applyCssClassesRepeatByGroup(passageContent, "tr.row", fonts, undefined, 1); + var newFonts = [fonts[0]]; + if(fonts.length > 1){ + for(var i=1; i < fonts.length; i++){ + newFonts.push(undefined); + newFonts.push(fonts[i]); + } + } + step.util.ui._applyCssClassesRepeatByGroup(passageContent, "tr.row", newFonts, undefined, 1); + } + else{ + step.util.ui._applyCssClassesRepeatByGroup(passageContent, "tr.row", fonts, undefined, 1); + } } else if(this.model.get("searchType") == 'PASSAGE') { //normal mode, so all we need to do is check the language version, and if greek or hebrew then switch the font if (fonts[0]) {