Fix use of removed function isUniqueListKey

Function was removed in eb64743436 but one caller was still left,
which caused VE to throw a JS error when opening the reference dialog
to insert a new reference.

Change-Id: I827381bfe3bdeecdbaa1fba55a09b3e8e03575a6
This commit is contained in:
Roan Kattouw 2013-09-24 19:18:36 -07:00
parent 1546485fed
commit 336029d11f

View file

@ -90,7 +90,7 @@ ve.ui.MWReferenceSearchWidget.prototype.onResultsSelect = function ( item ) {
*/ */
ve.ui.MWReferenceSearchWidget.prototype.buildIndex = function () { ve.ui.MWReferenceSearchWidget.prototype.buildIndex = function () {
var i, iLen, j, jLen, group, groupName, groupNames, view, text, attr, firstNodes, indexOrder, var i, iLen, j, jLen, group, groupName, groupNames, view, text, attr, firstNodes, indexOrder,
refnode, name, citation, refnode, matches, name, citation,
internalList = this.surface.getModel().getDocument().getInternalList(), internalList = this.surface.getModel().getDocument().getInternalList(),
groups = internalList.getNodeGroups(); groups = internalList.getNodeGroups();
@ -121,7 +121,8 @@ ve.ui.MWReferenceSearchWidget.prototype.buildIndex = function () {
} }
citation = ( attr.refGroup.length ? attr.refGroup + ' ' : '' ) + ( j + 1 ); citation = ( attr.refGroup.length ? attr.refGroup + ' ' : '' ) + ( j + 1 );
name = !ve.dm.InternalList.static.isUniqueListKey( attr.listKey ) ? attr.listKey : ''; matches = attr.listKey.match( /^literal\/(.*)$/ );
name = matches && matches[1] || '';
// Make visible text, citation and reference name searchable // Make visible text, citation and reference name searchable
text = [ view.$.text().toLowerCase(), citation, name ].join( ' ' ); text = [ view.$.text().toLowerCase(), citation, name ].join( ' ' );
// Make URLs searchable // Make URLs searchable