@epages/beyond_canvas
Advanced tools
Comparing version 0.2.0-pre to 0.2.1-pre
@@ -5,7 +5,6 @@ /* | ||
//= require jquery3 | ||
//= require jquery_ujs | ||
//= require_self | ||
(function(factory) { | ||
typeof define === "function" && define.amd ? define([ "jquery", "jquery-ujs" ], factory) : factory(); | ||
typeof define === "function" && define.amd ? define([ "jquery" ], factory) : factory(); | ||
})(function() { | ||
@@ -16,2 +15,15 @@ "use strict"; | ||
var onDOMReady = function onDOMReady() { | ||
var inputs = $("input, textarea, select").not(":input[type=button], :input[type=submit], :input[type=reset]"); | ||
inputs.each(function() { | ||
var input = $(this); | ||
input.bind("invalid", function(e) { | ||
if ($(input).is(":hidden")) { | ||
e.preventDefault(); | ||
} | ||
$('button[class^="button"]').each(function() { | ||
hideSpinner($(this)); | ||
}); | ||
enableActionElements(); | ||
}); | ||
}); | ||
$('button[class^="button"]').each(function() { | ||
@@ -35,3 +47,3 @@ var button = $(this); | ||
}); | ||
$(document).ready(onDOMReady).on("ready page:load turbolinks:load", onDOMReady); | ||
$(document).on("ready page:load turbolinks:load", onDOMReady); | ||
})(jQuery); | ||
@@ -72,3 +84,3 @@ function showSpinner(button) { | ||
}); | ||
$(document).ready(onDOMReady).on("ready page:load turbolinks:load", onDOMReady); | ||
$(document).on("ready page:load turbolinks:load", onDOMReady); | ||
})(jQuery); | ||
@@ -96,4 +108,4 @@ function closeAlert() { | ||
}; | ||
$(document).ready(onDOMReady).on("ready page:load turbolinks:load", onDOMReady); | ||
$(document).on("ready page:load turbolinks:load", onDOMReady); | ||
})(jQuery); | ||
}); |
@@ -0,1 +1,13 @@ | ||
### v0.15.1.pre | ||
* deprecations | ||
* Remove `jquery-ujs` dependency | ||
* Set bourbon dependency version to `~> 5.1` | ||
* bug-fixes | ||
* Fix Add invalid binding for enabling buttons | ||
* features | ||
* Add ESLint | ||
### v0.15.0.pre | ||
@@ -2,0 +14,0 @@ |
{ | ||
"name": "@epages/beyond_canvas", | ||
"version": "0.2.0-pre", | ||
"version": "0.2.1-pre", | ||
"description": "Open-source framework that provides CSS and JS for apps designed and developed for the online shop software Beyond", | ||
@@ -34,8 +34,8 @@ "keywords": [ | ||
"build": "rollup --config rollup.config.js", | ||
"prepublishOnly": "rm -rf src && cp -R app/javascript/beyond_canvas src && cp -R app/assets/stylesheets/beyond_canvas src/scss" | ||
"prepublishOnly": "rm -rf src && cp -R app/javascript/beyond_canvas src && cp -R app/assets/stylesheets/beyond_canvas src/scss", | ||
"eslint": "eslint ./app/javascript/beyond_canvas" | ||
}, | ||
"dependencies": { | ||
"bourbon": "^7.0.0", | ||
"jquery": "^3.5.1", | ||
"jquery-ujs": "^1.2.2" | ||
"jquery": "^3.5.1" | ||
}, | ||
@@ -45,9 +45,14 @@ "devDependencies": { | ||
"@babel/preset-env": "^7.6.2", | ||
"common-tags": "^1.8.0", | ||
"rollup": "^1.21.4", | ||
"@rollup/plugin-babel": "^5.0.0", | ||
"@rollup/plugin-commonjs": "^11.1.0", | ||
"@rollup/plugin-node-resolve": "^7.1.3", | ||
"common-tags": "^1.8.0", | ||
"eslint": "^7.1.0", | ||
"eslint-config-standard": "^14.1.1", | ||
"eslint-plugin-import": "^2.20.2", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-standard": "^4.0.1", | ||
"rollup": "^1.21.4", | ||
"rollup-plugin-uglify": "^6.0.4" | ||
} | ||
} |
@@ -1,6 +0,5 @@ | ||
import 'jquery' | ||
import 'jquery-ujs' | ||
import 'jquery'; | ||
import './initializers/buttons' | ||
import './initializers/flash' | ||
import './initializers/inputs' | ||
import './initializers/buttons'; | ||
import './initializers/flash'; | ||
import './initializers/inputs'; |
@@ -5,2 +5,18 @@ const SPINNER_ANIMATION_TIMEOUT = 125; | ||
const onDOMReady = function () { | ||
const inputs = $('input, textarea, select').not(':input[type=button], :input[type=submit], :input[type=reset]'); | ||
inputs.each(function () { | ||
var input = $(this); | ||
input.bind('invalid', function (e) { | ||
if ($(input).is(':hidden')) { | ||
e.preventDefault(); | ||
} | ||
$('button[class^="button"]').each(function () { | ||
hideSpinner($(this)); | ||
}); | ||
enableActionElements(); | ||
}); | ||
}); | ||
$('button[class^="button"]').each(function () { | ||
@@ -36,3 +52,3 @@ var button = $(this); | ||
$(document).on('click', '[class^="button"]', function() { | ||
$(document).on('click', '[class^="button"]', function () { | ||
disableActionElements(); | ||
@@ -43,3 +59,2 @@ showSpinner($(this)); | ||
$(document) | ||
.ready(onDOMReady) | ||
.on('ready page:load turbolinks:load', onDOMReady); | ||
@@ -73,4 +88,4 @@ })(jQuery); | ||
$('a, input[type="submit"], input[type="button"], input[type="reset"], button').each(function() { | ||
$(this).removeClass("actions--disabled"); | ||
$(this).removeClass('actions--disabled'); | ||
}); | ||
} |
@@ -17,3 +17,2 @@ (function($) { | ||
$(document) | ||
.ready(onDOMReady) | ||
.on('ready page:load turbolinks:load', onDOMReady); | ||
@@ -20,0 +19,0 @@ })(jQuery); |
@@ -37,4 +37,3 @@ (function($) { | ||
$(document) | ||
.ready(onDOMReady) | ||
.on('ready page:load turbolinks:load', onDOMReady); | ||
})(jQuery); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43700
2
240
13
- Removedjquery-ujs@^1.2.2
- Removedjquery-ujs@1.2.3(transitive)