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
This commit is contained in:
pewgeuges 2020-11-08 15:57:09 +00:00
parent 10023072f0
commit 61b10c9c6a
5 changed files with 68 additions and 45 deletions

View file

@ -122,14 +122,17 @@ class MCI_Footnotes {
// add the jQuery plugin registered by WordPress // add the jQuery plugin registered by WordPress
wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'jquery' );
// Add the jQuery UI libraries registered by WordPress: // // Add jQuery Tools:
// 'no need to enqueue -core, because dependencies are set' // wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__));
// Source: <https://wordpress.stackexchange.com/questions/273986/correct-way-to-enqueue-jquery-ui> //
wp_enqueue_script( 'jquery-ui-widget' ); // // Add the jQuery UI libraries registered by WordPress:
wp_enqueue_script( 'jquery-ui-mouse' ); // // 'no need to enqueue -core, because dependencies are set'
wp_enqueue_script( 'jquery-ui-accordion' ); // // Source: <https://wordpress.stackexchange.com/questions/273986/correct-way-to-enqueue-jquery-ui>
wp_enqueue_script( 'jquery-ui-autocomplete' ); // wp_enqueue_script( 'jquery-ui-widget' );
wp_enqueue_script( 'jquery-ui-slider' ); // 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: // Should that not work, fetch jQuery UI from cdnjs.cloudflare.com:
// Add jQuery UI following @vonpiernik: // 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_register_script( 'jQueryUI', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js', null, null, true );
wp_enqueue_script( 'jQueryUI' ); wp_enqueue_script( 'jQueryUI' );
// Add jQuery tools: // 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__)); wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__), ['jQueryUI']);
### STYLES ### STYLES
@ -150,7 +153,7 @@ class MCI_Footnotes {
'mci-footnotes-css-public', 'mci-footnotes-css-public',
plugins_url('../css/public.css', __FILE__), plugins_url('../css/public.css', __FILE__),
'', '',
'2.0.9d1' '2.0.9d2'
); );
} }

View file

@ -4,9 +4,9 @@
* Created-Date: 15.05.14 * Created-Date: 15.05.14
* Created-Time: 16:21 * Created-Time: 16:21
* Since: 1.0 * 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; color: #545f5a;
} }
/* Inline footnote referrers /*
* Inline footnote referrers
* aka superscript footnote anchors * aka superscript footnote anchors
* *
* referrer and surroundings: * referrer and surroundings:
* .footnote_referrer = enclosing <a> * .footnote_referrer = enclosing <a>
* .footnote_plugin_tooltip_text = inner <sup> * .footnote_plugin_tooltip_text = inner <sup>
*/ */
.footnote_referrer, .footnote_referrer,
.footnote_plugin_tooltip_text { .main-content .footnote_referrer,
text-decoration: none !important; .footnote_plugin_tooltip_text {
cursor: pointer; text-decoration: none !important;
z-index: 1; border-bottom: none !important;
} cursor: pointer;
.footnote_referrer:hover, z-index: 1;
}
.footnote_referrer:hover,
.footnote_plugin_tooltip_text:hover { .footnote_plugin_tooltip_text:hover {
text-decoration: underline; text-decoration: underline;
font-weight: inherit; font-weight: inherit;
} }
/* tooltip infobox */ /* tooltip infobox
*/
span.footnote_tooltip { span.footnote_tooltip {
font-size: inherit; font-size: inherit;
text-align: left; text-align: left;
@ -70,10 +73,12 @@ span.footnote_tooltip {
text-decoration: underline !important; text-decoration: underline !important;
} }
/* Footnotes reference container /*
* Footnote references container
*/ */
/* label */ /* label
*/
.footnote_container_prepare { .footnote_container_prepare {
display: block !important; display: block !important;
padding-top: 24px !important; padding-top: 24px !important;
@ -100,22 +105,21 @@ span.footnote_tooltip {
font-size: 1.5em !important; font-size: 1.5em !important;
} }
/* collapse button */ /* collapse button
/* fully clickable, not sign only */ /* fully clickable, not sign only
*/
.footnote_reference_container_collapse_button { .footnote_reference_container_collapse_button {
cursor: pointer; cursor: pointer;
font-size: 1.2em !important;
padding-left: .5em; padding-left: .5em;
font-size: 1.3em !important;
vertical-align: 2px;
} }
.footnote_container_prepare > p > span:last-child a { .footnote_container_prepare > p > span:last-child a {
text-decoration: none !important; 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 { .footnote-reference-container {
width: 100%; width: 100%;
border: none; border: none;
@ -125,7 +129,8 @@ span.footnote_tooltip {
* class footnote_plugin_link is for backcompat. * class footnote_plugin_link is for backcompat.
* Used in reference-container-body.html * Used in reference-container-body.html
* See <https://wordpress.org/support/topic/change-the-position-5/#post-13617988> * See <https://wordpress.org/support/topic/change-the-position-5/#post-13617988>
.footnote_plugin_link, */ */
.footnote_plugin_link,
.footnote_plugin_index, .footnote_plugin_index,
.footnote_plugin_text { .footnote_plugin_text {
border:none !important; 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, * Printing a table, browsers tend to avoid page breaks,
* but it takes a wrapper to avoid a page break before the table. * but it takes a wrapper to avoid a page break before the table.

View file

@ -4,7 +4,7 @@
Plugin URI: https://wordpress.org/plugins/footnotes/ 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. 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 Author: Mark Cheret
Version: 2.0.9d1 Version: 2.0.9d2
Author URI: http://cheret.de/plugins/footnotes-2/ Author URI: http://cheret.de/plugins/footnotes-2/
Text Domain: footnotes Text Domain: footnotes
Domain Path: /languages Domain Path: /languages

View file

@ -80,8 +80,14 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
== Changelog == == 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 = = 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 = = 2.0.9d0 =
- Bugfix: Layout: Footnote referrers: more efficiently disable underline unless hovered - Bugfix: Layout: Footnote referrers: more efficiently disable underline unless hovered

View file

@ -1,5 +1,5 @@
<div <div
class="footnote_container_wrapper" class="speaker-mute footnote_container_wrapper"
> >
<div <div
class="footnote_container_prepare" class="footnote_container_prepare"
@ -13,7 +13,7 @@
onclick="footnote_expand_collapse_reference_container_[[post_id]]();" onclick="footnote_expand_collapse_reference_container_[[post_id]]();"
>[<a >[<a
id="footnote_reference_container_collapse_button_[[post_id]]" id="footnote_reference_container_collapse_button_[[post_id]]"
> + </a >+</a
>]</span >]</span
></p ></p
></div ></div
@ -34,11 +34,11 @@
<script type="text/javascript"> <script type="text/javascript">
function footnote_expand_reference_container_[[post_id]]() { function footnote_expand_reference_container_[[post_id]]() {
jQuery('#footnote_references_container_[[post_id]]').show(); 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]]() { function footnote_collapse_reference_container_[[post_id]]() {
jQuery('#footnote_references_container_[[post_id]]').hide(); 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]]() { function footnote_expand_collapse_reference_container_[[post_id]]() {
if (jQuery('#footnote_references_container_[[post_id]]').is(':hidden')) { if (jQuery('#footnote_references_container_[[post_id]]').is(':hidden')) {
@ -56,5 +56,13 @@
}, },
380);/*speed*/ 380);/*speed*/
} }
} }
$( function() {
if (jQuery.ui) {
alert( "The jQuery UI framework has been properly loaded." );
}
}
function() {
alert( "There is a problem!" );
}
</script> </script>