extra option button in Editor
extra option button in Editor
carlosaviles
Posts: 21Questions: 0Answers: 0
I have a doubt about the use of admin premium templates that are using css for Editor. In these templates appears an extra option in the edit mode, for ex: approve, suspend, etc.. So I suppose that it´s possible to send extra information to the server with php and retrieve the data in this table and insert or edit the data in others tables too at same time. There is any example about this? What is the best way to do this?
This discussion has been closed.
Replies
[code]
"aButtons": [
{ "sExtends": "editor_create", "editor": editor },
{ "sExtends": "editor_edit", "editor": editor },
{
"sExtends": "editor_edit",
"editor": editor,
"sButtonText": "Approve",
"fnClick": function ( button, config ) {
var tt = this;
var rows = tt.fnGetSelected();
// use the Editor API to send an edit without showing the edit window
editor.edit( rows[0], '', [], false );
editor.set( 'status', 'approves' );
editor.submit( function (json) {
tt.fnSelectNone();
} );
}
}
]
[/code]
Allan
I have noticed it only works for the first time. Cookies?
Then you either need to make an another Ajax call to update the second table, or modify the server-side script that is processing the data to also update the second table.
> I have noticed it only works for the first time. Cookies?
I don't understand I'm afraid. It should work every time. I would need to see a test case to understand further.
Allan
I have notice that the bug is because you have: editor.set this update the field but doesn´t insert anything. What do you think about?
Thanks for your support this week. Best regards :-)