Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Critical
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.5
-
Fix Version/s: 4.5
-
Component/s: None
-
Labels:None
Description
Our current implementation of datatables relies too heavily on dom IDs.
The table itself has an id and we use that to initialize it. Some of the column headers also have ids and we use them for sorting.
This causes js breakage when multiple tabs and popups all contain datatables.
The task is to fix our datatables so they either have no ids at all (which is my preferred solution) or else to make the ids much more likely to be unique by making them a concatenation of form-entity-entity_id-etc.
Either way, you should scope all the javascript that deals with datatables so it is limited to the containing form/page. For example most smarty-form js can be scoped like this:
var $form = $("#
{$form.formName}
{literal}");
$('.datatable', $form).doSomething();
Attachments
Issue Links
- is supplemented by
-
CRM-14572 Edit Event Registration: "Fees" block and "Change selections" block aren't retrieved when form is in pop-up mode
- Done/Fixed