mistercrunch closed pull request #5938: use es6 import in common.js
URL: https://github.com/apache/incubator-superset/pull/5938
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/superset/assets/src/common.js b/superset/assets/src/common.js
index 779a1692e8..69c2556844 100644
--- a/superset/assets/src/common.js
+++ b/superset/assets/src/common.js
@@ -4,18 +4,17 @@ import airbnb from './modules/colorSchemes/airbnb';
import categoricalSchemes from './modules/colorSchemes/categorical';
import lyft from './modules/colorSchemes/lyft';
import { getInstance } from './modules/ColorSchemeManager';
+import { toggleCheckbox } from './modules/utils';
// Everything imported in this file ends up in the common entry file
// be mindful of double-imports
-const utils = require('./modules/utils');
-
$(document).ready(function () {
$(':checkbox[data-checkbox-api-prefix]').change(function () {
const $this = $(this);
const prefix = $this.data('checkbox-api-prefix');
const id = $this.attr('id');
- utils.toggleCheckbox(prefix, '#' + id);
+ toggleCheckbox(prefix, '#' + id);
});
// for language picker dropdown
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]