mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 14:33:59 +00:00
Fix doc in GalleryDialog and add todo
Change-Id: I4e1ad8ec3d7a1c85a600bf1dafc449054c115203
This commit is contained in:
parent
ca7071775e
commit
f80b029444
|
@ -643,7 +643,7 @@ ve.ui.MWGalleryDialog.prototype.onRequestImagesSuccess = function ( response ) {
|
|||
/**
|
||||
* Request a new image and highlight it
|
||||
*
|
||||
* @param {string} title File name for the new image
|
||||
* @param {string} title Normalized title of the new image
|
||||
*/
|
||||
ve.ui.MWGalleryDialog.prototype.addNewImage = function ( title ) {
|
||||
var dialog = this;
|
||||
|
@ -683,6 +683,8 @@ ve.ui.MWGalleryDialog.prototype.updateHighlightedItem = function () {
|
|||
ve.ui.MWGalleryDialog.prototype.onSearchResultsChoose = function ( item ) {
|
||||
var title = mw.Title.newFromText( item.getData().title ).getPrefixedText();
|
||||
|
||||
// Check title against pending insertions
|
||||
// TODO: Prevent two 'choose' events firing from the UI
|
||||
if ( !Object.prototype.hasOwnProperty.call( this.selectedFilenames, title ) ) {
|
||||
this.addNewImage( title );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue