From 28fb8c8d4c45c09936fcb4a8e05edea46456bfdd Mon Sep 17 00:00:00 2001 From: Krenair Date: Thu, 15 May 2014 00:23:07 +0100 Subject: [PATCH] Fire hook when VE activates/deactivates Bug: 65320 Change-Id: I3658d6cbe6dd81d8d143fce9659f2c8c4e25ba07 --- modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 9ea7697be6..80ef4d6160 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js @@ -1414,8 +1414,7 @@ ve.init.mw.ViewPageTarget.prototype.transformPage = function () { $( '#p-views' ).find( 'li.selected' ).removeClass( 'selected' ); $( '#ca-ve-edit' ).addClass( 'selected' ); - // PageTriage bar - $( '#mwe-pt-toolbar' ).hide(); + mw.hook( 've.activate' ).fire(); // Hide site notice (if present) $( '#siteNotice:visible' ) @@ -1449,8 +1448,7 @@ ve.init.mw.ViewPageTarget.prototype.restorePage = function () { $( '#ca-ve-edit' ).removeClass( 'selected' ); $( '#ca-view' ).addClass( 'selected' ); - // PageTriage bar - $( '#mwe-pt-toolbar' ).show(); + mw.hook( 've.deactivate' ).fire(); // Make site notice visible again (if present) $( '#siteNotice.ve-hide' )