RubyApp 0.5.14 → 0.5.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- RubyApp (0.5.14)
4
+ RubyApp (0.5.15)
5
5
  BlueCloth
6
6
  chronic
7
7
  chronic_duration
@@ -143,6 +143,7 @@
143
143
  };
144
144
 
145
145
  $(window).load(function() {
146
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Mobile::Document::LoadedEvent', source:$('html').attr('id')});
146
147
  RubyApp.queueEvent({_class:'RubyApp::Elements::Mobile::Page::LoadedEvent', source:$('div[data-role="page"]').filter(':first').attr('id')});
147
148
  });
148
149
 
@@ -12,6 +12,14 @@ module RubyApp
12
12
 
13
13
  class Document < RubyApp::Element
14
14
 
15
+ class LoadedEvent < RubyApp::Element::Event
16
+
17
+ def initialize(data)
18
+ super(data)
19
+ end
20
+
21
+ end
22
+
15
23
  template_path(:all, File.dirname(__FILE__))
16
24
 
17
25
  attr_reader :metadata
@@ -21,6 +29,8 @@ module RubyApp
21
29
 
22
30
  attr_reader :pages
23
31
 
32
+ event :loaded
33
+
24
34
  def initialize
25
35
  super
26
36
 
@@ -48,6 +58,15 @@ module RubyApp
48
58
 
49
59
  protected
50
60
 
61
+ def on_event(event)
62
+ on_loaded(event) if event.is_a?(RubyApp::Elements::Mobile::Document::LoadedEvent)
63
+ super(event)
64
+ end
65
+
66
+ def on_loaded(event)
67
+ loaded(event)
68
+ end
69
+
51
70
  end
52
71
 
53
72
  end
@@ -1,4 +1,4 @@
1
1
  module RubyApp
2
- VERSION = "0.5.14"
2
+ VERSION = "0.5.15"
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: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 14
10
- version: 0.5.14
9
+ - 15
10
+ version: 0.5.15
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: 2012-04-13 00:00:00 Z
18
+ date: 2012-04-15 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  prerelease: false