Merge pull request #9375 from galaxyproject/edge-backport

[20.01] Backport edge fixes for 20.01
This commit is contained in:
Marius van den Beek
2020-02-18 10:55:52 +01:00
committed by GitHub
3 changed files with 28 additions and 18 deletions
+17 -13
View File
@@ -1,4 +1,5 @@
import Backbone from "backbone";
import IMask from "imask";
import Utils from "utils/utils";
@@ -23,20 +24,23 @@ const View = Backbone.View.extend({
this.$text = this.$(".ui-form-slider-text");
this.$slider = this.$(".ui-form-slider-element");
// add text field event
this.$text
.on("change", e => {
this.value(e.currentTarget.value);
})
.on("input", e => {
const input = e.currentTarget;
if (this._isParameter(input.value)) {
return;
} else if (!this.model.get("precise")) {
input.value = input.value.split(".")[0];
IMask(this.$text[0], {
mask: value => {
if (this._isParameter(value)) {
return true;
}
input.value = input.value.replace(/[^0-9eE.-]/g, "");
});
if (!this.model.get("precise")) {
if (value != value.split(".")[0]) {
return false;
}
}
return value == value.replace(/[^0-9eE.-]/g, "");
}
});
this.$text[0].addEventListener("change", e => {
this.value(e.currentTarget.value);
});
// build slider, cannot be rebuild in render
const opts = this.model.attributes;
+5
View File
@@ -36,9 +36,14 @@ module.exports = (env, argv) => {
// Using babel-plugin-rewire to handle dependency mocking since webpack 4
// exports immutable bindings for ES modules but we still need a way to
// overwrite dependencies during unit-testing.
//
// Additionally, set exclude for babel-loader to completely ignore *all*
// node-modules, without our exceptions to support IE as in parent webpack
// config.
wpConfig.module.rules = wpConfig.module.rules.map(rule => {
if (rule.loader == "babel-loader") {
rule.exclude = [/(node_modules\/)/]
rule.options.plugins.push("rewire");
}
return rule;
+6 -5
View File
@@ -66,11 +66,12 @@ module.exports = (env = {}, argv = {}) => {
},
{
test: /\.js$/,
// Pretty sure we don't want anything except node_modules here
exclude: [
/(node_modules\/(?!(handsontable)\/)|bower_components)/,
libsBase
],
/*
* Babel transpile excludes for:
* - all node_modules except for handsontable, bootstrap-vue
* - statically included libs (like old jquery plugins, etc.)
*/
exclude: [/(node_modules\/(?!(handsontable|bootstrap-vue)\/))/, libsBase],
loader: "babel-loader",
options: {
cacheDirectory: true,