Merge "Re-build reference search index so they can be used mid-edit"

This commit is contained in:
jenkins-bot 2013-08-30 19:12:23 +00:00 committed by Gerrit Code Review
commit 3d2a33855c

View file

@ -141,7 +141,6 @@ ve.ui.MWReferenceDialog.prototype.initialize = function () {
this.search.connect( this, { 'select': 'onSearchSelect' } );
// Initialization
this.search.buildIndex();
this.panels.addItems( [ this.editPanel, this.searchPanel ] );
this.editPanel.$.append( this.contentFieldset.$, this.optionsFieldset.$ );
this.optionsFieldset.$.append( this.referenceGroupLabel.$, this.referenceGroupInput.$ );
@ -190,6 +189,8 @@ ve.ui.MWReferenceDialog.prototype.onOpen = function () {
this.backButton.$.hide();
this.panels.showItem( this.editPanel );
this.useReference( ref );
this.search.buildIndex();
this.selectButton.setDisabled( !this.search.getResults().getItems().length );
};
/**