- Bugfix: Styling of the reference container when the footnote text was too long (thanks to Willem Braak, ???)

- Bugfix: Added a Link to the footnote text in the reference container back to the footnote index in the page content (thanks to Willem Braak, ???)

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@931384 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
Aricura 2014-06-12 19:12:14 +00:00
parent 2ff59067ec
commit 4461aaaf27
5 changed files with 25 additions and 28 deletions

View file

@ -57,13 +57,8 @@ class Class_FootnotesSettings
/* loads and filters the settings for this plugin */ /* loads and filters the settings for this plugin */
$this->a_arr_Options = footnotes_filter_options(FOOTNOTE_SETTINGS_CONTAINER, self::$a_arr_Default_Settings, true); $this->a_arr_Options = footnotes_filter_options(FOOTNOTE_SETTINGS_CONTAINER, self::$a_arr_Default_Settings, true);
/* register public stylesheet */
wp_register_style('footnote_public_style', plugins_url('../css/footnote.css', __FILE__));
/* add public stylesheet */
wp_enqueue_style('footnote_public_style');
/* execute class includes on action-even: init, admin_init and admin_menu */ /* execute class includes on action-even: init, admin_init and admin_menu */
//add_action('init', array($this, 'LoadScriptsAndStylesheets')); add_action('init', array($this, 'LoadScriptsAndStylesheets'));
add_action('admin_init', array($this, 'RegisterSettings')); add_action('admin_init', array($this, 'RegisterSettings'));
add_action('admin_init', array($this, 'RegisterTab_General')); add_action('admin_init', array($this, 'RegisterTab_General'));
@ -79,18 +74,10 @@ class Class_FootnotesSettings
*/ */
function LoadScriptsAndStylesheets() function LoadScriptsAndStylesheets()
{ {
/* add the jQuery plugin (already registered by WP) */ /* register public stylesheet */
wp_enqueue_script('jquery'); wp_register_style('footnote_public_style', plugins_url('../css/footnote.css', __FILE__));
/* register public stylesheet */ /* add public stylesheet */
//wp_register_style('footnote_public_style', plugins_url('../css/footnote.css', __FILE__)); wp_enqueue_style('footnote_public_style');
/* add public stylesheet */
//wp_enqueue_style('footnote_public_style');
/* register settings stylesheet */
wp_register_style('footnote_settings_style', plugins_url('../css/settings.css', __FILE__));
/* add settings stylesheet */
wp_enqueue_style('footnote_settings_style');
/* Needed to allow metabox layout and close functionality */
wp_enqueue_script('postbox');
} }
/** /**
@ -131,7 +118,14 @@ class Class_FootnotesSettings
*/ */
function OutputSettingsPage() function OutputSettingsPage()
{ {
$this->LoadScriptsAndStylesheets(); /* add the jQuery plugin (already registered by WP) */
wp_enqueue_script('jquery');
/* register settings stylesheet */
wp_register_style('footnote_settings_style', plugins_url('../css/settings.css', __FILE__));
/* add settings stylesheet */
wp_enqueue_style('footnote_settings_style');
/* Needed to allow metabox layout and close functionality */
wp_enqueue_script('postbox');
/* gets active tag, or if nothing set the "general" tab will be set to active */ /* gets active tag, or if nothing set the "general" tab will be set to active */
$l_str_tab = isset($_GET['tab']) ? $_GET['tab'] : FOOTNOTE_SETTINGS_LABEL_GENERAL; $l_str_tab = isset($_GET['tab']) ? $_GET['tab'] : FOOTNOTE_SETTINGS_LABEL_GENERAL;
/* outputs all tabs */ /* outputs all tabs */

View file

@ -70,16 +70,18 @@
/* footnote (bottom) index */ /* footnote (bottom) index */
.footnote_plugin_index { .footnote_plugin_index {
float: left !important; /*float: left !important;*/
min-width: 40px !important; min-width: 40px !important;
white-space: nowrap !important; white-space: nowrap !important;
text-align: right !important; text-align: right !important;
display: inline-block;
} }
/* footnote (bottom) text */ /* footnote (bottom) text */
.footnote_plugin_text { .footnote_plugin_text {
float: left !important; /*float: left !important;*/
padding-left: 16px !important; padding-left: 16px !important;
display: inline-block;
} }
/* footnote (bottom) link to the footnote implementation */ /* footnote (bottom) link to the footnote implementation */
@ -96,12 +98,12 @@
/* footnote (bottom) styling end tag */ /* footnote (bottom) styling end tag */
.footnote_plugin_end { .footnote_plugin_end {
clear: left !important; /*clear: left !important;*/
} }
/* tooltip */ /* tooltip */
.footnote_plugin_tooltip { .footnote_plugin_tooltip, .footnote_plugin_tooltip a {
outline: none !important; /*outline: none !important;*/
/*color: #4777ff !important;*/ /*color: #4777ff !important;*/
text-decoration: none !important; text-decoration: none !important;
cursor: pointer !important; cursor: pointer !important;

View file

@ -361,7 +361,7 @@ function footnotes_OutputReferenceContainer()
/* get all footnotes that I haven't passed yet */ /* get all footnotes that I haven't passed yet */
for ($l_str_CheckIndex = $l_str_FirstFootnoteIndex; $l_str_CheckIndex < count($g_arr_Footnotes); $l_str_CheckIndex++) { for ($l_str_CheckIndex = $l_str_FirstFootnoteIndex; $l_str_CheckIndex < count($g_arr_Footnotes); $l_str_CheckIndex++) {
/* check if a further footnote is the same as the actual one */ /* check if a further footnote is the same as the actual one */
if ($l_str_FootnoteText == $g_arr_Footnotes[$l_str_CheckIndex]) { if ($l_str_FootnoteText == $g_arr_Footnotes[$l_str_CheckIndex] && !empty($g_arr_Footnotes[$l_str_CheckIndex])) {
/* set the further footnote as empty so it won't be displayed later */ /* set the further footnote as empty so it won't be displayed later */
$g_arr_Footnotes[$l_str_CheckIndex] = ""; $g_arr_Footnotes[$l_str_CheckIndex] = "";
/* add the footnote index to the actual index */ /* add the footnote index to the actual index */

View file

@ -66,6 +66,8 @@ No, this Plugin has been written from scratch. Of course some inspirations on ho
= 1.2.4 = = 1.2.4 =
- Bugfix: CSS stylesheets will only be added in FootNotes settings page, nowhere else (thanks to Piet Bos, China) - Bugfix: CSS stylesheets will only be added in FootNotes settings page, nowhere else (thanks to Piet Bos, China)
- Bugfix: Styling of the reference container when the footnote text was too long (thanks to Willem Braak, ???)
- Bugfix: Added a Link to the footnote text in the reference container back to the footnote index in the page content (thanks to Willem Braak, ???)
= 1.2.3 = = 1.2.3 =
- Bugfix: Removed 'Warning output' of Plugins activation and deactivation function (thanks to Piet Bos, China) - Bugfix: Removed 'Warning output' of Plugins activation and deactivation function (thanks to Piet Bos, China)

View file

@ -1,6 +1,5 @@
<sup class="footnote_plugin_tooltip" name="footnote_plugin_tooltip_[[FOOTNOTE INDEX]]" <sup class="footnote_plugin_tooltip" onclick="footnote_expand_reference_container('#footnote_plugin_reference_[[FOOTNOTE INDEX]]');">
onclick="footnote_expand_reference_container('#footnote_plugin_reference_[[FOOTNOTE INDEX]]');"> <a href="#footnote_plugin_reference_[[FOOTNOTE INDEX]]" name="footnote_plugin_tooltip_[[FOOTNOTE INDEX]]">[[FOOTNOTE INDEX]])</a>
<a>[[FOOTNOTE INDEX]])</a>
<span> <span>
[[FOOTNOTE TEXT]] [[FOOTNOTE TEXT]]
</span> </span>