- 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:
parent
2ff59067ec
commit
4461aaaf27
5 changed files with 25 additions and 28 deletions
|
@ -57,13 +57,8 @@ class Class_FootnotesSettings
|
|||
/* loads and filters the settings for this plugin */
|
||||
$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 */
|
||||
//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, 'RegisterTab_General'));
|
||||
|
@ -79,18 +74,10 @@ class Class_FootnotesSettings
|
|||
*/
|
||||
function LoadScriptsAndStylesheets()
|
||||
{
|
||||
/* add the jQuery plugin (already registered by WP) */
|
||||
wp_enqueue_script('jquery');
|
||||
/* register public stylesheet */
|
||||
//wp_register_style('footnote_public_style', plugins_url('../css/footnote.css', __FILE__));
|
||||
wp_register_style('footnote_public_style', plugins_url('../css/footnote.css', __FILE__));
|
||||
/* 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');
|
||||
wp_enqueue_style('footnote_public_style');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -131,7 +118,14 @@ class Class_FootnotesSettings
|
|||
*/
|
||||
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 */
|
||||
$l_str_tab = isset($_GET['tab']) ? $_GET['tab'] : FOOTNOTE_SETTINGS_LABEL_GENERAL;
|
||||
/* outputs all tabs */
|
||||
|
|
|
@ -70,16 +70,18 @@
|
|||
|
||||
/* footnote (bottom) index */
|
||||
.footnote_plugin_index {
|
||||
float: left !important;
|
||||
/*float: left !important;*/
|
||||
min-width: 40px !important;
|
||||
white-space: nowrap !important;
|
||||
text-align: right !important;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* footnote (bottom) text */
|
||||
.footnote_plugin_text {
|
||||
float: left !important;
|
||||
/*float: left !important;*/
|
||||
padding-left: 16px !important;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* footnote (bottom) link to the footnote implementation */
|
||||
|
@ -96,12 +98,12 @@
|
|||
|
||||
/* footnote (bottom) styling end tag */
|
||||
.footnote_plugin_end {
|
||||
clear: left !important;
|
||||
/*clear: left !important;*/
|
||||
}
|
||||
|
||||
/* tooltip */
|
||||
.footnote_plugin_tooltip {
|
||||
outline: none !important;
|
||||
.footnote_plugin_tooltip, .footnote_plugin_tooltip a {
|
||||
/*outline: none !important;*/
|
||||
/*color: #4777ff !important;*/
|
||||
text-decoration: none !important;
|
||||
cursor: pointer !important;
|
||||
|
|
|
@ -361,7 +361,7 @@ function footnotes_OutputReferenceContainer()
|
|||
/* 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++) {
|
||||
/* 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 */
|
||||
$g_arr_Footnotes[$l_str_CheckIndex] = "";
|
||||
/* add the footnote index to the actual index */
|
||||
|
|
|
@ -66,6 +66,8 @@ No, this Plugin has been written from scratch. Of course some inspirations on ho
|
|||
|
||||
= 1.2.4 =
|
||||
- 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 =
|
||||
- Bugfix: Removed 'Warning output' of Plugins activation and deactivation function (thanks to Piet Bos, China)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<sup class="footnote_plugin_tooltip" name="footnote_plugin_tooltip_[[FOOTNOTE INDEX]]"
|
||||
onclick="footnote_expand_reference_container('#footnote_plugin_reference_[[FOOTNOTE INDEX]]');">
|
||||
<a>[[FOOTNOTE INDEX]])</a>
|
||||
<sup class="footnote_plugin_tooltip" 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>
|
||||
<span>
|
||||
[[FOOTNOTE TEXT]]
|
||||
</span>
|
||||
|
|
Reference in a new issue