mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Hide version info if not available
Sometimes GitInfo returns a version ID of false if it can't find the right files. In this case we should hide the whole message as it is meaningless. Bug: 53050 Change-Id: I71161df7588aa9311bc1fdf6b064cc6d8c155f61
This commit is contained in:
parent
019a6f8e49
commit
eeb3ac3b19
|
@ -1030,25 +1030,28 @@ ve.init.mw.ViewPageTarget.prototype.setupToolbarBetaNotice = function () {
|
||||||
.attr( 'target', '_blank' )
|
.attr( 'target', '_blank' )
|
||||||
.attr( 'href', new mw.Title( ve.msg( 'visualeditor-help-link' ) ).getUrl() )
|
.attr( 'href', new mw.Title( ve.msg( 'visualeditor-help-link' ) ).getUrl() )
|
||||||
.text( ve.msg( 'visualeditor-help-label' ) )
|
.text( ve.msg( 'visualeditor-help-label' ) )
|
||||||
) ) )
|
) ) );
|
||||||
.append( $( '<div>' )
|
if ( ve.version.id !== false ) {
|
||||||
.append( $( '<span>' )
|
this.$toolbarBetaNotice
|
||||||
.addClass( 've-init-mw-ViewPageTarget-version-label' )
|
.append( $( '<div>' )
|
||||||
.text( ve.msg( 'visualeditor-version-label' ) )
|
.append( $( '<span>' )
|
||||||
)
|
.addClass( 've-init-mw-ViewPageTarget-version-label' )
|
||||||
.append( ' ' )
|
.text( ve.msg( 'visualeditor-version-label' ) )
|
||||||
.append( $( '<a>' )
|
)
|
||||||
.addClass( 've-init-mw-ViewPageTarget-version-link' )
|
.append( ' ' )
|
||||||
.attr( 'target', '_blank' )
|
.append( $( '<a>' )
|
||||||
.attr( 'href', ve.version.url )
|
.addClass( 've-init-mw-ViewPageTarget-version-link' )
|
||||||
.text( ve.version.id )
|
.attr( 'target', '_blank' )
|
||||||
)
|
.attr( 'href', ve.version.url )
|
||||||
.append( ' ' )
|
.text( ve.version.id )
|
||||||
.append( $( '<span>' )
|
)
|
||||||
.addClass( 've-init-mw-ViewPageTarget-version-date' )
|
.append( ' ' )
|
||||||
.text( ve.version.dateString )
|
.append( $( '<span>' )
|
||||||
)
|
.addClass( 've-init-mw-ViewPageTarget-version-date' )
|
||||||
);
|
.text( ve.version.dateString )
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue