Create init methods which hide and restore siteNotice if present.

Change-Id: I2fbc74ae46474cdb2559ecaa083cc7353b050937
This commit is contained in:
Rob Moen 2012-06-21 12:44:33 -07:00
parent fc7e96b2b5
commit f28a2399f4

View file

@ -110,6 +110,7 @@ ve.init.ViewPageTarget.prototype.activate = function() {
this.activating = true;
// User interface changes
this.transformSkinTabs();
this.hideSiteNotice();
this.showSpinner();
this.hideTableOfContents();
this.mutePageContent();
@ -134,6 +135,7 @@ ve.init.ViewPageTarget.prototype.deactivate = function( override ) {
this.deactivating = true;
// User interface changes
this.restoreSkinTabs();
this.restoreSiteNotice();
this.hideSpinner();
this.detachToolbarSaveButton();
this.detachSaveDialog();
@ -820,6 +822,24 @@ ve.init.ViewPageTarget.prototype.restoreSkinTabs = function() {
$( '#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.
*