clockpunch 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  // Generated by CoffeeScript 1.4.0
2
2
 
3
3
  /*
4
- Clockpunch 0.1.1
4
+ Clockpunch 0.1.2
5
5
  https://github.com/tablexi/clockpunch
6
6
  */
7
7
 
@@ -34,12 +34,21 @@ https://github.com/tablexi/clockpunch
34
34
  this.$elem.data('timeparser', this);
35
35
  this.parser = new TimeParser(format);
36
36
  if (this.$elem.is('input')) {
37
- this.configure_input(format);
37
+ this.configure_input;
38
38
  } else {
39
- this.$elem.text(this.parser.transform(this.$elem.text()));
39
+ this.configure_span(format);
40
40
  }
41
41
  }
42
42
 
43
+ TimeParsingInput.prototype.configure_span = function(format) {
44
+ var text;
45
+ text = this.$elem.text();
46
+ if (text.replace(/\s/g, '') === '') {
47
+ return;
48
+ }
49
+ return this.$elem.text(this.parser.transform(text));
50
+ };
51
+
43
52
  TimeParsingInput.prototype.configure_input = function(format) {
44
53
  var self;
45
54
  self = this;
@@ -1,3 +1,3 @@
1
1
  module Clockpunch
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
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.1
4
+ version: 0.1.2
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-01 00:00:00.000000000 Z
12
+ date: 2013-07-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sass