Page 1 of 1

Change default actions buttons

PostPosted: Mon Oct 27, 2008 5:03 am
by guytarr
Hello,

First, i would to say xataface is greeeeeeat !!!

But i m a new user and i have some difficult for easy thing. Let me try to explain (sorry, i m french, with so poor english speaking) :

In the related list view, I want change the default action of buttons and the labels. For the label, no problem, but i don't understand how can i change the default action. I want an easy thing :
When the user click on "update_selected_related", i want directly update a field in the related table (set it from "0" to "1") without going on update page. Same for the remove_selected_related (set it from "0" to "2").

[update_selected_related > update_selected_related]
label="Valider"
description="Valider cette demande"

[remove_selected_related > remove_selected_related]
label="Refuser"
description="Refuser cette demande"


How can i do that ? I have found this topic :
http://xataface.com/forum/viewtopic.php?t=4484#22151

but it was not helpfull for my case...

Thanks you for your help !

PostPosted: Wed Oct 29, 2008 10:02 am
by shannah
Hi Guytarr,

The topic that you found is very close to what you'll need to do. You will need to do this in 3 parts.

1. Create a custom action that allows you to change your desired value.
2. Create a javascript function to post to this custom action.
3. Add an action to the actions.ini file in the category "selected_result_actions" that calls your javascript function.

I can't go too much further than that topic already shows without writing the whole thing. If you want to go through the topic and ask questions about specific points that aren't clear, we could proceed that way.

-Steve