bundles/org.eclipse.orion.client.ui/web/orion/widgets/input/ComboTextInput.js
function() {
			var value = this.getTextInputValue();
			if (value) {
				var recentEntryArray = this.getRecentEntryArray();
				if (!recentEntryArray) {
					recentEntryArray = [];
				}
				
				var indexOfElement = this._getIndexOfValue(recentEntryArray, value); //check if a duplicate entry exists
				if (0 !== indexOfElement) {
					// element is either not in array, or not in first position
					if (-1 !== indexOfElement) {
						// element is in array, remove it because we want to add it to beginning
						recentEntryArray.splice(indexOfElement, 1);
					}
					
					//add new entry to beginning of array
					recentEntryArray.unshift({
						type: "proposal", //$NON-NLS-0$
						label: value, 
						value: value
					});
					this._storeRecentEntryArray(recentEntryArray);
					
					this._showRecentEntryButton();
				}
			}
		}
function() {
			var value = this.getTextInputValue();
			if (value) {
				var recentEntryArray = this.getRecentEntryArray();
				if (!recentEntryArray) {
					recentEntryArray = [];
				}
				
				var indexOfElement = this._getIndexOfValue(recentEntryArray, value); //check if a duplicate entry exists
				if (0 !== indexOfElement) {
					// element is either not in array, or not in first position
					if (-1 !== indexOfElement) {
						// element is in array, remove it because we want to add it to beginning
						recentEntryArray.splice(indexOfElement, 1);
					}
					
					//add new entry to beginning of array
					recentEntryArray.unshift({
						type: "proposal", //$NON-NLS-0$
						label: value, 
						value: value
					});
					this._storeRecentEntryArray(recentEntryArray);
					
					this._showRecentEntryButton();
				}
			}
		}
function ( ) { var value = this . getTextInputValue ( ) ; if ( value ) { var recentEntryArray = this . getRecentEntryArray ( ) ; if ( ! recentEntryArray ) { recentEntryArray = [ ] ; } var indexOfElement = this . _getIndexOfValue ( recentEntryArray , value ) ; //check if a duplicate entry exists
 if ( 0 !== indexOfElement ) { // element is either not in array, or not in first position
 if ( - 1 !== indexOfElement ) { // element is in array, remove it because we want to add it to beginning
 recentEntryArray . splice ( indexOfElement , 1 ) ; } //add new entry to beginning of array
 recentEntryArray . unshift ( { type : "proposal" , //$NON-NLS-0$
 label : value , value : value } ) ; this . _storeRecentEntryArray ( recentEntryArray ) ; this . _showRecentEntryButton ( ) ; } } }
Adds the value that is in the text input field to the
recent entries in localStorage. Empty and duplicate
values are ignored.
Adds the value that is in the text input field to the recent entries in localStorage . Empty and duplicate values are ignored .