jenkins-bot has submitted this change and it was merged.

Change subject: Open meta dialog to edit categories when user clicks on the 
category footer
......................................................................


Open meta dialog to edit categories when user clicks on the category footer

Bug: T145267
Change-Id: Ie88c4d9c6327baffdb83c1affbc0515a68c0fc03
---
M modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init.css
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
2 files changed, 22 insertions(+), 7 deletions(-)

Approvals:
  Jforrester: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init.css 
b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init.css
index 7299a8e..983a2ad 100644
--- a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init.css
+++ b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init.css
@@ -40,13 +40,12 @@
        overflow: hidden;
 }
 
+/* Once activated, everything except the progress bar, the edit target, and 
the category footer */
+.ve-activated .ve-init-mw-desktopArticleTarget-uneditableContent 
:not([id='catlinks']),
 /* While loading, everything except the progress bar */
-.ve-loading #content > :not( .ve-init-mw-desktopArticleTarget-loading-overlay 
),
-/* Once activated, everything except the progress bar and the edit target */
-.ve-activated .ve-init-mw-desktopArticleTarget-uneditableContent {
+.ve-loading #content > :not( .ve-init-mw-desktopArticleTarget-loading-overlay 
) {
        /* IE9 is supported with JS events */
        /* stylelint-disable no-unsupported-browser-features */
-       opacity: 0.5;
        pointer-events: none;
        -webkit-user-select: none;
        -moz-user-select: none;
@@ -55,6 +54,13 @@
        /* stylelint-enable no-unsupported-browser-features */
 }
 
+/* While loading, everything except the progress bar */
+.ve-loading #content > :not( .ve-init-mw-desktopArticleTarget-loading-overlay 
),
+/* Once activated, everything except the progress bar and the edit target */
+.ve-activated .ve-init-mw-desktopArticleTarget-uneditableContent {
+       opacity: 0.5;
+}
+
 /* Progress bar mimicking OOUI */
 
 .ve-activated #content {
diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
index a6eb3ce..f16a6bc 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
@@ -1176,7 +1176,8 @@
  * Page modifications for switching to edit mode.
  */
 ve.init.mw.DesktopArticleTarget.prototype.transformPage = function () {
-       var $content;
+       var target = this,
+               $content;
 
        this.updateTabs( true );
        this.emit( 'transformPage' );
@@ -1193,8 +1194,16 @@
                $content.nextAll().addClass( 
've-init-mw-desktopArticleTarget-uneditableContent' );
                $content = $content.parent();
        }
-       // Support IE9: Disable links
-       $( '.ve-init-mw-desktopArticleTarget-uneditableContent' ).on( 
'click.ve-target', function () { return false; } );
+       $( '.ve-init-mw-desktopArticleTarget-uneditableContent' ).on( 
'click.ve-target', function () {
+               var windowAction;
+               if ( $( this ).attr( 'id' ) === 'catlinks' ) {
+                       windowAction = ve.ui.actionFactory.create( 'window', 
target.getSurface() );
+                       windowAction.open( 'meta', { page: 'categories' } );
+                       return false;
+               }
+               // Support IE9: Disable links
+               return false;
+       } );
 
        this.updateHistoryState();
 };

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie88c4d9c6327baffdb83c1affbc0515a68c0fc03
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <a...@wikimedia.org>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to