From 1aabebf7a95baf84f0c1eb2742b5b3714e46217b Mon Sep 17 00:00:00 2001
From: JohnSmith_LT
Date: Sun, 17 Nov 2019 16:52:04 +0000
Subject: [PATCH] First attempt at making the bullets page more useful in
relation to issues #313, #40 and #211
---
.../Nottingham/models_html5/bullets.html | 72 +++++++++++--------
1 file changed, 44 insertions(+), 28 deletions(-)
diff --git a/modules/xerte/parent_templates/Nottingham/models_html5/bullets.html b/modules/xerte/parent_templates/Nottingham/models_html5/bullets.html
index 035a90997c..9af02785a4 100644
--- a/modules/xerte/parent_templates/Nottingham/models_html5/bullets.html
+++ b/modules/xerte/parent_templates/Nottingham/models_html5/bullets.html
@@ -25,9 +25,11 @@
// function called every time the page is viewed after it has initially loaded
this.pageChanged = function() {
$(".bullet").hide();
+
if (x_currentPageXML.getAttribute("delaySecs") == "0" || x_currentPageXML.getAttribute("delaySecs") == undefined ) {
$(".bullet").fadeIn();
- } else {
+ }
+ else {
$(".bullet:eq(0)").show();
bullets.timer();
}
@@ -70,40 +72,54 @@
startTag = '',
endTag = "
";
- if (text.indexOf("") >= 0)
- {
- // Assume enclosed in
- // First get rid of
- var textwithout = text.replace(/
/g, "");
- // Then split on
- bulletArray = textwithout.split("
");
- }
- else
- {
- bulletArray = text.split("
")
+ if (text.indexOf("") >= 0 || text.indexOf("") >= 0) { // created by new editor and containing 1 or multiple lists
+ // We are not going to mess with this too much, just add 'bullet' class to all tags and to any blocks that don't contain bullets
+ $("#holder").hide().append(text);
+
+ $("#holder").find("li, p").addClass("bullet");
+
+ $("#holder").show();
}
- if (x_currentPageXML.getAttribute("showBullets") != 0) {
- contentsStr += "