⚠ In case you've missed it we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This forum is read-only and soon will be archived. ⚠


Racing Chocobo

Member Since 21 Jul 2013
Offline Last Active Dec 26 2013 01:33 PM
-----

Topics I've Started

Do Javascript function after ajax_list finished

29 November 2013 - 01:53 PM

Hi all, I've some problem to the current grocery crud,

I realize that all of the data in the flexigrid table is fetched by ajax_list

which means any function after $(document).ready() will not work at all.

 

Therefore I go through the javascript function that called the ajax list, and add and extra function that will called my function in my view page.

 

(The javacript file is flexigrid.js, inside a $('.filtering_form').submit(function(){ .... }); )

 

However, this will be restricted to the function need to be named the same as what I named in the view page.

 

May the latest function can add a new implement function that let the user to self define a function that need to be implement after the ajax function finished (the success callback) ?

 

Many thanks for it!
Thank you very much


Do Javascript function after ajax_list finished

25 November 2013 - 12:56 PM

Hi, I've some trouble with the ajax_list function of the grocerycrud.

I realize that the grocery crud will do ajax once after loading the page, which will do two ajax:

1. ajax_list_info

2. ajax_list

 

My question is, how can I detect if the ajax_list is completed?

 

Since its always run at the last, that the function inside $(document).ready() is not work at all...

 

Thank you very much


Dropdown list in read view

13 November 2013 - 03:25 PM

Hi all, I just update to the latest version of grocery crud and find there were some new things and function of it, and one of them is there is a read view button additionally.

However, I met some problem here, while I set a field into a dropdown list, something like this

$stage = array('Buy', 'Confirm', 'Send', 'Delete');
$crud->field_type('stage', 'dropdown', $stage);

the dropdown list only work in add and edit view, but not works inside the read view (it still show the origin value)

 

I realize it only works if I used the set_relation to generate the dropdown list, but it need an additional table for it, which is redundant in this case.

 

So any solution to solve this problem?

Thank you very much!


Dropdown list in read view

13 November 2013 - 03:24 PM

Hi all, I just update to the latest version of grocery crud and find there were some new things and function of it, and one of them is there is a read view button additionally.

However, I met some problem here, while I set a field into a dropdown list, something like this

$stage = array('Buy', 'Confirm', 'Send', 'Delete');
$crud->field_type('stage', 'dropdown', $stage);

the dropdown list only work in add and edit view, but not works inside the read view (it still show the origin value)

 

I realize it only works if I used the set_relation to generate the dropdown list, but it need an additional table for it, which is redundant in this case.

 

So any solution to solve this problem?

Thank you very much!


Set relation between multiple tables

03 November 2013 - 05:22 AM

Hi, I'm trying to find out how to do this join relation using grocery crud

I've three tables, 'inventory', 'item', 'item_name'

(below is the database schema)

Attached File  db.PNG   13.37K   1553 downloads

 

What I'm trying to implement is when I want to add a record or browse all of the record in the inventory, I can get the "name" of the item from item_name table

 

So when I'm adding new record of the inventory, the field item of this can become dropdown list and the list option is the name of the item, not the item.id

 

If I use the set_relation(item, item, id), I can only get the id of the item instead of the name of the item

I donno how to make another set_relation to the third table (ItemName) using grocery_crud.

 

Any solution about this question?

 

Thank you very much^^