Commit 889a9370 authored by Sam Rose's avatar Sam Rose

Refactor export CSV modal

parent 4a13e4d0
/* eslint-disable no-new */
$(() => {
class ExportCSVModal {
constructor() {
this.$el = $('.issues-export-modal');
this.$btn = $('.csv_download_link');
this.$close = $('.modal-header .close');
this.$modal = $('.issues-export-modal');
this.$downloadBtn = $('.csv_download_link');
this.$closeBtn = $('.modal-header .close');
this.init();
}
init() {
this.$el.modal({ show: false });
this.$btn.on('click', () => this.$el.modal('show'));
this.$close.on('click', () => this.$el.modal('hide'));
this.$modal.modal({ show: false });
this.$downloadBtn.on('click', () => this.$modal.modal('show'));
this.$closeBtn.on('click', () => this.$modal.modal('hide'));
}
}
window.gl = window.gl || {};
gl.ExportCSVModal = new ExportCSVModal();
new ExportCSVModal();
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment