Merge "Clean up variable initialization in setupSkinTabs()"

This commit is contained in:
jenkins-bot 2013-05-10 20:31:03 +00:00 committed by Gerrit Code Review
commit 57b05aa433

View file

@ -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' ) {