diff --git a/step-core/src/main/resources/com/tyndalehouse/step/core/service/jsword/impl/default.xsl b/step-core/src/main/resources/com/tyndalehouse/step/core/service/jsword/impl/default.xsl index fdc5366965..c357fee212 100644 --- a/step-core/src/main/resources/com/tyndalehouse/step/core/service/jsword/impl/default.xsl +++ b/step-core/src/main/resources/com/tyndalehouse/step/core/service/jsword/impl/default.xsl @@ -841,14 +841,32 @@ - - - + + + + + + + + + + + + - - - + + + + + + + + + + + + @@ -856,14 +874,32 @@ - - - + + + + + + + + + + + + - - - + + + + + + + + + + + + diff --git a/step-core/src/main/resources/com/tyndalehouse/step/core/service/jsword/impl/interlinear.xsl b/step-core/src/main/resources/com/tyndalehouse/step/core/service/jsword/impl/interlinear.xsl index 006d8f806d..2911768a6d 100644 --- a/step-core/src/main/resources/com/tyndalehouse/step/core/service/jsword/impl/interlinear.xsl +++ b/step-core/src/main/resources/com/tyndalehouse/step/core/service/jsword/impl/interlinear.xsl @@ -618,8 +618,9 @@ - - + + + diff --git a/step-web/src/main/webapp/js/backbone/views/view_display_passage.js b/step-web/src/main/webapp/js/backbone/views/view_display_passage.js index 165356d93b..ec5dc489e8 100644 --- a/step-web/src/main/webapp/js/backbone/views/view_display_passage.js +++ b/step-web/src/main/webapp/js/backbone/views/view_display_passage.js @@ -166,6 +166,13 @@ var PassageDisplayView = DisplayView.extend({ reference + '\')" title="Show summary information" class="select-version stepButton">' + __s.book_summary + ''); } if (!justLoadedTOS) step.util.addGrammar(); + var elmntsWithCaretChar = $("span:contains(^)"); + for (var ii = 0; ii < elmntsWithCaretChar.length; ii++ ) { + if (elmntsWithCaretChar[ii].outerText.length == 1) { + $($("span:contains(^)")[ii]).css("vertical-align", "sub"); + $($("span:contains(^)")[ii]).attr("var", "other") + } + } }, scrollToTargetLocation: function (passageContainer) { var self = this; diff --git a/step-web/src/main/webapp/js/backbone/views/view_quick_lexicon.js b/step-web/src/main/webapp/js/backbone/views/view_quick_lexicon.js index d6776d773b..a07bf37a13 100644 --- a/step-web/src/main/webapp/js/backbone/views/view_quick_lexicon.js +++ b/step-web/src/main/webapp/js/backbone/views/view_quick_lexicon.js @@ -34,9 +34,12 @@ var QuickLexicon = Backbone.View.extend({ '<% if ((item.versionCountOT != null) && (item.versionCountNT != null)) { showClickWord = true; %> (<%= sprintf(__s.stats_occurs_times_in_specific_ot_nt_bible, item.versionCountOT, item.versionCountNT, view.version) %>.) <% } %>' + '<% if ((item.versionCountOT != null) && (!showClickWord)) { showClickWord = true; %> (<%= sprintf(__s.stats_occurs_times_in_specific_bible, item.versionCountOT, view.version) %>.) <% } %>' + '<% if ((item.versionCountNT != null) && (!showClickWord)) { showClickWord = true; %> (<%= sprintf(__s.stats_occurs_times_in_specific_bible, item.versionCountNT, view.version) %>.) <% } %>' + - '<% if ((item.count != null) && (!showClickWord)) { showClickWord = true; %> (<%= sprintf(__s.stats_occurs_times_in_bible, item.count) %>.) <% } %>' + + '<% if ((item.count != null) && (!showClickWord)) { showClickWord = true; %> (<%= sprintf(__s.stats_occurs_times_in_bible, item.count) %>.)<% } %>' + '<% if (brief_morph_info[data_index] != null) { %> ' + - '  <%= brief_morph_info[data_index] %> ' + + ',  <%= brief_morph_info[data_index] %> ' + + '<% var currentVariant = view.variant[data_index]; %> ' + + '<% if ((typeof currentVariant !== "string") && (typeof view.variant[0] === "string")) currentVariant = view.variant[0]; %> ' + + '<% if ((typeof currentVariant === "string") && (currentVariant !== "")) { %> , (in <%= currentVariant %> manuscript) <% } %>' + '<% if (showClickWord) { %> - <%= __s.more_info_on_click_of_word %> <% } %>' + '' + '<% } %>' + @@ -57,6 +60,7 @@ var QuickLexicon = Backbone.View.extend({ this.type = opts.type; this.touchEvent = opts.touchEvent || false; this.passageContainer = step.util.getPassageContainer(opts.target); + this.variant = opts.variant.split(";"); if(this.passageContainer.length == 0) { this.passageContainer = step.util.getPassageContainer(opts.passageId); } diff --git a/step-web/src/main/webapp/js/backbone/views/view_sidebar.js b/step-web/src/main/webapp/js/backbone/views/view_sidebar.js index bd38459ac2..ef11727bd5 100644 --- a/step-web/src/main/webapp/js/backbone/views/view_sidebar.js +++ b/step-web/src/main/webapp/js/backbone/views/view_sidebar.js @@ -67,6 +67,8 @@ var SidebarView = Backbone.View.extend({ var allVersions = this.model.get("allVersions"); var strong = this.model.get("strong"); var morph = this.model.get("morph"); + var variant = this.model.get("variant") || ""; + variant = variant.split(";"); if (typeof allVersions !== "string") { if (typeof version === "string") allVersions = version; @@ -85,7 +87,7 @@ var SidebarView = Backbone.View.extend({ return; } callBackCreateDefParams = [ ref, allVersions ]; - callBackLoadDefFromAPIParams = [ version, ref, strong, morph, allVersions, self.createDefinition]; + callBackLoadDefFromAPIParams = [ version, ref, strong, morph, allVersions, variant, self.createDefinition]; step.util.getVocabMorphInfoFromJson(strong, morph, version, self.createDefinition, callBackCreateDefParams, self.loadDefinitionFromRestAPI, callBackLoadDefFromAPIParams); } else if (this.model.get("mode") == 'analysis') { @@ -110,14 +112,15 @@ var SidebarView = Backbone.View.extend({ var strong = parameters[2]; var morph = parameters[3]; var allVersions = parameters[4]; - var callBackCreateDef = parameters[5]; + var variant = parameters[5]; + var callBackCreateDef = parameters[6]; $.getSafe(MODULE_GET_INFO, [version, ref, strong, morph, step.userLanguageCode], function (data) { - callBackCreateDef(data, [ ref, allVersions ]); + callBackCreateDef(data, [ ref, allVersions, variant ]); //return false; }).error(function() { if (changeBaseURL()) $.getSafe(MODULE_GET_INFO, [version, ref, strong, morph, step.userLanguageCode], function (data) { - callBackCreateDef(data, [ ref, allVersions ]); + callBackCreateDef(data, [ ref, allVersions, variant ]); }) }); //return false; @@ -171,6 +174,7 @@ var SidebarView = Backbone.View.extend({ createDefinition: function (data, parameters) { var ref = parameters[0]; var allVersions = parameters[1]; + var variant = parameters[2]; var displayLexicalRelatedWords = (($(".detailLex:visible").length > 0) || (step.util.localStorageGetItem("sidebar.detailLex") === "true")); //get definition tab this.lexicon.detach(); @@ -219,7 +223,12 @@ var SidebarView = Backbone.View.extend({ if (!step.touchDevice || step.touchWideDevice) panelContentContainer.append(panelBody); this._createBriefWordPanel(panelBody, item, currentUserLang, allVersions); -// need to handle multiple morphInfo (array) + var currentVariant = variant[i]; + if ((typeof currentVariant !== "string") && (typeof variant[0] === "string")) + currentVariant = variant[0]; + if ((typeof currentVariant === "string") && (currentVariant !== "")) + panelBody.append("
in " + currentVariant + " manuscript
"); + // need to handle multiple morphInfo (array) if ((lastMorphCode != '') && (data.morphInfos.length == 0)) { data.morphInfos = cf.getTOSMorphologyInfo(lastMorphCode); } @@ -253,6 +262,8 @@ var SidebarView = Backbone.View.extend({ else { var panelBody = $('
'); this._createBriefWordPanel(panelBody, data.vocabInfos[0], currentUserLang, allVersions); + if (variant[0] !== "") + panelBody.append("
Only in " + variant[0] + " manuscript
"); // need to handle multiple morphInfo (array) if ((lastMorphCode != '') && (data.morphInfos.length == 0)) { data.morphInfos = cf.getTOSMorphologyInfo(lastMorphCode); diff --git a/step-web/src/main/webapp/js/step.util.js b/step-web/src/main/webapp/js/step.util.js index 4392774b0a..2b5f0a28ed 100644 --- a/step-web/src/main/webapp/js/step.util.js +++ b/step-web/src/main/webapp/js/step.util.js @@ -1383,8 +1383,7 @@ step.util = { * called when click on a piece of text. */ showDef: function (source, sourceVersion) { - var strong, morph, ref, version, allVersions; - + var strong, morph, ref, version, allVersions, variant; if (typeof source === "string") { strong = source; if (typeof sourceVersion === "string") @@ -1394,10 +1393,12 @@ step.util = { ref = source.ref; morph = source.morph; version = source.version; + variant = source.variant; } else { var s = $(source); strong = s.attr("strong"); morph = s.attr("morph"); + variant = s.attr("var") || ""; var verseAndVersion = step.util.ui.getVerseNumberAndVersion(s); ref = verseAndVersion[0]; if (ref !== '') @@ -1409,9 +1410,9 @@ step.util = { allVersions = firstVersion + "," + step.passages.findWhere({ passageId: step.passage.getPassageId(s) }).get("extraVersions"); } - step.util.ui.initSidebar('lexicon', { strong: strong, morph: morph, ref: ref, version: version, allVersions: allVersions }); + step.util.ui.initSidebar('lexicon', { strong: strong, morph: morph, ref: ref, variant: variant, version: version, allVersions: allVersions }); require(["sidebar"], function (module) { - step.util.ui.openStrongNumber(strong, morph, ref, version, allVersions); + step.util.ui.openStrongNumber(strong, morph, ref, version, allVersions, variant); }); }, initSidebar: function (mode, data) { @@ -1427,6 +1428,7 @@ step.util = { strong: data.strong, morph: data.morph, ref: data.ref, + variant: data.variant, version: data.version, allVersions: data.allVersions, mode: mode == null ? 'analysis' : mode @@ -1447,7 +1449,7 @@ step.util = { } }); }, - openStrongNumber: function (strong, morph, reference, version, allVersions) { + openStrongNumber: function (strong, morph, reference, version, allVersions, variant) { if (step.sidebar != null) { if (!step.touchDevice || step.touchWideDevice) step.sidebar.save({ @@ -1456,7 +1458,8 @@ step.util = { mode: 'lexicon', ref: reference, version: version, - allVersions: allVersions + allVersions: allVersions, + variant: variant }); else step.sidebar = null; @@ -1584,6 +1587,7 @@ step.util = { _displayNewQuickLexicon: function (hoverContext, passageId, touchEvent, pageYParam) { var strong = $(hoverContext).attr('strong'); var morph = $(hoverContext).attr('morph'); + var variant = $(hoverContext).attr('var') || ""; var verseAndVersion = step.util.ui.getVerseNumberAndVersion(hoverContext); var reference = verseAndVersion[0]; var version = verseAndVersion[1]; @@ -1601,7 +1605,7 @@ step.util = { if (quickLexiconEnabled == true || quickLexiconEnabled == null) { new QuickLexicon({ strong: strong, morph: morph, - version: version, reference: reference, + version: version, reference: reference, variant: variant, target: hoverContext, position: pageY, touchEvent: touchEvent, height: $(window).height(), passageId: passageId