beyond_canvas 0.15.0.pre → 0.15.1.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/beyond_canvas/base.js +17 -5
- data/app/javascript/beyond_canvas/base.js +4 -5
- data/app/javascript/beyond_canvas/initializers/buttons.js +18 -3
- data/app/javascript/beyond_canvas/initializers/flash.js +0 -1
- data/app/javascript/beyond_canvas/initializers/inputs.js +0 -1
- data/lib/beyond_canvas/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef55151b505d03b5e940bbb09fa64b01bf267426fb5d2b20f25a74a0d4226534
|
4
|
+
data.tar.gz: b2430821affb163c1ffda7cf4611bc924e310cb21cb02d7ef461b88de594385c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fcaa57a073215b62c451b5d325022384ad1a8c1a77ecefa50caf40481150ed1c43e18cc5e92478f19011b15929db3f5b665124c2438f2bcd78f7d48bda384aa
|
7
|
+
data.tar.gz: d8ab25f70ae9821cb23fab3be6f419f00be764281b02632d4527f0023ae2e711b32e8bbb04d3a322ab6affafc992d3b11b2d0d4a37c1f1e404bcbeea9d623d34
|
@@ -2,16 +2,28 @@
|
|
2
2
|
* Warning: This file is auto-generated, do not modify. Instead, make your changes in 'app/javascript/beyond_canvas/' and run `yarn build`
|
3
3
|
*/
|
4
4
|
//= require jquery3
|
5
|
-
//= require jquery_ujs
|
6
5
|
//= require_self
|
7
6
|
|
8
7
|
(function(factory) {
|
9
|
-
typeof define === "function" && define.amd ? define([ "jquery"
|
8
|
+
typeof define === "function" && define.amd ? define([ "jquery" ], factory) : factory();
|
10
9
|
})(function() {
|
11
10
|
"use strict";
|
12
11
|
var SPINNER_ANIMATION_TIMEOUT = 125;
|
13
12
|
(function($) {
|
14
13
|
var onDOMReady = function onDOMReady() {
|
14
|
+
var inputs = $("input, textarea, select").not(":input[type=button], :input[type=submit], :input[type=reset]");
|
15
|
+
inputs.each(function() {
|
16
|
+
var input = $(this);
|
17
|
+
input.bind("invalid", function(e) {
|
18
|
+
if ($(input).is(":hidden")) {
|
19
|
+
e.preventDefault();
|
20
|
+
}
|
21
|
+
$('button[class^="button"]').each(function() {
|
22
|
+
hideSpinner($(this));
|
23
|
+
});
|
24
|
+
enableActionElements();
|
25
|
+
});
|
26
|
+
});
|
15
27
|
$('button[class^="button"]').each(function() {
|
16
28
|
var button = $(this);
|
17
29
|
button.width(button.width());
|
@@ -30,7 +42,7 @@
|
|
30
42
|
disableActionElements();
|
31
43
|
showSpinner($(this));
|
32
44
|
});
|
33
|
-
$(document).
|
45
|
+
$(document).on("ready page:load turbolinks:load", onDOMReady);
|
34
46
|
})(jQuery);
|
35
47
|
function showSpinner(button) {
|
36
48
|
button.width(button.width() + $(".spinner").outerWidth(true));
|
@@ -66,7 +78,7 @@
|
|
66
78
|
$(document).on("click", ".flash", function() {
|
67
79
|
closeAlert();
|
68
80
|
});
|
69
|
-
$(document).
|
81
|
+
$(document).on("ready page:load turbolinks:load", onDOMReady);
|
70
82
|
})(jQuery);
|
71
83
|
function closeAlert() {
|
72
84
|
$(".flash").removeClass("flash--shown").delay(700).queue(function() {
|
@@ -89,6 +101,6 @@
|
|
89
101
|
});
|
90
102
|
});
|
91
103
|
};
|
92
|
-
$(document).
|
104
|
+
$(document).on("ready page:load turbolinks:load", onDOMReady);
|
93
105
|
})(jQuery);
|
94
106
|
});
|
@@ -2,6 +2,22 @@ const SPINNER_ANIMATION_TIMEOUT = 125;
|
|
2
2
|
|
3
3
|
(function($) {
|
4
4
|
const onDOMReady = function () {
|
5
|
+
const inputs = $('input, textarea, select').not(':input[type=button], :input[type=submit], :input[type=reset]');
|
6
|
+
|
7
|
+
inputs.each(function () {
|
8
|
+
var input = $(this);
|
9
|
+
|
10
|
+
input.bind('invalid', function (e) {
|
11
|
+
if ($(input).is(':hidden')) {
|
12
|
+
e.preventDefault();
|
13
|
+
}
|
14
|
+
$('button[class^="button"]').each(function () {
|
15
|
+
hideSpinner($(this));
|
16
|
+
});
|
17
|
+
enableActionElements();
|
18
|
+
});
|
19
|
+
});
|
20
|
+
|
5
21
|
$('button[class^="button"]').each(function () {
|
6
22
|
var button = $(this);
|
7
23
|
|
@@ -32,13 +48,12 @@ const SPINNER_ANIMATION_TIMEOUT = 125;
|
|
32
48
|
});
|
33
49
|
};
|
34
50
|
|
35
|
-
$(document).on('click', '[class^="button"]', function() {
|
51
|
+
$(document).on('click', '[class^="button"]', function () {
|
36
52
|
disableActionElements();
|
37
53
|
showSpinner($(this));
|
38
54
|
});
|
39
55
|
|
40
56
|
$(document)
|
41
|
-
.ready(onDOMReady)
|
42
57
|
.on('ready page:load turbolinks:load', onDOMReady);
|
43
58
|
})(jQuery);
|
44
59
|
|
@@ -67,6 +82,6 @@ function disableActionElements() {
|
|
67
82
|
}
|
68
83
|
function enableActionElements() {
|
69
84
|
$('a, input[type="submit"], input[type="button"], input[type="reset"], button').each(function() {
|
70
|
-
$(this).removeClass(
|
85
|
+
$(this).removeClass('actions--disabled');
|
71
86
|
});
|
72
87
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beyond_canvas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.1.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Unai Abrisketa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: beyond_api
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '5.1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '5.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: colorize
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|