mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Merge "(bug 39753) UI restores #toc as inline-block instead of table."
This commit is contained in:
commit
4659557fef
|
@ -19,11 +19,6 @@
|
|||
cursor: default;
|
||||
}
|
||||
|
||||
.ve-init-mw-viewPageTarget-pageToc {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ve-init-mw-viewPageTarget-loadingSpinner,
|
||||
.ve-init-mw-viewPageTarget-saveDialog-saving {
|
||||
/* @embed */
|
||||
|
|
|
@ -771,7 +771,7 @@ ve.init.mw.ViewPageTarget.prototype.showPageContent = function () {
|
|||
* @method
|
||||
*/
|
||||
ve.init.mw.ViewPageTarget.prototype.mutePageContent = function () {
|
||||
$( '#bodyContent > :visible:not(#siteSub,#contentSub)' )
|
||||
$( '#bodyContent > :visible:not(#siteSub, #contentSub)' )
|
||||
.addClass( 've-init-mw-viewPageTarget-content' )
|
||||
.fadeTo( 'fast', 0.6 );
|
||||
};
|
||||
|
@ -782,7 +782,7 @@ ve.init.mw.ViewPageTarget.prototype.mutePageContent = function () {
|
|||
* @method
|
||||
*/
|
||||
ve.init.mw.ViewPageTarget.prototype.hidePageContent = function () {
|
||||
$( '#bodyContent > :visible:not(#siteSub,#contentSub)' )
|
||||
$( '#bodyContent > :visible:not(#siteSub, #contentSub)' )
|
||||
.addClass( 've-init-mw-viewPageTarget-content' )
|
||||
.hide();
|
||||
};
|
||||
|
@ -793,9 +793,13 @@ ve.init.mw.ViewPageTarget.prototype.hidePageContent = function () {
|
|||
* @method
|
||||
*/
|
||||
ve.init.mw.ViewPageTarget.prototype.showTableOfContents = function () {
|
||||
$( '#toc' ).slideDown( 'fast', function () {
|
||||
$(this).removeClass( 've-init-mw-viewPageTarget-pageToc' );
|
||||
} );
|
||||
var $toc = $( '#toc' ),
|
||||
$wrap = $toc.parent();
|
||||
if ( $wrap.data( 've.hideTableOfContents' ) ) {
|
||||
$wrap.slideDown(function () {
|
||||
$toc.unwrap();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -804,7 +808,11 @@ ve.init.mw.ViewPageTarget.prototype.showTableOfContents = function () {
|
|||
* @method
|
||||
*/
|
||||
ve.init.mw.ViewPageTarget.prototype.hideTableOfContents = function () {
|
||||
$( '#toc' ).addClass( 've-init-mw-viewPageTarget-pageToc' ).slideUp( 'fast' );
|
||||
$( '#toc' )
|
||||
.wrap( '<div>' )
|
||||
.parent()
|
||||
.data( 've.hideTableOfContents', true )
|
||||
.slideUp();
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue