Fix tab selection on monobook

Don't unselect article tab when loading VE, do unselect when restoring normal view mode.

Bug: 49407
Change-Id: I4b6e5c898a8af2b404151bba46359dc4bfbd739e
This commit is contained in:
Krenair 2014-04-28 16:38:56 +01:00
parent d85317a710
commit 032d9d53ec

View file

@ -1374,7 +1374,7 @@ ve.init.mw.ViewPageTarget.prototype.transformPage = function () {
var uri;
// Put skin tabs in "edit" mode
$( $( '#p-views' ).length ? '#p-views' : '#p-cactions' )
$( '#p-views' )
.find( 'li.selected' ).removeClass( 'selected' );
$( '#ca-ve-edit' )
.addClass( 'selected' );
@ -1408,7 +1408,8 @@ ve.init.mw.ViewPageTarget.prototype.restorePage = function () {
// Put skin tabs back in "view" mode
$( $( '#p-views' ).length ? '#p-views' : '#p-cactions' )
.find( 'li.selected' ).removeClass( 'selected' );
$( '#ca-view' ).addClass( 'selected' );
$( $( '#ca-view' ).length ? '#ca-view' : '#p-cactions > .pBody > ul > li:nth-child(1)' )
.addClass( 'selected' );
// Make site notice visible again (if present)
$( '#siteNotice.ve-hide' )