src/main/webapp/js/corpora.js
/**
	 *  Create the specified index in the private user area.
	 *
	 *  @param displayName	string	Name to show for the index
	 *  @param shortName	string	Internal, technical name that uniquely identifies the index
	 *  @param format		string	Name of the format type for the documents in the index
	 */
Create the specified index in the private user area.
@param displayName  string  Name to show for the index
@param shortName    string  Internal, technical name that uniquely identifies the index
@param format               string  Name of the format type for the documents in the index
Create the specified index in the private user area . @param displayName string Name to show for the index @param shortName string Internal technical name that uniquely identifies the index @param format string Name of the format type for the documents in the index
function createIndex(displayName, shortName, format) {
		if (shortName == null || shortName.length == 0)
			return;
		if (displayName == null)
			return;
		var indexName = getUserId() + ':' + shortName;
		$('#waitDisplay').show();
		$.ajax(blsUrl, {
			'type': 'POST',
			'accept': 'application/json',
			'dataType': 'json',
			'data': {
				'name': indexName,
				'display': displayName,
				'format': format
			},
			'success': function () {
				refreshCorporaList();
				showSuccess('Corpus "' + displayName + '" created.');
			},
			'error': showXHRError('Could not create corpus "' + shortName + '"'),
			'complete': function() {
				$('#waitDisplay').hide();
			}
		});
	}
function createIndex ( displayName , shortName , format ) { if ( shortName == null || shortName . length == 0 ) return ; if ( displayName == null ) return ; var indexName = getUserId ( ) + ':' + shortName ; $ ( '#waitDisplay' ) . show ( ) ; $ . ajax ( blsUrl , { 'type' : 'POST' , 'accept' : 'application/json' , 'dataType' : 'json' , 'data' : { 'name' : indexName , 'display' : displayName , 'format' : format } , 'success' : function ( ) { refreshCorporaList ( ) ; showSuccess ( 'Corpus "' + displayName + '" created.' ) ; } , 'error' : showXHRError ( 'Could not create corpus "' + shortName + '"' ) , 'complete' : function ( ) { $ ( '#waitDisplay' ) . hide ( ) ; } } ) ; }
Create the specified index in the private user area.
Create the specified index in the private user area .
// Prefix the user name because it's a private index // Create the index. /*data*/