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( 'href', new mw.Title( ve.msg( 'visualeditor-help-link' ) ).getUrl() )
|
||||
.text( ve.msg( 'visualeditor-help-label' ) )
|
||||
) ) )
|
||||
.append( $( '<div>' )
|
||||
.append( $( '<span>' )
|
||||
.addClass( 've-init-mw-ViewPageTarget-version-label' )
|
||||
.text( ve.msg( 'visualeditor-version-label' ) )
|
||||
)
|
||||
.append( ' ' )
|
||||
.append( $( '<a>' )
|
||||
.addClass( 've-init-mw-ViewPageTarget-version-link' )
|
||||
.attr( 'target', '_blank' )
|
||||
.attr( 'href', ve.version.url )
|
||||
.text( ve.version.id )
|
||||
)
|
||||
.append( ' ' )
|
||||
.append( $( '<span>' )
|
||||
.addClass( 've-init-mw-ViewPageTarget-version-date' )
|
||||
.text( ve.version.dateString )
|
||||
)
|
||||
);
|
||||
) ) );
|
||||
if ( ve.version.id !== false ) {
|
||||
this.$toolbarBetaNotice
|
||||
.append( $( '<div>' )
|
||||
.append( $( '<span>' )
|
||||
.addClass( 've-init-mw-ViewPageTarget-version-label' )
|
||||
.text( ve.msg( 'visualeditor-version-label' ) )
|
||||
)
|
||||
.append( ' ' )
|
||||
.append( $( '<a>' )
|
||||
.addClass( 've-init-mw-ViewPageTarget-version-link' )
|
||||
.attr( 'target', '_blank' )
|
||||
.attr( 'href', ve.version.url )
|
||||
.text( ve.version.id )
|
||||
)
|
||||
.append( ' ' )
|
||||
.append( $( '<span>' )
|
||||
.addClass( 've-init-mw-ViewPageTarget-version-date' )
|
||||
.text( ve.version.dateString )
|
||||
)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue