beyond_canvas 0.11.0.pre → 0.11.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/buttons.js +9 -5
- data/lib/beyond_canvas/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9686f3c3662ccc2603e11bbc44bf1a12f05a0e99210f9f5d0177b39a2a0835cb
|
4
|
+
data.tar.gz: c50bf4870be9b69e0af802f435df45bffacafcc93cb10ce225aef2ff50b3d1d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c0ac4d2c4e86adb4dc0690b61eac0cf43d69c51ee98bf65a3b2b4a2c4d1278c2dad5cc5b67309b726b233e3378914204337de77b42548c3c40985d316dbeda3
|
7
|
+
data.tar.gz: dc0912f0ac775b5bdec8be3ccb8fb0c453458c40ec605080ca6ea99815d03a2468803668db64e8f5eebc7db319d5ef688d392b7c816ead36a3134d99ebe0217a
|
@@ -1,3 +1,5 @@
|
|
1
|
+
const SPINNER_ANIMATION_TIMEOUT = 125;
|
2
|
+
|
1
3
|
(function($) {
|
2
4
|
$(document).on('click', '[class^="button"]', function() {
|
3
5
|
disableActionElements();
|
@@ -41,14 +43,16 @@ function showSpinner(button) {
|
|
41
43
|
// Show the spinner
|
42
44
|
setTimeout(function() {
|
43
45
|
button.find('.spinner').css('display', 'flex');
|
44
|
-
},
|
46
|
+
}, SPINNER_ANIMATION_TIMEOUT);
|
45
47
|
}
|
46
48
|
|
47
49
|
function hideSpinner(button) {
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
50
|
+
setTimeout(function () {
|
51
|
+
// Hide the spinner
|
52
|
+
button.find('.spinner').hide();
|
53
|
+
// Adjust the width of the button
|
54
|
+
button.width(button.data('oldWidth'));
|
55
|
+
}, SPINNER_ANIMATION_TIMEOUT);
|
52
56
|
}
|
53
57
|
|
54
58
|
function disableActionElements() {
|
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.11.
|
4
|
+
version: 0.11.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-03-
|
11
|
+
date: 2020-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bourbon
|