Florianschmidtwelzow has uploaded a new change for review.
https://gerrit.wikimedia.org/r/160824
Change subject: Hygiene: Change editor URL to use leading /
......................................................................
Hygiene: Change editor URL to use leading /
Bug: 70904
Change-Id: I124dee59b0536be36b8c8977301aa398d414c38c
---
M includes/skins/SkinMinerva.php
M includes/specials/SpecialMobileEditor.php
M javascripts/modules/editor/editor.js
M templates/page.hogan
M templates/section.hogan
5 files changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/24/160824/1
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 1cf028d..4e4c1ec 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -149,7 +149,7 @@
$lang = wfGetLangObj( $lang );
$message = wfMessage( 'mobile-frontend-editor-edit'
)->inLanguage( $lang )->text();
return Html::element( 'a', array(
- 'href' => '#editor/' . $section,
+ 'href' => '#/editor/' . $section,
'data-section' => $section,
'class' => 'edit-page icon icon-32px icon-edit
enabled'
), $message );
diff --git a/includes/specials/SpecialMobileEditor.php
b/includes/specials/SpecialMobileEditor.php
index e1d87aa..e97a200 100644
--- a/includes/specials/SpecialMobileEditor.php
+++ b/includes/specials/SpecialMobileEditor.php
@@ -40,7 +40,7 @@
$context = MobileContext::singleton();
$articleUrl = $context->getMobileUrl( $title->getFullURL( $data
) );
- $targetUrl = $articleUrl . '#editor/' . $section;
+ $targetUrl = $articleUrl . '#/editor/' . $section;
$html =
Html::openElement( 'div',
diff --git a/javascripts/modules/editor/editor.js
b/javascripts/modules/editor/editor.js
index 33354f9..9b3ffd7 100644
--- a/javascripts/modules/editor/editor.js
+++ b/javascripts/modules/editor/editor.js
@@ -32,7 +32,7 @@
function addEditButton( section, container ) {
return $( '<a class="edit-page">' ).
- attr( 'href', '#editor/' + section ).
+ attr( 'href', '#/editor/' + section ).
text( mw.msg( 'mobile-frontend-editor-edit' ) ).
prependTo( container );
}
@@ -92,7 +92,7 @@
window.alert( mw.msg(
'mobile-frontend-editor-undo-unsupported' ) );
}
- M.overlayManager.add( /^editor\/(\d+)\/?([^\/]*)$/, function(
sectionId, funnel ) {
+ M.overlayManager.add( /^\/editor\/(\d+)\/?([^\/]*)$/, function(
sectionId, funnel ) {
var
loadingOverlay = new LoadingOverlay(),
result = $.Deferred(),
diff --git a/templates/page.hogan b/templates/page.hogan
index 50d1712..dfae864 100644
--- a/templates/page.hogan
+++ b/templates/page.hogan
@@ -15,7 +15,7 @@
{{#sections}}
<{{tag}} data-id="{{id}}">
<span id="{{anchor}}">{{{line}}}</span>
- <a href="#editor/{{id}}" data-section="{{id}}" class="edit-page
icon icon-edit enabled icon-32px">{{editLabel}}</a>
+ <a href="#/editor/{{id}}" data-section="{{id}}"
class="edit-page icon icon-edit enabled icon-32px">{{editLabel}}</a>
</{{tag}}>
<div>{{{text}}}</div>
{{/sections}}
diff --git a/templates/section.hogan b/templates/section.hogan
index 442056c..41d31ba 100644
--- a/templates/section.hogan
+++ b/templates/section.hogan
@@ -1,7 +1,7 @@
{{#heading}}
<h2>
<span id="{{anchor}}">{{{heading}}}</span>
- <a href="#editor/{{id}}" data-section="{{id}}" class="edit-page
icon-edit icon icon-32px enabled">{{editLabel}}</a>
+ <a href="#/editor/{{id}}" data-section="{{id}}" class="edit-page
icon-edit icon icon-32px enabled">{{editLabel}}</a>
</h2>
{{/heading}}
<div>
--
To view, visit https://gerrit.wikimedia.org/r/160824
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I124dee59b0536be36b8c8977301aa398d414c38c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits