From dda37552d1951c3be0a6350eb0ffbbb9dfd90bcc Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Sun, 29 Jan 2017 22:25:52 +0100 Subject: [PATCH] More chord-table stuff.. --- openlp/core/lib/__init__.py | 5 ++-- openlp/core/lib/serviceitem.py | 2 +- openlp/plugins/remotes/html/css/chords.css | 33 ++++------------------ openlp/plugins/remotes/html/js/chords.js | 1 - 4 files changed, 9 insertions(+), 32 deletions(-) diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index c8733f942..8e29ef539 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -292,7 +292,7 @@ def clean_tags(text, remove_chords=False): """ text = text.replace('
', '\n') text = text.replace('{br}', '\n') - #text = text.replace(' ', ' ') + text = text.replace(' ', ' ') for tag in FormattingTags.get_html_tags(): text = text.replace(tag['start tag'], '') text = text.replace(tag['end tag'], '') @@ -410,7 +410,8 @@ def expand_chords(text): new_line += line new_line += '' expanded_text_lines.append(new_line) - return '{br}'.join(expanded_text_lines) + # the {br} tag used to split lines is not inserted again since the line-tables style make them redundant. + return ''.join(expanded_text_lines) def create_separated_list(string_list): diff --git a/openlp/core/lib/serviceitem.py b/openlp/core/lib/serviceitem.py index c012f6ab4..6a3f2c289 100644 --- a/openlp/core/lib/serviceitem.py +++ b/openlp/core/lib/serviceitem.py @@ -263,7 +263,7 @@ class ServiceItem(RegistryProperties): new_frame = { 'title': clean_tags(page), 'text': clean_tags(page.rstrip(), True), - 'chords_text': clean_tags(expand_chords(page.rstrip()), False), + 'chords_text': expand_chords(clean_tags(page.rstrip(), False)), 'html': html_data.replace(' ', ' '), 'verseTag': verse_tag, } diff --git a/openlp/plugins/remotes/html/css/chords.css b/openlp/plugins/remotes/html/css/chords.css index 7016122da..0454ae014 100644 --- a/openlp/plugins/remotes/html/css/chords.css +++ b/openlp/plugins/remotes/html/css/chords.css @@ -60,33 +60,7 @@ vertical-align: middle; } -.chordline { - line-height: 2.0; -} - -.chordline1 { - line-height: 1.0 -} - -.firstchordline { - line-height: 2.1em; -} - -.chordline span.chord span { - position: relative; -} - -.chordline span.chord span strong { - position: absolute; - top: -0.8em; - left: 0; - font-size: 30pt; - font-weight: normal; - line-height: normal; - color: yellow; -} - -#nextslide .chordline span.chord span strong { +#nextslide td.note { color: gray; } @@ -96,6 +70,9 @@ table.segment { float: left; } -td.note {} +td.note { + font-size: 30pt; + color: yellow; +} td.lyrics {} diff --git a/openlp/plugins/remotes/html/js/chords.js b/openlp/plugins/remotes/html/js/chords.js index 653a131e5..e4f6b0f93 100644 --- a/openlp/plugins/remotes/html/js/chords.js +++ b/openlp/plugins/remotes/html/js/chords.js @@ -265,7 +265,6 @@ window.OpenLP = { text = "

" + $("#next-text").val() + ": " + OpenLP.nextSong + "

"; $("#nextslide").html(text); } - if(!OpenLP.showchords) $(".chordline").toggleClass('chordline1'); }, updateClock: function(data) { var div = $("#clock");