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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b56d18ef18e7126a4905cf09023dc459eb5676980611c33153a8c2087cf4bb8b
4
- data.tar.gz: eec1d0e477862015dc3c86e44e09caa0b17957dd48ed27a1aafb3e9dfc456fed
3
+ metadata.gz: 9686f3c3662ccc2603e11bbc44bf1a12f05a0e99210f9f5d0177b39a2a0835cb
4
+ data.tar.gz: c50bf4870be9b69e0af802f435df45bffacafcc93cb10ce225aef2ff50b3d1d0
5
5
  SHA512:
6
- metadata.gz: e01cb32b532adbcd00b58135f80afab03449470e9bb62bf62f716179b80f6ce80fe3d1a8fe7c28478f48e1ce9a597a3de2085cac9e0780b703d30003829132ad
7
- data.tar.gz: '0046293b5e7d13a1f1e70a1696697b716cee79f73510b3f153703bacabe3c063804b8104432fd920898455d089e8a1381c82d8a0ae3331a81eb13eeb04d13f91'
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
- }, 125);
46
+ }, SPINNER_ANIMATION_TIMEOUT);
45
47
  }
46
48
 
47
49
  function hideSpinner(button) {
48
- // Hide the spinner
49
- button.find('.spinner').hide();
50
- // Adjust the width of the button
51
- button.width(button.data('oldWidth'));
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() {
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BeyondCanvas
4
- VERSION = '0.11.0.pre'
4
+ VERSION = '0.11.1.pre'
5
5
  end
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.0.pre
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-27 00:00:00.000000000 Z
11
+ date: 2020-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bourbon