Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple List and Controller Improvement #34

Open
damanic opened this issue Dec 18, 2013 · 1 comment
Open

Multiple List and Controller Improvement #34

damanic opened this issue Dec 18, 2013 · 1 comment

Comments

@damanic
Copy link
Contributor

damanic commented Dec 18, 2013

Multiple lists without forms could be simpler to use.

For example if you place multiple lists in the form preview and choose
list_no_form = true
so that you can have them all in the main form. There is no way to easily identify which list is requesting an update from the controller.

By default all ajax updates to the list should submit a post variable that includes the listname.

Eg. Add list_name to data{}

<a href="javascript:;" onclick="return $(this).phpr().post('<?=$this->get_event_handler('on_list_column_click') ?>', {
                    data: { column_name: '<?=$column->db_name ?>', list_name: '<?= $this->list_name ?>' },
                    update: '#<?=$this->list_get_container_id() ?>', 
                    customIndicator: LightLoadingIndicator, 
                    success: function(){ jQuery('#<?=$this->list_get_container_id() ?>').trigger('listUpdated'); }
                }).send();">

We can then easily check for listnames in the controller.

if (post('list_name') == 'my_other_list')
{
$this->list_model_class = 'xEducation_StudentAssignedCourseModule';
...
}
@damanic
Copy link
Contributor Author

damanic commented Dec 18, 2013

also

listReload() is output multiple times if default _list_container used more than once on a page.

Need one listReload function to handle all lists:

listReload(list_name, show_load_indicator){}

or functions made for each list

<?=$this->list_name?>Reload(show_load_indicator){}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant