clockpunch 0.1.9 → 0.1.10

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
  SHA1:
3
- metadata.gz: f8af745a5db71ec5794300aa7317a7aab6fcf8c5
4
- data.tar.gz: 9c7d5d57657621ba13eccbb27c666803bae24f52
3
+ metadata.gz: aeca783abda9774cf6ecfbd361e3e75fca0e0145
4
+ data.tar.gz: 6512f18cfcea4658fb7f050b7f53a2066d68be44
5
5
  SHA512:
6
- metadata.gz: b8c3f1b0a38d675ccd5739c95b66d14a8f64c2844ecb847e12c90924c87eaaef428c55e70a039427e4cdda1519a943beb7e024ce26374e85df88340e8a15ce80
7
- data.tar.gz: 31230f9e7ca0bf3fdd22c9440713724f2abdb109100753c9085d4fe5c06ffc3fda3928e37de567489f0edfd031c402f478fdfef73718a31f7387b9752476ca3f
6
+ metadata.gz: d3b1027604b68187921f46b17102544280c3d09c289aa6ac77e85369b5a06e342b52d246122871622a232d9de092c446fd3db28d7f37c61ac36c3c3871fd0074
7
+ data.tar.gz: cc6983352606aaca5d0a2f9aa63bb0f9af315ea4b9db617f0c2492e9c76b54cfbcb1fefafb3115ee818c056e3e61e73a400ff989e4baa5ad7d320bed90e99784
@@ -1,5 +1,18 @@
1
1
  # Clockpunch Changelog
2
2
 
3
+ ## Version 0.1.10 (May 10, 2017)
4
+
5
+ * Allow setting the hidden field directly and have it update the display field
6
+ with `$("[name=myfield]").val(45).trigger("change")`
7
+
8
+ ## Version 0.1.9 (January 29, 2016)
9
+
10
+ * Fix errors if `clockpunch` is applied to the same element multiple times
11
+
12
+ ## Version 0.1.8 (September 24, 2015)
13
+
14
+ * Support Rails 4
15
+
3
16
  ## Version 0.1.7 (August 1, 2013)
4
17
 
5
18
  * Specify format via data-format attribute
@@ -72,6 +72,15 @@ https://github.com/tablexi/clockpunch
72
72
  var field_name;
73
73
  field_name = this.$elem.attr('name');
74
74
  this.$hidden_field = $("<input type=\"hidden\" />").attr('name', field_name);
75
+ this.$hidden_field.change((function(_this) {
76
+ return function() {
77
+ var new_value;
78
+ new_value = _this.parser.from_minutes(_this.$hidden_field.val());
79
+ if (new_value !== _this.$elem.val()) {
80
+ return _this.$elem.val(new_value);
81
+ }
82
+ };
83
+ })(this));
75
84
  this.$elem.after(this.$hidden_field);
76
85
  return this.$elem.attr('name', field_name + "_display");
77
86
  };
@@ -1,3 +1,3 @@
1
1
  module Clockpunch
2
- VERSION = "0.1.9"
2
+ VERSION = "0.1.10"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clockpunch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Hanggi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-29 00:00:00.000000000 Z
11
+ date: 2017-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass
@@ -118,9 +118,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  version: '0'
119
119
  requirements: []
120
120
  rubyforge_project:
121
- rubygems_version: 2.4.8
121
+ rubygems_version: 2.5.1
122
122
  signing_key:
123
123
  specification_version: 4
124
124
  summary: Calculate durations from text input
125
125
  test_files: []
126
- has_rdoc: