Florianschmidtwelzow has uploaded a new change for review. https://gerrit.wikimedia.org/r/204460
Change subject: Follow up I46d9a2ea ...................................................................... Follow up I46d9a2ea * Do not use this in function scope * Move Html creation from JavaScript to template Follow up: I46d9a2ea Change-Id: I597aa816dc94c3de7bd808a5dd9c087044516cb9 --- M javascripts/modules/toc/init.js M templates/modules/toc/toc.hogan 2 files changed, 4 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/60/204460/1 diff --git a/javascripts/modules/toc/init.js b/javascripts/modules/toc/init.js index 9543910..b4633cd 100644 --- a/javascripts/modules/toc/init.js +++ b/javascripts/modules/toc/init.js @@ -1,4 +1,4 @@ -( function ( M ) { +( function ( M, $ ) { var TableOfContents = M.require( 'modules/toc/TableOfContents' ), toggle = M.require( 'toggle' ); @@ -28,9 +28,7 @@ // don't show toc at end of page, when no sections there toc.insertAfter( '#toc' ); // remove the original parser toc - this.$( '#toc' ).remove(); - // prevent to float text right of toc - this.$( '.toc-mobile' ).after( '<div style="clear:both;"></div>' ); + $( '#toc' ).remove(); } else { // otherwise append it to the lead section toc.appendTo( page.getLeadSectionElement() ); @@ -44,4 +42,4 @@ init( M.getCurrentPage() ); } -}( mw.mobileFrontend ) ); +}( mw.mobileFrontend, jQuery ) ); diff --git a/templates/modules/toc/toc.hogan b/templates/modules/toc/toc.hogan index fc9d4a5..84e5ed4 100644 --- a/templates/modules/toc/toc.hogan +++ b/templates/modules/toc/toc.hogan @@ -6,6 +6,5 @@ {{/sections}} </ul> </div> - - +<div style="clear:both;"></div> -- To view, visit https://gerrit.wikimedia.org/r/204460 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I597aa816dc94c3de7bd808a5dd9c087044516cb9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.wel...@t-online.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits