mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-12 09:09:25 +00:00
mw.ViewPageTarget: Use ve-activated class on the html element
This allows things outside of VisualEditor to style themselves differently while the editor is active. Bug: 57555 Change-Id: Ief6b5f53096dd5eeb43a72a7bb182a2c04ec97ca
This commit is contained in:
parent
1e77fad405
commit
b37fbf9ba9
|
@ -1438,6 +1438,9 @@ ve.init.mw.ViewPageTarget.prototype.transformPage = function () {
|
|||
.addClass( 've-hide' )
|
||||
.slideUp( 'fast' );
|
||||
|
||||
// Add class to document
|
||||
$( 'html' ).addClass( 've-activated' );
|
||||
|
||||
// Push veaction=edit url in history (if not already. If we got here by a veaction=edit
|
||||
// permalink then it will be there already and the constructor called #activate)
|
||||
if ( !this.actFromPopState && window.history.pushState && this.currentUri.query.veaction !== 'edit' ) {
|
||||
|
@ -1463,11 +1466,13 @@ ve.init.mw.ViewPageTarget.prototype.restorePage = function () {
|
|||
.find( 'li.selected' ).removeClass( 'selected' );
|
||||
$( '#ca-view' ).addClass( 'selected' );
|
||||
|
||||
|
||||
// Make site notice visible again (if present)
|
||||
$( '#siteNotice.ve-hide' )
|
||||
.slideDown( 'fast' );
|
||||
|
||||
// Remove class from document
|
||||
$( 'html' ).removeClass( 've-activated' );
|
||||
|
||||
// Push non-veaction=edit url in history
|
||||
if ( !this.actFromPopState && window.history.pushState ) {
|
||||
// Remove the veaction query parameter
|
||||
|
|
Loading…
Reference in a new issue