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 +4 -4
- data/CHANGELOG.md +13 -0
- data/app/assets/javascripts/clockpunch.js +9 -0
- data/lib/clockpunch/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aeca783abda9774cf6ecfbd361e3e75fca0e0145
|
4
|
+
data.tar.gz: 6512f18cfcea4658fb7f050b7f53a2066d68be44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3b1027604b68187921f46b17102544280c3d09c289aa6ac77e85369b5a06e342b52d246122871622a232d9de092c446fd3db28d7f37c61ac36c3c3871fd0074
|
7
|
+
data.tar.gz: cc6983352606aaca5d0a2f9aa63bb0f9af315ea4b9db617f0c2492e9c76b54cfbcb1fefafb3115ee818c056e3e61e73a400ff989e4baa5ad7d320bed90e99784
|
data/CHANGELOG.md
CHANGED
@@ -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
|
};
|
data/lib/clockpunch/version.rb
CHANGED
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.
|
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:
|
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.
|
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:
|