Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/386704 )
Change subject: Back to top is now owned by Minerva skin ...................................................................... Back to top is now owned by Minerva skin Depends-On: I97e6010026daf4c6610bcfbedf140fb2a45b1130 Change-Id: I45db9032a16f1a10e050936962c925e1eb866a47 --- M extension.json D resources/mobile.backtotop/BackToTopOverlay.hogan D resources/mobile.backtotop/BackToTopOverlay.js D resources/mobile.backtotop/backtotop.less 4 files changed, 0 insertions(+), 122 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/04/386704/1 diff --git a/extension.json b/extension.json index 660f250..60fb307 100644 --- a/extension.json +++ b/extension.json @@ -256,25 +256,6 @@ "resources/mobile.ajax.styles/spinner.less" ] }, - "mobile.backtotop": { - "targets": [ - "mobile", - "desktop" - ], - "dependencies": [ - "mobile.startup", - "mobile.toggle" - ], - "scripts": [ - "resources/mobile.backtotop/BackToTopOverlay.js" - ], - "styles": [ - "resources/mobile.backtotop/backtotop.less" - ], - "templates": { - "BackToTopOverlay.hogan": "resources/mobile.backtotop/BackToTopOverlay.hogan" - } - }, "mobile.startup.images": { "class": "ResourceLoaderImageModule", "selector": ".mw-ui-icon-{name}:before", diff --git a/resources/mobile.backtotop/BackToTopOverlay.hogan b/resources/mobile.backtotop/BackToTopOverlay.hogan deleted file mode 100644 index 1dd5be9..0000000 --- a/resources/mobile.backtotop/BackToTopOverlay.hogan +++ /dev/null @@ -1 +0,0 @@ -<div class="arrow-up"></div> diff --git a/resources/mobile.backtotop/BackToTopOverlay.js b/resources/mobile.backtotop/BackToTopOverlay.js deleted file mode 100644 index 452aed1..0000000 --- a/resources/mobile.backtotop/BackToTopOverlay.js +++ /dev/null @@ -1,55 +0,0 @@ -( function ( M, $ ) { - - var View = M.require( 'mobile.startup/View' ); - - /** - * Displays a little arrow at the bottom right of the viewport. - * @class BackToTopOverlay - * @extends View - */ - function BackToTopOverlay() { - View.apply( this, arguments ); - } - - OO.mfExtend( BackToTopOverlay, View, { - /** - * @inheritdoc - */ - className: 'backtotop', - /** - * @inheritdoc - */ - template: mw.template.get( 'mobile.backtotop', 'BackToTopOverlay.hogan' ), - /** - * @inheritdoc - */ - events: $.extend( {}, View.prototype.events, { - click: 'onBackToTopClick' - } ), - - /** - * Show the back to top element, if it's not visible already. - */ - show: function () { - this.$el.css( 'visibility', 'visible' ).addClass( 'visible' ); - }, - - /** - * Hide the back to top element, if it's visible. - */ - hide: function () { - this.$el.removeClass( 'visible' ); - }, - - /** - * Handles the click on the "Back to top" element and scrolls back - * to the top smoothly. - */ - onBackToTopClick: function () { - $( 'html, body' ).animate( { scrollTop: 0 }, 400 ); - } - } ); - - M.define( 'mobile.backtotop/BackToTopOverlay', BackToTopOverlay ); // resource-modules-disable-line - -}( mw.mobileFrontend, jQuery ) ); diff --git a/resources/mobile.backtotop/backtotop.less b/resources/mobile.backtotop/backtotop.less deleted file mode 100644 index 29c7aa9..0000000 --- a/resources/mobile.backtotop/backtotop.less +++ /dev/null @@ -1,47 +0,0 @@ -@import 'mobile.variables'; -@import 'mediawiki.mixins.less'; - -.backtotop { - /* initially hide the element */ - visibility: hidden; - opacity: 0; - - /* basic styling */ - position: fixed; - width: 2.5em; - height: 2.5em; - border-radius: 100%; - box-shadow: 0.1em 0.2em 0.3em @colorGray12; - bottom: 20px; - right: 0; - cursor: pointer; - z-index: @z-indexOverlay; - background-color: @colorProgressive; - - /* define what happens, if the visible class is added/removed, add a nice fade out/in */ - .transition( opacity 0.5s 0s ); - - &.visible { - &:hover { - opacity: 1; - } - opacity: 0.8; - } - - > .arrow-up { - width: 0; - height: 0; - border-left: 7px solid transparent; - border-right: 7px solid transparent; - border-bottom: 7px solid #fff; - position: absolute; - top: 50%; - left: 50%; - transform: translate( -50%, -50% ); - } - - /* center arrow in RTL wikis */ - .rtl > & .arrow-up { - transform: translate( 50%, -50% ); - } -} -- To view, visit https://gerrit.wikimedia.org/r/386704 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I45db9032a16f1a10e050936962c925e1eb866a47 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits