RubyApp 0.0.29 → 0.0.30

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- RubyApp (0.0.29)
4
+ RubyApp (0.0.30)
5
5
  BlueCloth
6
6
  chronic
7
7
  chronic_duration
@@ -8,8 +8,8 @@
8
8
  this.sendEvent = function(event) {
9
9
  event.session_id = '#{RubyApp::Session.session_id}';
10
10
  event.now = new Date().toString();
11
- response = $.post(location.href, event);
12
- response
11
+ request = $.post(location.href, event);
12
+ request
13
13
  .success( function(event) {
14
14
  $.each(event.statements, function(index, statement) {
15
15
  eval(statement);
@@ -28,7 +28,7 @@
28
28
  - if date == self.value
29
29
  %td.current
30
30
  = date.day
31
- - elsif date == Date.today
31
+ - elsif date == self.today
32
32
  %td.today
33
33
  %a.day{:href => '', :date => date.strftime}
34
34
  = date.day
@@ -47,14 +47,15 @@ module RubyApp
47
47
 
48
48
  template_path(:all, File.dirname(__FILE__))
49
49
 
50
- attr_accessor :display, :value
50
+ attr_accessor :today, :display, :value
51
51
 
52
52
  event :changed
53
53
 
54
- def initialize
55
- super
56
- @display = Date.today
57
- @value = @display
54
+ def initialize(today = Date.today, display = nil, value = nil)
55
+ super()
56
+ @today = today
57
+ @display = display || today
58
+ @value = value || today
58
59
  end
59
60
 
60
61
  def display_first_date
@@ -14,7 +14,7 @@ module RubyApp
14
14
 
15
15
  template_path(:all, File.dirname(__FILE__))
16
16
 
17
- def initialize
17
+ def initialize(today = Date.today, display = nil, value = nil)
18
18
  super
19
19
  end
20
20
 
@@ -13,16 +13,14 @@ module RubyApp
13
13
 
14
14
  template_path(:all, File.dirname(__FILE__))
15
15
 
16
- def initialize(title, value = Date.today)
16
+ def initialize(title, today = Date.today, display = nil, value = nil)
17
17
  super()
18
18
 
19
19
  attributes.merge!(:style => 'width: auto;')
20
20
 
21
21
  @title = title
22
22
 
23
- @month = RubyApp::Elements::Calendars::Month.new
24
- @month.display = value;
25
- @month.value = value;
23
+ @month = RubyApp::Elements::Calendars::Month.new(today, display, value)
26
24
  @month.changed do |element, event|
27
25
  @response = event.value
28
26
  event.hide(self)
@@ -1,4 +1,4 @@
1
1
  module RubyApp
2
- VERSION = "0.0.29"
2
+ VERSION = "0.0.30"
3
3
  ROOT = File.expand_path(File.dirname(__FILE__))
4
4
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: RubyApp
3
3
  version: !ruby/object:Gem::Version
4
- hash: 37
4
+ hash: 35
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 29
10
- version: 0.0.29
9
+ - 30
10
+ version: 0.0.30
11
11
  platform: ruby
12
12
  authors:
13
13
  - Frank G. Ficnar
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-12-17 00:00:00 Z
18
+ date: 2011-12-19 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement