markcell / jquery-tabledit

Inline editor for HTML tables compatible with Bootstrap.
http://markcell.github.io/jquery-tabledit/
MIT License
435 stars 208 forks source link

Required help. I want to edit cell on double click not on single click.. #117

Closed Atiquekhan closed 5 years ago

Atiquekhan commented 5 years ago

Single click edit is creating problem and I want when user want to edit he/she should click twice to edit cell. Advance thanks

websitecareio commented 5 years ago

Hi @Atiquekhan

You should be able to do

var defaults = { url: window.location.href, inputClass: 'form-control input-sm', toolbarClass: 'btn-toolbar', groupClass: 'btn-group btn-group-sm', dangerClass: 'danger', warningClass: 'warning', mutedClass: 'text-muted', eventType: 'click', rowIdentifier: 'id', hideIdentifier: false, autoFocus: true, editButton: true, deleteButton: true, saveButton: true, restoreButton: true, buttons: { edit: { class: 'btn btn-sm btn-default', html: '<span class="glyphicon glyphicon-pencil"></span>', action: 'edit' }, delete: { class: 'btn btn-sm btn-default', html: '<span class="glyphicon glyphicon-trash"></span>', action: 'delete' }, save: { class: 'btn btn-sm btn-success', html: 'Save' }, restore: { class: 'btn btn-sm btn-warning', html: 'Restore', action: 'restore' }, confirm: { class: 'btn btn-sm btn-danger', html: 'Confirm' } }, onDraw: function() { return; }, onSuccess: function() { return; }, onFail: function() { return; }, onAlways: function() { return; }, onAjax: function() { return; } };

in the JS file for the script.

Atiquekhan commented 5 years ago

Thank you, it worked.. :+1: