public/javascripts/inputex/js/widgets/dtInPlaceEdit.js
function(e) {
		
		// If insertWithDialog
		if(this.options.insertWithDialog) {
			inputEx.widget.dtInPlaceEdit.superclass.onInsertButton.call(this, e);
			return;
		}
		
		var tbl = this.datatable;
		
		// Insert a new row
      tbl.addRow({});

		// Select the new row
      var lastRow = tbl.getLastTrEl();
		tbl.selectRow(lastRow);
				
		// Get the last cell's inner div node
		var lastIndex = lastRow.childNodes.length - 1;
		lastCell = lastRow.childNodes[lastIndex].childNodes[0];
		
		// Empty the cell (removing "delete")
		lastCell.innerHTML = '';
		
		// Create an "Add" Button
		this.addButton = inputEx.cn('input', {type:'button',value:inputEx.messages.addButtonText}, null, null);
      Event.addListener(this.addButton, 'click', this.onAddButton, this, true);
      lastCell.appendChild(this.addButton);
		
		// Create a "Cancel" Button
		this.deleteButton = inputEx.cn('input', {type:'button',value:inputEx.messages.cancelText}, null, null);
		Event.addListener(this.deleteButton, 'click', this.onCancelButton, this, true);
      lastCell.appendChild(this.deleteButton);

		// Disable the "Insert Button"
		this.insertButton.disabled = true ;
	}
function(e) {
		
		// If insertWithDialog
		if(this.options.insertWithDialog) {
			inputEx.widget.dtInPlaceEdit.superclass.onInsertButton.call(this, e);
			return;
		}
		
		var tbl = this.datatable;
		
		// Insert a new row
      tbl.addRow({});

		// Select the new row
      var lastRow = tbl.getLastTrEl();
		tbl.selectRow(lastRow);
				
		// Get the last cell's inner div node
		var lastIndex = lastRow.childNodes.length - 1;
		lastCell = lastRow.childNodes[lastIndex].childNodes[0];
		
		// Empty the cell (removing "delete")
		lastCell.innerHTML = '';
		
		// Create an "Add" Button
		this.addButton = inputEx.cn('input', {type:'button',value:inputEx.messages.addButtonText}, null, null);
      Event.addListener(this.addButton, 'click', this.onAddButton, this, true);
      lastCell.appendChild(this.addButton);
		
		// Create a "Cancel" Button
		this.deleteButton = inputEx.cn('input', {type:'button',value:inputEx.messages.cancelText}, null, null);
		Event.addListener(this.deleteButton, 'click', this.onCancelButton, this, true);
      lastCell.appendChild(this.deleteButton);

		// Disable the "Insert Button"
		this.insertButton.disabled = true ;
	}
function ( e ) { // If insertWithDialog if ( this . options . insertWithDialog ) { inputEx . widget . dtInPlaceEdit . superclass . onInsertButton . call ( this , e ) ; return ; } var tbl = this . datatable ; // Insert a new row tbl . addRow ( { } ) ; // Select the new row var lastRow = tbl . getLastTrEl ( ) ; tbl . selectRow ( lastRow ) ; // Get the last cell's inner div node var lastIndex = lastRow . childNodes . length - 1 ; lastCell = lastRow . childNodes [ lastIndex ] . childNodes [ 0 ] ; // Empty the cell (removing "delete") lastCell . innerHTML = '' ; // Create an "Add" Button this . addButton = inputEx . cn ( 'input' , { type : 'button' , value : inputEx . messages . addButtonText } , null , null ) ; Event . addListener ( this . addButton , 'click' , this . onAddButton , this , true ) ; lastCell . appendChild ( this . addButton ) ; // Create a "Cancel" Button this . deleteButton = inputEx . cn ( 'input' , { type : 'button' , value : inputEx . messages . cancelText } , null , null ) ; Event . addListener ( this . deleteButton , 'click' , this . onCancelButton , this , true ) ; lastCell . appendChild ( this . deleteButton ) ; // Disable the "Insert Button" this . insertButton . disabled = true ; }
When clicking on the "insert" button to add a new row
When clicking on the insert button to add a new row