The editor remove button isn't working?

The editor remove button isn't working?

llampreallamprea Posts: 10Questions: 6Answers: 0
edited December 2014 in Editor

I initalized it the same way as the standard example :

tableTools: {
        sRowSelect: "os",
        aButtons:[
        { sExtends: "editor_create", editor: editor},
        { sExtends: "editor_edit", editor: editor},
        { sExtends: "editor_remove", editor: editor}
        ]
    }

but after the confirmation window pops up, nothing happens when i click delete, the window just stays open.

I don't have any pre/post delete functions yet, just the basic button initialization.

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Answer ✓

    I don't have any pre/post delete functions yet

    As in the server isn't responding to the delete request? That is probably the issue. Editor expects certain data in return from each request it makes.

    Allan

  • llampreallamprea Posts: 10Questions: 6Answers: 0

    Okay i made a node module that should send back a valid response,
    but it looks like its never called

    remove: {
    "url": "/license_delete",
    "type": "POST",
    "data": currentRowData
    }

  • llampreallamprea Posts: 10Questions: 6Answers: 0

    Okay so i removed a presubmit function i was using to validate input for my create and edit forms, and that seems to work,
    is there a way to get presubmit to ignore delete?

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Answer ✓

    Yes indeed - the third parameter passed into the preSubmit event is the action. It will take the value create, edit or remove. You could just use a simple if condition on that variable to check what action is being taken.

    Allan

This discussion has been closed.