bullet_train 1.7.12 → 1.7.13

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: 1cf4dc94c458016ed898f35f0e449ed501f10e13699105e835c2f658d63daae8
4
- data.tar.gz: ecbaae25c2d09cf4e381c73c96a7d63bcadc828da8eab69dd61d3768d4fb31bd
3
+ metadata.gz: 8b1643d265ac5b803e16a2409f8f2d92c73aa133c293f72bed124f62c62963d3
4
+ data.tar.gz: 4fadb183db1dbfcd209e27dfbfdb2cf95e542febf82a53cf46664ee41c5523d5
5
5
  SHA512:
6
- metadata.gz: 57e3131560e8f376692ff5a162d6cf8e6cd1e228875a71a04ea2f92278b40a56bb6f5bc7e5aceeb29749b48a721cb9637f85c1c296609869e93929893b670a31
7
- data.tar.gz: e1ac7c6143ea697e980ca51dabeb959a4fcbf2099f19e69c954768b7e5153faa20a6395b8e80c26ddc04872f6cda967d73c004f59e6cf38aa1f22d94fd76211f
6
+ metadata.gz: 07fc59fe7a9a7723c4e80f1f21be4e5b94b82f4157b01aaee4491ea3d2eec2965107a3e111fd6d98cd9d948f4cfd8e5228bdc652f3cbd88e9ba6bb0ae3e06c47
7
+ data.tar.gz: 5d60f0e4821e7e5172346c2e5b2287690e2c5fd41b17f3ccadd7a335c3cee989465c887018a963c3a552e9cea947fae430dba18251030db4a312a92bc1e44153
@@ -48,7 +48,7 @@
48
48
  <% end %>
49
49
 
50
50
  <script type="text/javascript">
51
- document.addEventListener('turbo:load', function() {
51
+ function btSetUserTimeZone(){
52
52
 
53
53
  // generate a mapping of js timezones compared to rails timezones.
54
54
  var jsTimezoneMapping = {
@@ -67,10 +67,17 @@
67
67
  var option = document.querySelector("#user_time_zone option[value=\"" + railsValue + "\"]")
68
68
  if(option){
69
69
  document.querySelector("#user_time_zone").value = railsValue;
70
+
71
+ // update the select2 as well. is there a better way to handle this?
72
+ // why don't _they_ handle this for us?
73
+ var select2 = document.querySelector("#select2-user_time_zone-container");
74
+ select2.attributes.title = option.text;
75
+ select2.textContent = option.text;
70
76
  }else{
71
77
  console.log('We were unable to find a timezone matching the rails detected value of ', railsValue);
72
78
  }
73
79
  }
74
80
 
75
- });
81
+ }
82
+ document.addEventListener('turbo:load', btSetUserTimeZone, { once: true });
76
83
  </script>
@@ -1,3 +1,3 @@
1
1
  module BulletTrain
2
- VERSION = "1.7.12"
2
+ VERSION = "1.7.13"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.12
4
+ version: 1.7.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-13 00:00:00.000000000 Z
11
+ date: 2024-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard