I am using RESTful table from AUI and what to configure deleteConfiguration message which is shown, when user clicks on Delete for a row.
In the documentation it says deleteConfirmation is boolean, but learned from here, that actually a function needs to be set for deleteConfirmation e.g.
deleteConfirmation : function () { return "Are you sure?"; }
When adding a <input type="submit" value"OK"/> I can also add an OK button, but how to add a Cancel button?
Does anyone has some example code?
Reviewing aui-experimental.js it looks like RESTful table is looking for a form.submit element and attaches the corresponding OK action to it.
a.element.find("form").submit(_.bind(function(b){...
And it is looking for an element with CSS class cancel and attaches the corresponding HIDE action to it.
a.element.find(".cancel").click(function(){a.hide()});
That means the HTML should look like this.
deleteConfirmation: function(){
return 'Are you sure? <form><button class="aui-button aui-button-primary">Okay</button></form>' +
'<button class="aui-button aui-button-link cancel">Cancel</button>';
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.