Adding a third Button with a custom behaviour - additionally to Add and Delete
Adding a third Button with a custom behaviour - additionally to Add and Delete
dthunsterblich
Posts: 20Questions: 0Answers: 0
Hello,
I'm using the datatables plugin and the datatables editable plugin and Server-Side Processing. I tried to add a third button without having too much code replicated. The button is supposed to block a row by changing an attributes value i.e. A car is blocked because it is currently in a workshop to get repaired -> So a user can't use this car until the repair is done.
What I want is very similar to the behavior of the delete button. I want to select a row (the car) and press a button (i.e. "Enable / Disable"). This is done with a Foreign Key of a second table (0 = car can be used, 1 = car is damaged, 2 = car has a defect). The row isn't actually gone after disabling a row, it is crossed out after the Ajax request: $(nRow).css({"text-decoration": "line-through"});
Thanks for your help!
dth-unsterblich
I'm using the datatables plugin and the datatables editable plugin and Server-Side Processing. I tried to add a third button without having too much code replicated. The button is supposed to block a row by changing an attributes value i.e. A car is blocked because it is currently in a workshop to get repaired -> So a user can't use this car until the repair is done.
What I want is very similar to the behavior of the delete button. I want to select a row (the car) and press a button (i.e. "Enable / Disable"). This is done with a Foreign Key of a second table (0 = car can be used, 1 = car is damaged, 2 = car has a defect). The row isn't actually gone after disabling a row, it is crossed out after the Ajax request: $(nRow).css({"text-decoration": "line-through"});
Thanks for your help!
dth-unsterblich
This discussion has been closed.
Replies