Welcome, Guest
Username: Password: Remember me

TOPIC: Grid Brick option in Item Layout

Grid Brick option in Item Layout 07 Dec 2019 18:42 #15780

  • jonathanbell
  • jonathanbell's Avatar
  • Offline
  • Premium Member
  • Posts: 147
  • Thank you received: 5
  • Karma: 1
Is it possible to include the grid brick layout as part of the item layout, with an option to choose a different table and then the relationship to the item it is within?
The administrator has disabled public write access.

Grid Brick option in Item Layout 08 Dec 2019 15:54 #15781

  • vlemos
  • vlemos's Avatar
  • Online
  • Elite Member
  • Posts: 295
  • Thank you received: 41
  • Karma: 21
Yes, but not sure that all the functionality can be done directly in the builder.
In the ajax call of the view, add a trigger [.trigger(\'change\')] to your select event like this:
$event = 'jQuery("#jform_xxx").val(this.value).trigger(\'change\');';

Then in your JavaScript, add an ajax call to your update method.
jQuery('#jform_file').on('change', function(e){
   jQuery("#_ajax_table").jdomAjax({
      namespace:"[component].[views].ajax.[update_table_method]", 
      vars:{
         variable: [data]
      }
   });
});

In the form, the call you write will return the new table info here.
<div id="_ajax_table">
   table will be loaded here!
</div>

Hope this quick and dirty solution helps you think of whats possible
v
The administrator has disabled public write access.
The following user(s) said Thank You: jonathanbell

Grid Brick option in Item Layout 23 Apr 2020 09:23 #15804

  • jonathanbell
  • jonathanbell's Avatar
  • Offline
  • Premium Member
  • Posts: 147
  • Thank you received: 5
  • Karma: 1
Thanks, I have someone giving this a go as my coding is rubbish.

What I am ultimately trying to achieve on a number of components and forms.

Lets say I have 2 tables with collection and item views. One - Events and the other Actions
Each item in the table called actions relate to specific events. On an Edit view of an event / on a tab called actions, I want to be able to show a table list of all the associated actions for that event. And above that have a bootstrap button to open a modal of the actual list so it can be updated.

I have seen this type of thing on a number of business applications and interested in getting this functionality inside my components.
The administrator has disabled public write access.

Grid Brick option in Item Layout 24 Apr 2020 00:13 #15805

  • vlemos
  • vlemos's Avatar
  • Online
  • Elite Member
  • Posts: 295
  • Thank you received: 41
  • Karma: 21
Are you requesting help in writing this feature or is this a task you wish to commission?
The administrator has disabled public write access.

Grid Brick option in Item Layout: Closed 24 Apr 2020 06:55 #15806

  • jonathanbell
  • jonathanbell's Avatar
  • Offline
  • Premium Member
  • Posts: 147
  • Thank you received: 5
  • Karma: 1
Hi vlemos, all good now. I have someone onto adding this functionality onto one of my components.
Thanks for reaching out. I hope you and everyone else on here are safe and well during this unprecidented time.
The administrator has disabled public write access.
Time to create page: 0.180 seconds

Get Started