mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #9375 from galaxyproject/edge-backport
[20.01] Backport edge fixes for 20.01
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user