mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 18:39:52 +00:00
Switch tabs from read to edit when loading editor.
On cleanup, switch tabs back Change-Id: Iefb47536e21cd7763c0d75c976109aeb2cbecf50
This commit is contained in:
parent
237c0fd21f
commit
4ca26f1805
|
@ -24,6 +24,9 @@
|
|||
$('#ca-edit > span > a').click( function( e ){
|
||||
// hijack the edit link
|
||||
e.preventDefault();
|
||||
$('#ca-view').removeClass('selected');
|
||||
$('#ca-edit').addClass('selected');
|
||||
|
||||
_this.showSpinner();
|
||||
// async init
|
||||
mw.loader.using( 'ext.visualEditor.ve', function(){
|
||||
|
@ -102,6 +105,8 @@
|
|||
veCore.prototype.cleanup = function(){
|
||||
$('#ve-editor').remove();
|
||||
$('#ve-loader-spinner').remove();
|
||||
$('#ca-view').addClass('selected');
|
||||
$('#ca-edit').removeClass('selected');
|
||||
this.$content
|
||||
.find('#mw-content-text, #bodyContent, #firstHeading').show();
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue