From 61b10c9c6a2d2962b91d62fc645d72b60700b24c Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Sun, 8 Nov 2020 15:57:09 +0000 Subject: [PATCH] Development version 2.0.9d2 in response to user on forum, to meet user requirement git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2414776 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- class/init.php | 27 ++++++----- css/public.css | 58 +++++++++++++---------- footnotes.php | 2 +- readme.txt | 8 +++- templates/public/reference-container.html | 18 +++++-- 5 files changed, 68 insertions(+), 45 deletions(-) diff --git a/class/init.php b/class/init.php index 427c680..48d7765 100644 --- a/class/init.php +++ b/class/init.php @@ -122,14 +122,17 @@ class MCI_Footnotes { // add the jQuery plugin registered by WordPress wp_enqueue_script( 'jquery' ); - // Add the jQuery UI libraries registered by WordPress: - // 'no need to enqueue -core, because dependencies are set' - // Source: - wp_enqueue_script( 'jquery-ui-widget' ); - wp_enqueue_script( 'jquery-ui-mouse' ); - wp_enqueue_script( 'jquery-ui-accordion' ); - wp_enqueue_script( 'jquery-ui-autocomplete' ); - wp_enqueue_script( 'jquery-ui-slider' ); +// // Add jQuery Tools: +// wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__)); +// +// // Add the jQuery UI libraries registered by WordPress: +// // 'no need to enqueue -core, because dependencies are set' +// // Source: +// wp_enqueue_script( 'jquery-ui-widget' ); +// wp_enqueue_script( 'jquery-ui-mouse' ); +// wp_enqueue_script( 'jquery-ui-accordion' ); +// wp_enqueue_script( 'jquery-ui-autocomplete' ); +// wp_enqueue_script( 'jquery-ui-slider' ); // Should that not work, fetch jQuery UI from cdnjs.cloudflare.com: // Add jQuery UI following @vonpiernik: @@ -139,9 +142,9 @@ class MCI_Footnotes { wp_register_script( 'jQueryUI', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js', null, null, true ); wp_enqueue_script( 'jQueryUI' ); - // Add jQuery tools: - wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__)); - + // Add jQuery Tools and finish adding jQueryUI: 2020-11-08T1638+0100 + wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__), ['jQueryUI']); + ### STYLES @@ -150,7 +153,7 @@ class MCI_Footnotes { 'mci-footnotes-css-public', plugins_url('../css/public.css', __FILE__), '', - '2.0.9d1' + '2.0.9d2' ); } diff --git a/css/public.css b/css/public.css index b297bae..0551302 100755 --- a/css/public.css +++ b/css/public.css @@ -4,9 +4,9 @@ * Created-Date: 15.05.14 * Created-Time: 16:21 * Since: 1.0 - * Version: 2.0.9d1 + * Version: 2.0.9d2 * - * Last modified: 2020-11-07T1608+0100 + * Last modified: 2020-11-08T1627+0100 */ @@ -31,28 +31,31 @@ color: #545f5a; } -/* Inline footnote referrers +/* + * Inline footnote referrers * aka superscript footnote anchors * * referrer and surroundings: - * .footnote_referrer = enclosing - * .footnote_plugin_tooltip_text = inner + * .footnote_referrer = enclosing + * .footnote_plugin_tooltip_text = inner */ -.footnote_referrer, -.footnote_plugin_tooltip_text { - text-decoration: none !important; - cursor: pointer; - z-index: 1; -} -.footnote_referrer:hover, + .footnote_referrer, + .main-content .footnote_referrer, + .footnote_plugin_tooltip_text { + text-decoration: none !important; + border-bottom: none !important; + cursor: pointer; + z-index: 1; + } + .footnote_referrer:hover, .footnote_plugin_tooltip_text:hover { text-decoration: underline; font-weight: inherit; } -/* tooltip infobox */ - +/* tooltip infobox + */ span.footnote_tooltip { font-size: inherit; text-align: left; @@ -70,10 +73,12 @@ span.footnote_tooltip { text-decoration: underline !important; } -/* Footnotes reference container +/* + * Footnote references container */ -/* label */ +/* label + */ .footnote_container_prepare { display: block !important; padding-top: 24px !important; @@ -100,22 +105,21 @@ span.footnote_tooltip { font-size: 1.5em !important; } -/* collapse button */ -/* fully clickable, not sign only */ +/* collapse button +/* fully clickable, not sign only + */ .footnote_reference_container_collapse_button { cursor: pointer; - font-size: 1.2em !important; padding-left: .5em; + font-size: 1.3em !important; + vertical-align: 2px; } .footnote_container_prepare > p > span:last-child a { text-decoration: none !important; } -.footnote_container_prepare > p > span:last-child a:hover { - text-decoration: underline !important; - color: #008800; -} -/* Table starts here */ +/* table + */ .footnote-reference-container { width: 100%; border: none; @@ -125,7 +129,8 @@ span.footnote_tooltip { * class footnote_plugin_link is for backcompat. * Used in reference-container-body.html * See -.footnote_plugin_link, */ + */ +.footnote_plugin_link, .footnote_plugin_index, .footnote_plugin_text { border:none !important; @@ -166,7 +171,8 @@ span.footnote_tooltip { } } -/* Footnotes printing style rules +/* + * Footnotes printing style rules * * Printing a table, browsers tend to avoid page breaks, * but it takes a wrapper to avoid a page break before the table. diff --git a/footnotes.php b/footnotes.php index d8c59de..e4b4816 100755 --- a/footnotes.php +++ b/footnotes.php @@ -4,7 +4,7 @@ Plugin URI: https://wordpress.org/plugins/footnotes/ Description: time to bring footnotes to your website! footnotes are known from offline publishing and everybody takes them for granted when reading a magazine. Author: Mark Cheret - Version: 2.0.9d1 + Version: 2.0.9d2 Author URI: http://cheret.de/plugins/footnotes-2/ Text Domain: footnotes Domain Path: /languages diff --git a/readme.txt b/readme.txt index e64ca30..32800fa 100755 --- a/readme.txt +++ b/readme.txt @@ -80,8 +80,14 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** == Changelog == += 2.0.9d2 = +- Bugfix: Layout: Footnote referrers: disabled bottom border 2020-11-08T1632+0100 +- Bugfix: Libraries: Correct jQuery UI from third party, disabled from WordPress 2020-11-08T1641+0100 +- Update: Accessibility: added 'speaker-mute' class to reference container + = 2.0.9d1 = -- Bugfix: Re-added jQuery UI from third party to look whether it can fix a broken tooltip display 2020-11-07T1604+0100 +- Bugfix: Libraries: Re-added jQuery UI from third party to look whether it can fix a broken tooltip display 2020-11-07T1604+0100 +- Bugfix: Settings layout: removed 80% width rule for input, text areas, select boxes = 2.0.9d0 = - Bugfix: Layout: Footnote referrers: more efficiently disable underline unless hovered diff --git a/templates/public/reference-container.html b/templates/public/reference-container.html index 75f2017..8f68f00 100644 --- a/templates/public/reference-container.html +++ b/templates/public/reference-container.html @@ -1,5 +1,5 @@
function footnote_expand_reference_container_[[post_id]]() { jQuery('#footnote_references_container_[[post_id]]').show(); - jQuery('#footnote_reference_container_collapse_button_[[post_id]]').text(' − '); + jQuery('#footnote_reference_container_collapse_button_[[post_id]]').text('−'); } function footnote_collapse_reference_container_[[post_id]]() { jQuery('#footnote_references_container_[[post_id]]').hide(); - jQuery('#footnote_reference_container_collapse_button_[[post_id]]').text(' + '); + jQuery('#footnote_reference_container_collapse_button_[[post_id]]').text('+'); } function footnote_expand_collapse_reference_container_[[post_id]]() { if (jQuery('#footnote_references_container_[[post_id]]').is(':hidden')) { @@ -56,5 +56,13 @@ }, 380);/*speed*/ } - } + } + $( function() { + if (jQuery.ui) { + alert( "The jQuery UI framework has been properly loaded." ); + } + } + function() { + alert( "There is a problem!" ); + }