diff --git a/app/controller/window/text/TextFacsimileSplitView.js b/app/controller/window/text/TextFacsimileSplitView.js index e05b08aae..0abb40b41 100644 --- a/app/controller/window/text/TextFacsimileSplitView.js +++ b/app/controller/window/text/TextFacsimileSplitView.js @@ -145,7 +145,7 @@ Ext.define('EdiromOnline.controller.window.text.TextFacsimileSplitView', { onAnnotationsVisibilityChange: function(view, visible) { var me = this; - if(visible) + if(visible && view.getActivePage() !== null) window.doAJAXRequest('data/xql/getAnnotationsInText.xql', 'GET', { diff --git a/app/view/window/text/TextFacsimileSplitView.js b/app/view/window/text/TextFacsimileSplitView.js index dd6497d47..52c8d0387 100644 --- a/app/view/window/text/TextFacsimileSplitView.js +++ b/app/view/window/text/TextFacsimileSplitView.js @@ -259,7 +259,9 @@ Ext.define('EdiromOnline.view.window.text.TextFacsimileSplitView', { var me = this; var annos = Ext.query('#' + me.id + '_textCont span.annotation'); Ext.Array.each(annos, function(anno) { - Ext.get(anno).hide(); + var a = Ext.get(anno); + a.setVisibilityMode(Ext.Element.DISPLAY); + a.hide(); }); }, @@ -411,7 +413,7 @@ Ext.define('EdiromOnline.view.window.text.TextFacsimileSplitView', { getActivePage: function() { var me = this; - return me.activePage.get('id'); + return (typeof me.activePage !== 'undefined' && me.activePage !== null?me.activePage.get('id'):null); }, setChapters: function (chapters) { diff --git a/app/view/window/text/TextView.js b/app/view/window/text/TextView.js index 08c6a5364..4268d8267 100644 --- a/app/view/window/text/TextView.js +++ b/app/view/window/text/TextView.js @@ -120,7 +120,7 @@ Ext.define('EdiromOnline.view.window.text.TextView', { var me = this; if(me.annotationsLoaded) { - var annos = Ext.query('#' + me.id + '_textCont span.annotation'); + var annos = Ext.query('#' + me.id + '_textCont div.annotation'); Ext.Array.each(annos, function(anno) { Ext.get(anno).show(); }); @@ -130,8 +130,7 @@ Ext.define('EdiromOnline.view.window.text.TextView', { me.annotationsLoaded = true; - var tpl = Ext.DomHelper.createTemplate(''); - + var tpl = Ext.DomHelper.createTemplate('
'); tpl.compile(); annotations.each(function(annotation) { @@ -221,9 +220,11 @@ Ext.define('EdiromOnline.view.window.text.TextView', { hideAnnotations: function() { var me = this; - var annos = Ext.query('#' + me.id + '_textCont span.annotation'); + var annos = Ext.query('#' + me.id + '_textCont div.annotation'); Ext.Array.each(annos, function(anno) { - Ext.get(anno).hide(); + var a = Ext.get(anno); + a.setVisibilityMode(Ext.Element.DISPLAY); + a.hide(); }); }, @@ -243,6 +244,7 @@ Ext.define('EdiromOnline.view.window.text.TextView', { me.annotMenu = Ext.create('Ext.button.Button', { text: getLangString('view.window.text.TextView_annotMenu'), indent: false, + cls: 'menuButton', menu : { items: [ me.toggleAnnotationVisibility diff --git a/packages/eoTheme/sass/etc/freidi-textView.scss b/packages/eoTheme/sass/etc/freidi-textView.scss index cd099ff76..2a795056a 100644 --- a/packages/eoTheme/sass/etc/freidi-textView.scss +++ b/packages/eoTheme/sass/etc/freidi-textView.scss @@ -448,8 +448,6 @@ $underlineColor: #333333; } } } - - span.note {display: none;} i.inline-comment { position: relative; diff --git a/resources/css/todo.css b/resources/css/todo.css index b94fb4654..d4a9cd932 100644 --- a/resources/css/todo.css +++ b/resources/css/todo.css @@ -36,6 +36,18 @@ body { margin-right: 2em; } +.textViewContent span.note::before { + content: none; +} + +.textViewContent span.note::after { + content: none; +} + +.textViewContent span.note div.annotation { + display: inline-block; +} + #ediromToolbar .x-btn.insetButton.x-btn-default-toolbar-small { background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #dddddd), color-stop(30%, #c3c3c3), color-stop(65%, #b8b8b8), color-stop(100%, #a0a0a0)); background-image: -webkit-linear-gradient(top, #dddddd, #c3c3c3 30%, #b8b8b8 65%, #a0a0a0); @@ -93,7 +105,7 @@ span.musicalSymbol { .ediromWindow .annotation { z-index: 10; - display: flex !important; + display: flex; justify-content: center; align-items: center; flex-wrap: wrap;