Robmoen has uploaded a new change for review.
https://gerrit.wikimedia.org/r/97702
Change subject: Toggle veaction-edit class on the body of the view page
......................................................................
Toggle veaction-edit class on the body of the view page
This allows things outside of VisualEditor to style themselves differently
while the editor is active
Bug: 57555
Change-Id: Ief6b5f53096dd5eeb43a72a7bb182a2c04ec97ca
---
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
1 file changed, 8 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor
refs/changes/02/97702/1
diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
index 0055582..b388a5a 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
@@ -1291,6 +1291,10 @@
.addClass( 've-hide' )
.slideUp( 'fast' );
+ // Add veaction-edit class to body
+ $( 'body' )
+ .addClass( 'veaction-edit' );
+
// 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' ) {
@@ -1316,11 +1320,14 @@
.find( 'li.selected' ).removeClass( 'selected' );
$( '#ca-view' ).addClass( 'selected' );
-
// Make site notice visible again (if present)
$( '#siteNotice.ve-hide' )
.slideDown( 'fast' );
+ // Remove veaction-edit class to body
+ $( 'body' )
+ .removeClass( 'veaction-edit' );
+
// Push non-veaction=edit url in history
if ( !this.actFromPopState && window.history.pushState ) {
// Remove the veaction query parameter
--
To view, visit https://gerrit.wikimedia.org/r/97702
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief6b5f53096dd5eeb43a72a7bb182a2c04ec97ca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Robmoen <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits