Custom delete button

Custom delete button

nskwortsownskwortsow Posts: 120Questions: 0Answers: 0
edited November 2012 in General
Hi,

I want to create custom cancel/save/delete buttons.

in the "fnInitComplete" call, I configure editor.buttons.

How should I configure a delete button? The Save and Cancel seem to work.

[code]
{
"label": "Delete",
"className":"btn btn-inverse",
"fn": function () {
this.message( "Are you sure you want to remove this row?" );
this.remove( row_to_delete, 'Delete row', {
"label": "Confirm",
"fn": function () { this.submit(); }
} );
}
}
[/code]

Kind regards,

Nathan

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Hi Nathan,

    I'm a little confused by that - so when the display is open you have a button which has 'delete' in it, when clicked you want it to alter the old display to a 'remove' box which in turn sets it own buttons? Is that right? I looks like it should actually work okay to me - although I must confess that's not something I've tried. What does happen?

    Allan
  • nskwortsownskwortsow Posts: 120Questions: 0Answers: 0
    Hi Allan,
    The edit display needs to contain three buttons:

    Cancel (close edit modal)
    Delete
    Save

    Cancel and Save work, but Delete doesn't. Am I triggering the function correctly?

    Kind regards,

    Nathan
This discussion has been closed.