refactoring
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
class BatchCodeSelectInitializer {
|
||||
|
||||
static initialize({batchCodeSelect, batchCodeDetails}) {
|
||||
batchCodeSelect.select2({ minimumInputLength: 4 });
|
||||
batchCodeSelect.on(
|
||||
static initialize({batchCodeSelectElement, batchCodeDetailsElement}) {
|
||||
batchCodeSelectElement.select2({ minimumInputLength: 4 });
|
||||
batchCodeSelectElement.on(
|
||||
'select2:select',
|
||||
function (event) {
|
||||
const batchcode = event.params.data.id;
|
||||
new HistogramView(batchCodeDetails).displayHistogramView(batchcode);
|
||||
new HistogramView(batchCodeDetailsElement).displayHistogramView(batchcode);
|
||||
GoogleAnalytics.click_batchcode(batchcode);
|
||||
});
|
||||
batchCodeSelect.select2('open');
|
||||
batchCodeSelectElement.select2('open');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user