manchiang / jquery-datatables-editable

Automatically exported from code.google.com/p/jquery-datatables-editable
0 stars 0 forks source link

Enable additional options when deleting #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using the latest SVN, it would be nice to be able to pass in additional 
options, besides the id of the element, when deleting something.  

I have a common "delete.php" file that looks for a hidden var in the POST 
variable which guides it through the appropriate logic path dictating what is 
being deleted (item, manufacturer, etc).  

Enabling additional options for the deletion, maybe something along the lines 
of:
deleteOptions : { {"ref","item"} }

(where "ref" is the variable name and "item" is the value)

Would enable this functionality. The additional information could the be 
appended to the "data" variable in _fnDeleteRow.

What version of the product are you using? 
1.2.4

Original issue reported on code.google.com by dmol...@gmail.com on 6 Jun 2011 at 5:00

GoogleCodeExporter commented 9 years ago
God idea. I have added oDeleteParemeters property in the initialization call. 
If you want to pass type and name parameters below is example:
                                    oDeleteParameters: {
type: "delete-record",
name:"TEST",
auto: function(){ return confirm("Do you want to automatically delete all?");}
}

Also you can put a function that can do some simple processing in the example 
above auto will be either true or false depending on the user choice.

I hope that this is what you need.

Regards,
Jovan

Original comment by joc...@gmail.com on 6 Jun 2011 at 8:16

GoogleCodeExporter commented 9 years ago
Perfect, thank you

Original comment by dmol...@gmail.com on 6 Jun 2011 at 8:51

GoogleCodeExporter commented 9 years ago
I'm closing this issue.

Original comment by joc...@gmail.com on 11 Jun 2011 at 8:58