mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 11:16:51 +00:00
Merge "Open meta dialog to edit categories when user clicks on the category footer"
This commit is contained in:
commit
f6b7c64e92
|
@ -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 {
|
||||
|
|
|
@ -1177,7 +1177,8 @@ ve.init.mw.DesktopArticleTarget.prototype.restoreDocumentTitle = function () {
|
|||
* 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' );
|
||||
|
@ -1194,8 +1195,16 @@ ve.init.mw.DesktopArticleTarget.prototype.transformPage = function () {
|
|||
$content.nextAll().addClass( 've-init-mw-desktopArticleTarget-uneditableContent' );
|
||||
$content = $content.parent();
|
||||
}
|
||||
$( '.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
|
||||
$( '.ve-init-mw-desktopArticleTarget-uneditableContent' ).on( 'click.ve-target', function () { return false; } );
|
||||
return false;
|
||||
} );
|
||||
|
||||
this.updateHistoryState();
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue