jquery-tabledit
jquery-tabledit copied to clipboard
Use enter key to confirm and remove confirm button
How can I remove the confirm button which is not useful in this case?
Following the code:
$('#table').Tabledit({
url: 'url',
saveButton: false,
autoFocus: false,
buttons: {
edit: {
class: 'btn btn-primary',
html: 'EDIT',
action: 'edit'
},
},
What i would do is, adding a hidden class to the confirm button ( in the buttons config part) and then edit the delete function to mimic the confirm.
Try to edit theese lines:
$table.on('click', 'button.tabledit-confirm-button', function(event) {
to
$table.on('click', 'button.tabledit-delete-button', function(event) {
And the current: $table.on('click', 'button.tabledit-delete-button', function(event) { to $table.on('click', 'button.tabledit-delete-button_old', function(event) {
I think you will get what you want by doing this.
PLEASE BACKUP FIRST