clockpunch 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md ADDED
@@ -0,0 +1,10 @@
1
+ # Clockpunch Changelog
2
+
3
+ ## Version 0.1.4 (July 10, 2013)
4
+
5
+ * Support input type="number"
6
+
7
+ ## Version 0.1.3 (July 2, 2013)
8
+
9
+ * Can replace <span> or other elements with the specified format
10
+ * Allow format as an option
@@ -1,7 +1,7 @@
1
1
  // Generated by CoffeeScript 1.4.0
2
2
 
3
3
  /*
4
- Clockpunch 0.1.3
4
+ Clockpunch 0.1.4
5
5
  https://github.com/tablexi/clockpunch
6
6
  */
7
7
 
@@ -52,6 +52,7 @@ https://github.com/tablexi/clockpunch
52
52
  var self;
53
53
  self = this;
54
54
  this.create_hidden_field(format);
55
+ this.ensure_elem_is_text();
55
56
  this.$elem.change(function() {
56
57
  var $this, minutes;
57
58
  $this = $(this);
@@ -71,6 +72,17 @@ https://github.com/tablexi/clockpunch
71
72
  return this.$elem.attr('name', "" + field_name + "_display");
72
73
  };
73
74
 
75
+ TimeParsingInput.prototype.ensure_elem_is_text = function() {
76
+ var new_elem;
77
+ if (this.$elem.is('[type=text]')) {
78
+ return;
79
+ }
80
+ new_elem = this.$elem.clone(true);
81
+ new_elem.attr('type', 'text');
82
+ this.$elem.replaceWith(new_elem);
83
+ return this.$elem = new_elem;
84
+ };
85
+
74
86
  TimeParsingInput.prototype.create_tooltip = function() {
75
87
  var $wrapper, self;
76
88
  self = this;
@@ -1,3 +1,3 @@
1
1
  module Clockpunch
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clockpunch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-02 00:00:00.000000000 Z
12
+ date: 2013-07-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sass
@@ -99,6 +99,7 @@ extensions: []
99
99
  extra_rdoc_files: []
100
100
  files:
101
101
  - .gitignore
102
+ - CHANGELOG.md
102
103
  - Gemfile
103
104
  - Gemfile.lock
104
105
  - LICENSE.txt