mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-26 19:56:49 +00:00
Create init methods which hide and restore siteNotice if present.
Change-Id: I2fbc74ae46474cdb2559ecaa083cc7353b050937
This commit is contained in:
parent
fc7e96b2b5
commit
f28a2399f4
|
@ -110,6 +110,7 @@ ve.init.ViewPageTarget.prototype.activate = function() {
|
||||||
this.activating = true;
|
this.activating = true;
|
||||||
// User interface changes
|
// User interface changes
|
||||||
this.transformSkinTabs();
|
this.transformSkinTabs();
|
||||||
|
this.hideSiteNotice();
|
||||||
this.showSpinner();
|
this.showSpinner();
|
||||||
this.hideTableOfContents();
|
this.hideTableOfContents();
|
||||||
this.mutePageContent();
|
this.mutePageContent();
|
||||||
|
@ -134,6 +135,7 @@ ve.init.ViewPageTarget.prototype.deactivate = function( override ) {
|
||||||
this.deactivating = true;
|
this.deactivating = true;
|
||||||
// User interface changes
|
// User interface changes
|
||||||
this.restoreSkinTabs();
|
this.restoreSkinTabs();
|
||||||
|
this.restoreSiteNotice();
|
||||||
this.hideSpinner();
|
this.hideSpinner();
|
||||||
this.detachToolbarSaveButton();
|
this.detachToolbarSaveButton();
|
||||||
this.detachSaveDialog();
|
this.detachSaveDialog();
|
||||||
|
@ -820,6 +822,24 @@ ve.init.ViewPageTarget.prototype.restoreSkinTabs = function() {
|
||||||
$( '#ca-view' ).addClass( 'selected' );
|
$( '#ca-view' ).addClass( 'selected' );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hides site notice on page if present.
|
||||||
|
*
|
||||||
|
* @method
|
||||||
|
*/
|
||||||
|
ve.init.ViewPageTarget.prototype.hideSiteNotice = function(){
|
||||||
|
$('#siteNotice').hide();
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show site notice on page if present.
|
||||||
|
*
|
||||||
|
* @method
|
||||||
|
*/
|
||||||
|
ve.init.ViewPageTarget.prototype.restoreSiteNotice = function(){
|
||||||
|
$('#siteNotice').show();
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Replaces the page content with new HTML.
|
* Replaces the page content with new HTML.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue