Mollywhite has uploaded a new change for review.
https://gerrit.wikimedia.org/r/72742
Change subject: Whitespace cleanup, changing lists to use ordered list.
......................................................................
Whitespace cleanup, changing lists to use ordered list.
Removing trailing whitespace and whitespace in empty lines.
Changed <p> tags in the dropdown menus to <ol><li>.
Change-Id: I9941ae4048f7d416a5313c6fcfacc8c652e2dc93
---
M BookManagerv2.hooks.php
M modules/ext.BookManagerv2.css
M modules/ext.BookManagerv2.js
3 files changed, 27 insertions(+), 24 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BookManagerv2
refs/changes/42/72742/1
diff --git a/BookManagerv2.hooks.php b/BookManagerv2.hooks.php
index 3e1f9e0..e85626e 100644
--- a/BookManagerv2.hooks.php
+++ b/BookManagerv2.hooks.php
@@ -1,7 +1,7 @@
<?php
/**
* Hooks for the BookManagerv2 extension
- *
+ *
* @file
* @ingroup Extensions
*
@@ -22,14 +22,14 @@
*/
class BookManagerv2Hooks {
-
+
public static function readingInterfaceUX( $out, $prev, $next,
$chapterList, $metadata ) {
-
+
$html = Html::openElement( 'div', array( 'class' =>
'mw-bookmanagerv2-nav-wrap' ) )
. Html::openElement( 'div', array( 'class' =>
'mw-bookmanagerv2-nav-constrain' ) )
. Html::openElement( 'div', array( 'class' =>
'mw-bookmanagerv2-nav-bar' ) )
. Html::openElement( 'a', array(
- 'class' => array(
+ 'class' => array(
'mw-bookmanagerv2-nav-icon',
'mw-bookmanagerv2-nav-data' )
)
@@ -62,7 +62,7 @@
. Html::closeElement( 'a' )
. Html::openElement( 'a', array(
'class' => 'mw-bookmanagerv2-nav-next',
- 'href' => $next->link )
+ 'href' => $next->link )
)
. $next->title
. Html::element( 'img', array(
@@ -71,8 +71,8 @@
), '' )
. Html::closeElement( 'a' )
. Html::closeElement( 'div' )
- . Html::rawElement( 'div', array(
- 'class' => array(
+ . Html::rawElement( 'div', array(
+ 'class' => array(
'mw-bookmanagerv2-nav-dropdown',
'mw-bookmanagerv2-nav-data' )
),
@@ -87,7 +87,7 @@
)
. Html::closeElement( 'div' )
. Html::closeElement( 'div' );
-
+
$out->prependHTML( $html );
}
@@ -98,16 +98,20 @@
$out->addModules( "ext.BookManagerv2" );
$prev = (object) array( "link"=>"/prev.html",
"title"=>"Previous" );
$next = (object) array( "link"=>"/next.html",
"title"=>"Next" );
- $chapterList = Html::element( 'p', array(),
'Chapter 1' )
- . Html::element( 'p', array(), 'Chapter
2' )
- . Html::element( 'p', array(), 'Chapter
3' );
- $metadata = Html::openElement( 'p', array() )
+ $chapterList = Html::openElement( 'ol', array()
)
+ . Html::element( 'li', array(),
'Chapter 1' )
+ . Html::element( 'li', array(),
'Chapter 2' )
+ . Html::element( 'li', array(),
'Chapter 3' )
+ . Html::closeElement( 'ol' );
+ $metadata = Html::openElement( 'ol', array() )
+ . Html::openElement( 'li', array() )
. 'Title: '
. Html::element( 'span', array( 'class'
=> 'title' ), 'Title' )
- . Html::closeElement( 'p' )
- . Html::element( 'p', array(), 'Author:
Author');
+ . Html::closeElement( 'li' )
+ . Html::element( 'li', array(),
'Author: Author')
+ . Html::closeElement( 'ol' );
self::readingInterfaceUX( $out, $prev, $next,
$chapterList, $metadata );
- }
+ }
}
return true;
}
diff --git a/modules/ext.BookManagerv2.css b/modules/ext.BookManagerv2.css
index 7fdee0d..f5b1a85 100644
--- a/modules/ext.BookManagerv2.css
+++ b/modules/ext.BookManagerv2.css
@@ -31,7 +31,7 @@
border-radius: 5px;
padding: 3px 5px;
}
-.mw-bookmanagerv2-nav-bar p {
+.mw-bookmanagerv2-nav-bar p {
margin: 5px 0;
padding: 0;
}
@@ -48,7 +48,7 @@
cursor: pointer;
}
.mw-bookmanagerv2-nav-bar img {
- margin: 0 10px 2px 10px;
+ margin: 0 10px 2px 10px;
}
img.mw-bookmanagerv2-nav-data {
margin-left: 5px;
@@ -94,7 +94,10 @@
left: 50%;
margin-left: -141px;
}
-
+div.mw-bookmanagerv2-nav-dropdown ol {
+ list-style:none;
+ margin: 0;
+}
div.mw-bookmanagerv2-nav-toc {
margin-left: 45px;
}
diff --git a/modules/ext.BookManagerv2.js b/modules/ext.BookManagerv2.js
index cfe946f..128d604 100644
--- a/modules/ext.BookManagerv2.js
+++ b/modules/ext.BookManagerv2.js
@@ -18,15 +18,11 @@
$(function () {
$('a.mw-bookmanagerv2-nav-data').click( function() {
- if ( $('div.mw-bookmanagerv2-nav-toc').is(':visible') ) {
- $('div.mw-bookmanagerv2-nav-toc').hide();
- }
+ $('div.mw-bookmanagerv2-nav-toc').hide();
$('div.mw-bookmanagerv2-nav-data').toggle();
});
$('a.mw-bookmanagerv2-nav-toc').click( function() {
- if ( $('div.mw-bookmanagerv2-nav-data').is(':visible') ) {
- $('div.mw-bookmanagerv2-nav-data').hide();
- }
+ $('div.mw-bookmanagerv2-nav-data').hide();
$('div.mw-bookmanagerv2-nav-toc').toggle();
});
});
--
To view, visit https://gerrit.wikimedia.org/r/72742
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9941ae4048f7d416a5313c6fcfacc8c652e2dc93
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BookManagerv2
Gerrit-Branch: master
Gerrit-Owner: Mollywhite <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits