disable the update action in a related table view

A place for users and developers of the Xataface to discuss and receive support.

disable the update action in a related table view

Postby razzetto » Mon Jul 23, 2012 5:00 am

Hi steve. Hi all.

I'm trying to remove the checkboxes near the records everywhere in my app. anyway i can't get rid of checkboxes in related tables.

first i set in my conf.ini fiel:
Code: Select all
[_prefs]
   disable_select_rows=1


then i tried to remove every possible action that could make the checkboxes appear.
the problem is that i can't remove the update_selected (related list) action.

sure i'm missing some detail..

i post a fragment of my permissions.ini (i'm trying to disable this action for the edit role)


Code: Select all
[READ ONLY]
   view in rss = 0
   view = 1
   link = 1
   list = 1
   calendar = 0
   view xml = 0
   show all = 1
   find = 0
   navigate = 1
   ajax_load = 1
   find_list = 1
   find_multi_table = 1
   rss = 0
   export_csv = 0
   export_xml = 0
   export_json = 0
   view related records = 1
   related records feed = 0
   expandable = 0


[EDIT extends READ ONLY]
   edit = 1
   add new related record = 1
   add existing related record = 0
   add new record = 1
   remove related record = 0
   reorder_related_records = 0
   import = 0
   translate = 0
   new = 1
   ajax_save = 0
   ajax_form = 0
   history = 0
   edit_history = 0
   copy = 0
   update_set = 0
   update_selected = 0
   select_rows = 0
   export_xml = 0
    export_json = 0
   rss = 0
   view xml = 0
   export_csv = 0



i could get rid of update action just disabling 'edit' but i really need that action for the ehm... edit role :)

thanks for any suggestion
razzetto
 
Posts: 16
Joined: Thu Jul 12, 2012 6:58 pm

Re: disable the update action in a related table view

Postby shannah » Mon Jul 23, 2012 10:03 am

The checkboxes in the related list are shown only if there are actions of the category "selected_related_result_actions" that are available to be displayed. If you disable these actions, the checkboxes will not show up.

One way to disable these actions is to override them in your actions.ini file. Steps I would take:

Find all of the actions in in the Xataface actions.ini file that are in the category "selected_related_result_actions". For each of these actions, add the following to your application's actions.ini file:
[action_name > action_name]
category=""

(I.e. for the update_selected_related action it would be:
[update_selected_related > update_selected_related]
category=""

What this does is create a new action named update_selected_related that inherits all properties from the old action named update_selected_related but sets the category to the empty string. This way it won't show up in the selected_related_result_actions category.


-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: disable the update action in a related table view

Postby razzetto » Tue Jul 24, 2012 1:45 pm

thanks, again, steve.
razzetto
 
Posts: 16
Joined: Thu Jul 12, 2012 6:58 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 22 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved