PaulV888
Member
Hi,
I was playing with list JavaScript based on this Wiki the other day and noticed
1) That the added event is fired for all your list on the current page. E.g. I have fabrik_list_1 and fabrik_list_2 on the page and create a list_1.js with a
Fabrik.addEvent('fabrik.list.loaded',function(list) then this get called for list 1 as well as for list 2.
An easy workaroud is to hardcode the expected id in your list_1.js and check this against list.id However is this a bug or a feature? I.e. should we add something to the Wiki or update the code?
2) The updaterows event comes without any context, which seems to make sense looking at line 1324 in list.js
There is no ", [this, data]" like the update event on the next line. Basically same question on this.
Regards,
Paul
I was playing with list JavaScript based on this Wiki the other day and noticed
1) That the added event is fired for all your list on the current page. E.g. I have fabrik_list_1 and fabrik_list_2 on the page and create a list_1.js with a
Fabrik.addEvent('fabrik.list.loaded',function(list) then this get called for list 1 as well as for list 2.
An easy workaroud is to hardcode the expected id in your list_1.js and check this against list.id However is this a bug or a feature? I.e. should we add something to the Wiki or update the code?
2) The updaterows event comes without any context, which seems to make sense looking at line 1324 in list.js
Code:
Fabrik.fireEvent('fabrik.list.updaterows');
Regards,
Paul