From 4acfa80e7bdd283c3ff27b1c007105458bcdcbd0 Mon Sep 17 00:00:00 2001 From: SenorSmartyPants Date: Mon, 23 Nov 2020 16:13:14 -0600 Subject: [PATCH 01/40] Sort by books_authors_link.id --- lib/Author.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Author.php b/lib/Author.php index 85e2860ec..f378ebc85 100644 --- a/lib/Author.php +++ b/lib/Author.php @@ -83,7 +83,7 @@ public static function getAuthorById ($authorId) { public static function getAuthorByBookId ($bookId) { $result = parent::getDb ()->prepare('select authors.id as id, authors.name as name, authors.sort as sort from authors, books_authors_link where author = authors.id -and book = ?'); +and book = ? order by books_authors_link.id'); $result->execute (array ($bookId)); $authorArray = array (); while ($post = $result->fetchObject ()) { From ad64750f8983cb0cecd0688334678d736b7fd455 Mon Sep 17 00:00:00 2001 From: SenorSmartyPants Date: Tue, 24 Nov 2020 15:14:09 -0600 Subject: [PATCH 02/40] Just convert book comment to xhtml Not all html elements are detected by the preg_match. These comments then displayed with HTML elements visible. --- lib/Book.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/Book.php b/lib/Book.php index f8d18f40c..e96b7f228 100644 --- a/lib/Book.php +++ b/lib/Book.php @@ -314,14 +314,7 @@ public function getComment($withSerie = true) { if (!is_null ($se) && $withSerie) { $addition = $addition . '' . localize('content.series') . '' . str_format(localize('content.series.data'), $this->seriesIndex, htmlspecialchars($se->name)) . "
\n"; } - if (preg_match('/<\/(div|p|a|span)>/', $this->comment)) - { - return $addition . html2xhtml($this->comment); - } - else - { - return $addition . htmlspecialchars($this->comment); - } + return $addition . html2xhtml($this->comment); } public function getDataFormat($format) { From 2b015cd3a08facf0628d08b68db6700812ce7d33 Mon Sep 17 00:00:00 2001 From: SenorSmartyPants Date: Sun, 29 Nov 2020 18:44:22 -0600 Subject: [PATCH 03/40] Copy bootstrap dir to bootstrap2 --- templates/bootstrap2/bookdetail.html | 76 +++++++++ templates/bootstrap2/file.html | 150 ++++++++++++++++++ templates/bootstrap2/footer.html | 0 templates/bootstrap2/header.html | 29 ++++ templates/bootstrap2/main.html | 73 +++++++++ templates/bootstrap2/page.html | 3 + templates/bootstrap2/scripts/cops.js | 4 + templates/bootstrap2/styles/style-base.css | 3 + templates/bootstrap2/styles/style-default.css | 3 + templates/bootstrap2/suggestion.html | 1 + 10 files changed, 342 insertions(+) create mode 100644 templates/bootstrap2/bookdetail.html create mode 100644 templates/bootstrap2/file.html create mode 100644 templates/bootstrap2/footer.html create mode 100644 templates/bootstrap2/header.html create mode 100644 templates/bootstrap2/main.html create mode 100644 templates/bootstrap2/page.html create mode 100644 templates/bootstrap2/scripts/cops.js create mode 100644 templates/bootstrap2/styles/style-base.css create mode 100644 templates/bootstrap2/styles/style-default.css create mode 100644 templates/bootstrap2/suggestion.html diff --git a/templates/bootstrap2/bookdetail.html b/templates/bootstrap2/bookdetail.html new file mode 100644 index 000000000..09040e4b2 --- /dev/null +++ b/templates/bootstrap2/bookdetail.html @@ -0,0 +1,76 @@ +
+
+ {{? it.book.hasCover == 1}} + + {{=it.c.i18n.coverAlt}} + + {{?}} +
+
+

+ {{=htmlspecialchars (it.title)}} +

+

{{=it.c.i18n.authorsTitle}}: + {{~it.book.authors:author:i}} + {{? i > 0}}, {{?}}{{=htmlspecialchars (author.name)}} + {{~}} +

+ {{? it.book.tagsName != ""}} +

{{=it.c.i18n.tagsTitle}}: + {{~it.book.tags:tag:i}} + {{? i > 0}}, {{?}}{{=htmlspecialchars (tag.name)}} + {{~}} +

+ {{?}} + {{? it.book.seriesName != ""}} +

{{=it.c.i18n.seriesTitle}} : {{=htmlspecialchars (it.book.seriesCompleteName)}}

+ {{?}} +
+
+
+ {{~it.book.datas:data:i}} + {{=data.format}} + + {{? data.mail == 1}} + + + {{?}} + {{? data.readerUrl != ""}} + + + {{?}} +
+ {{~}} +
+
+
+ +
+
+ {{? it.book.publisherName != ""}} +

+

{{=it.c.i18n.publisherName}}:

{{=htmlspecialchars (it.book.publisherName)}} +

+ {{?}} + {{? it.book.pubDate != ""}} +

+

{{=it.c.i18n.pubdateTitle}}:

{{=it.book.pubDate}} +

+ {{?}} + {{? it.book.languagesName != ""}} +

+

{{=it.c.i18n.languagesTitle}}:

{{=it.book.languagesName}} +

+ {{?}} + {{~it.book.customcolumns_preview :column:column_index}} +

+

{{=column.customColumnType.columnTitle}}:

{{=column.htmlvalue}} +

+ {{~}} + {{? it.book.content != ""}} +
+

{{=it.c.i18n.contentTitle}}

+
{{=it.book.content}}
+ {{?}} +
+
diff --git a/templates/bootstrap2/file.html b/templates/bootstrap2/file.html new file mode 100644 index 000000000..f5fd68e69 --- /dev/null +++ b/templates/bootstrap2/file.html @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + {{=it.title}} + + + + +{{? it.server_side_rendering == 0}} + + + + + +{{?}} + + + + + + + + + + + + + + + + +{{? it.server_side_rendering == 0}} + +{{?}} + diff --git a/templates/bootstrap2/footer.html b/templates/bootstrap2/footer.html new file mode 100644 index 000000000..e69de29bb diff --git a/templates/bootstrap2/header.html b/templates/bootstrap2/header.html new file mode 100644 index 000000000..31348e8fb --- /dev/null +++ b/templates/bootstrap2/header.html @@ -0,0 +1,29 @@ + diff --git a/templates/bootstrap2/main.html b/templates/bootstrap2/main.html new file mode 100644 index 000000000..d9c4091ea --- /dev/null +++ b/templates/bootstrap2/main.html @@ -0,0 +1,73 @@ +
+{{? it.page == 13 || it.page == 16}} + {{? it.page == 13}} + {{#def.bookdetail}} + {{??}} + {{= it.fullhtml}} + {{?}} +{{??}} +
+
    +
+
+
+{{~it.entries:entry:i}} + {{? it.containsBook == 0}} +
+
+ +
+ {{=entry.number}} +
+
+
+ {{??}} +
+
+ +
+
+ {{? entry.book.hasCover == 1}} + + {{=it.c.i18n.coverAlt}} + + {{?}} +
+
{{=htmlspecialchars (entry.book.authorsName)}}
+ {{? entry.book.tagsName != ""}}
{{=htmlspecialchars (entry.book.tagsName)}}
{{?}} + {{? entry.book.seriesName != ""}}
{{=htmlspecialchars (entry.book.seriesName)}} ({{=entry.book.seriesIndex}})
{{?}} + {{~entry.book.customcolumns_list :column:column_index}} +
{{=column.customColumnType.columnTitle}} : {{=column.htmlvalue}}
+ {{~}} + {{~entry.book.preferedData:data:j}} +
+ {{~}} +
+ {{~entry.book.preferedData:data:j}} +

+ {{=data.name}} + +

+ {{~}} +
+
+
+
+ {{?}} +{{~}} +
+{{?}} +{{? it.isPaginated == 1}} + +{{?}} +
diff --git a/templates/bootstrap2/page.html b/templates/bootstrap2/page.html new file mode 100644 index 000000000..88139c888 --- /dev/null +++ b/templates/bootstrap2/page.html @@ -0,0 +1,3 @@ +{{#def.header}} +{{#def.main}} +{{#def.footer}} diff --git a/templates/bootstrap2/scripts/cops.js b/templates/bootstrap2/scripts/cops.js new file mode 100644 index 000000000..3383895c0 --- /dev/null +++ b/templates/bootstrap2/scripts/cops.js @@ -0,0 +1,4 @@ +function postRefresh() +{ + $('[data-toggle="tooltip"]').tooltip(); +} \ No newline at end of file diff --git a/templates/bootstrap2/styles/style-base.css b/templates/bootstrap2/styles/style-base.css new file mode 100644 index 000000000..4823668e1 --- /dev/null +++ b/templates/bootstrap2/styles/style-base.css @@ -0,0 +1,3 @@ +.panel-body { padding: 5px; } + +.bottomright {position:absolute; bottom:0; margin-bottom:25px; right: 20px;} \ No newline at end of file diff --git a/templates/bootstrap2/styles/style-default.css b/templates/bootstrap2/styles/style-default.css new file mode 100644 index 000000000..4823668e1 --- /dev/null +++ b/templates/bootstrap2/styles/style-default.css @@ -0,0 +1,3 @@ +.panel-body { padding: 5px; } + +.bottomright {position:absolute; bottom:0; margin-bottom:25px; right: 20px;} \ No newline at end of file diff --git a/templates/bootstrap2/suggestion.html b/templates/bootstrap2/suggestion.html new file mode 100644 index 000000000..1107dadee --- /dev/null +++ b/templates/bootstrap2/suggestion.html @@ -0,0 +1 @@ +

{{=it.title}}

\ No newline at end of file From 0e2436e8ab97dcf4f34e5e52e819d19153a72368 Mon Sep 17 00:00:00 2001 From: SenorSmartyPants Date: Sun, 29 Nov 2020 20:24:46 -0600 Subject: [PATCH 04/40] Add missing typeahead style Makes typeahead inputs look like bootstrap3 Reference typeahead css --- templates/bootstrap2/file.html | 1 + templates/bootstrap2/styles/typeahead.css | 200 ++++++++++++++++++++++ 2 files changed, 201 insertions(+) create mode 100644 templates/bootstrap2/styles/typeahead.css diff --git a/templates/bootstrap2/file.html b/templates/bootstrap2/file.html index f5fd68e69..4dbd69290 100644 --- a/templates/bootstrap2/file.html +++ b/templates/bootstrap2/file.html @@ -139,6 +139,7 @@ } + {{? it.server_side_rendering == 0}} diff --git a/templates/bootstrap2/header.html b/templates/bootstrap2/header.html index 1771e9a6e..02ae10204 100644 --- a/templates/bootstrap2/header.html +++ b/templates/bootstrap2/header.html @@ -1,5 +1,5 @@ -