mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
Merge "Clean up variable initialization in setupSkinTabs()"
This commit is contained in:
commit
57b05aa433
|
@ -757,11 +757,13 @@ ve.init.mw.ViewPageTarget.prototype.tearDownSurface = function () {
|
|||
* @method
|
||||
*/
|
||||
ve.init.mw.ViewPageTarget.prototype.setupSkinTabs = function () {
|
||||
var action, pTabsId, $caSource, $caEdit, $caEditLink, caVeEdit, caVeEditSource, caVeEditNextnode, uriClone;
|
||||
$caEdit = $( '#ca-edit' );
|
||||
$caEditLink = $caEdit.find( 'a' );
|
||||
$caSource = $( '#ca-viewsource' );
|
||||
caVeEditNextnode = $caEdit.next().get( 0 );
|
||||
var caVeEdit, caVeEditSource, uriClone,
|
||||
action = this.pageExists ? 'edit' : 'create',
|
||||
pTabsId = $( '#p-views' ).length ? 'p-views' : 'p-cactions',
|
||||
$caSource = $( '#ca-viewsource' ),
|
||||
$caEdit = $( '#ca-edit' ),
|
||||
$caEditLink = $caEdit.find( 'a' ),
|
||||
caVeEditNextnode = $caEdit.next().get( 0 );
|
||||
|
||||
if ( !$caEdit.length || $caSource.length ) {
|
||||
// If there is no edit tab or a view-source tab,
|
||||
|
@ -769,9 +771,6 @@ ve.init.mw.ViewPageTarget.prototype.setupSkinTabs = function () {
|
|||
return;
|
||||
}
|
||||
|
||||
action = this.pageExists ? 'edit' : 'create';
|
||||
pTabsId = $( '#p-views' ).length ? 'p-views' : 'p-cactions';
|
||||
|
||||
// Add independent "VisualEditor" tab (#ca-ve-edit).
|
||||
if ( this.tabLayout === 'add' ) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue