Florianschmidtwelzow has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/162644

Change subject: Use back button to leave Overlay on all Overlays
......................................................................

Use back button to leave Overlay on all Overlays

New template backButton.hogan (similar to cancelButton.hogan).

Bug: 71203
Change-Id: I08a0a8e00b03618cef8b25047c10f18a039c37e1
---
M includes/Resources.php
M javascripts/modules/search/SearchOverlay.js
M javascripts/modules/talk/TalkOverlay.js
A templates/backButton.hogan
4 files changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/44/162644/1

diff --git a/includes/Resources.php b/includes/Resources.php
index cf77a98..979bb2a 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -588,6 +588,7 @@
                ),
                'templates' => array(
                        'cancelButton.hogan',
+                       'backButton.hogan',
                        'Overlay.hogan',
                        'LoadingOverlay.hogan',
                ),
diff --git a/javascripts/modules/search/SearchOverlay.js 
b/javascripts/modules/search/SearchOverlay.js
index 599791c..1cb9e36 100644
--- a/javascripts/modules/search/SearchOverlay.js
+++ b/javascripts/modules/search/SearchOverlay.js
@@ -10,6 +10,9 @@
        SearchOverlay = Overlay.extend( {
                className: 'overlay search-overlay',
                template: M.template.get( 'modules/search/SearchOverlay.hogan' 
),
+               templatePartials: {
+                       cancelButton: M.template.get( 'backButton.hogan' )
+               },
                defaults: {
                        searchTerm: '',
                        placeholderMsg: $( '#searchInput' ).attr( 'placeholder' 
),
diff --git a/javascripts/modules/talk/TalkOverlay.js 
b/javascripts/modules/talk/TalkOverlay.js
index 6015267..a4de03e 100644
--- a/javascripts/modules/talk/TalkOverlay.js
+++ b/javascripts/modules/talk/TalkOverlay.js
@@ -13,7 +13,8 @@
                 */
                TalkOverlay = Overlay.extend( {
                        templatePartials: {
-                               content: M.template.get( 
'modules/talk/talk.hogan' )
+                               content: M.template.get( 
'modules/talk/talk.hogan' ),
+                               cancelButton: M.template.get( 
'backButton.hogan' )
                        },
                        defaults: {
                                heading: '<strong>' + mw.msg( 
'mobile-frontend-talk-overlay-header' ) + '</strong>',
diff --git a/templates/backButton.hogan b/templates/backButton.hogan
new file mode 100644
index 0000000..cdabfaa
--- /dev/null
+++ b/templates/backButton.hogan
@@ -0,0 +1 @@
+<button class="cancel icon icon-back">{{closeMsg}}</button>
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/162644
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I08a0a8e00b03618cef8b25047c10f18a039c37e1
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

Reply via email to