public/javascripts/inputex/build/inputex.js
function(e) {
	      
	   Event.stopEvent(e);
	   
	   // Prevent removing a field if already at minItems
	   if( lang.isNumber(this.options.minItems) && this.subFields.length <= this.options.minItems ) {
	      return;
	   }
	      
	   // Get the wrapping div element
	   var elementDiv = Event.getTarget(e).parentNode;
	   
	   // Get the index of the subField
	   var index = -1;
	   
	   var subFieldEl = elementDiv.childNodes[this.options.useButtons ? 1 : 0];
	   for(var i = 0 ; i < this.subFields.length ; i++) {
	      if(this.subFields[i].getEl() == subFieldEl) {
	         index = i;
	         break;
	      }
	   }
	      
	   // Remove it
	   if(index != -1) {
	      this.removeElement(index);
	   }
		
		// Note: not very efficient
		this.resetAllNames();      
	
	   // Fire the updated event
	   this.fireUpdatedEvt();
	}
function(e) {
	      
	   Event.stopEvent(e);
	   
	   // Prevent removing a field if already at minItems
	   if( lang.isNumber(this.options.minItems) && this.subFields.length <= this.options.minItems ) {
	      return;
	   }
	      
	   // Get the wrapping div element
	   var elementDiv = Event.getTarget(e).parentNode;
	   
	   // Get the index of the subField
	   var index = -1;
	   
	   var subFieldEl = elementDiv.childNodes[this.options.useButtons ? 1 : 0];
	   for(var i = 0 ; i < this.subFields.length ; i++) {
	      if(this.subFields[i].getEl() == subFieldEl) {
	         index = i;
	         break;
	      }
	   }
	      
	   // Remove it
	   if(index != -1) {
	      this.removeElement(index);
	   }
		
		// Note: not very efficient
		this.resetAllNames();      
	
	   // Fire the updated event
	   this.fireUpdatedEvt();
	}
function ( e ) { Event . stopEvent ( e ) ; // Prevent removing a field if already at minItems if ( lang . isNumber ( this . options . minItems ) && this . subFields . length <= this . options . minItems ) { return ; } // Get the wrapping div element var elementDiv = Event . getTarget ( e ) . parentNode ; // Get the index of the subField var index = - 1 ; var subFieldEl = elementDiv . childNodes [ this . options . useButtons ? 1 : 0 ] ; for ( var i = 0 ; i < this . subFields . length ; i ++ ) { if ( this . subFields [ i ] . getEl ( ) == subFieldEl ) { index = i ; break ; } } // Remove it if ( index != - 1 ) { this . removeElement ( index ) ; } // Note: not very efficient this . resetAllNames ( ) ; // Fire the updated event this . fireUpdatedEvt ( ) ; }
Called when the user clicked on a delete button.
@param {Event} e The original click event
Called when the user clicked on a delete button .