RubyApp 0.5.48 → 0.5.49

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.48)
4
+ RubyApp (0.5.49)
5
5
  BlueCloth
6
6
  chronic
7
7
  chronic_duration
@@ -1,12 +1,23 @@
1
1
  :plain
2
2
  // #{__FILE__}
3
3
  var RubyApp = new function() {
4
+ this.waitCount = 0,
5
+ this.showWait = function() {
6
+ $.mobile.showPageLoadingMsg();
7
+ RubyApp.waitCount++;
8
+ },
9
+ this.hideWait = function() {
10
+ if ( RubyApp.waitCount == 1 )
11
+ $.mobile.hidePageLoadingMsg();
12
+ RubyApp.waitCount--;
13
+ },
4
14
  this.sendEvent = function(event) {
5
15
  // RubyApp.log('ENQUEUE event.class=' + event._class);
6
16
  event.now = new Date().toString();
7
17
  event.session = RubyApp.getData('session', null);
8
18
  $(window).queue( function() {
9
19
  RubyApp.log('DEQUEUE event.class=' + event._class);
20
+ RubyApp.hideWait();
10
21
  request = $.ajax({type:'POST', url:location.href, data:event});
11
22
  request
12
23
  .success( function(event) {
@@ -21,6 +32,7 @@
21
32
  RubyApp.confirmRefreshBrowser(RubyApp.getData('error_message', null));
22
33
  } )
23
34
  .complete( function() {
35
+ RubyApp.hideWait();
24
36
  $(window).dequeue();
25
37
  } )
26
38
  } );
@@ -33,7 +45,7 @@
33
45
  // RubyApp.log('ENQUEUE RubyApp.showPage("' + id + '", ...)');
34
46
  $(window).queue( function() {
35
47
  RubyApp.log('DEQUEUE RubyApp.showPage("' + id + '", ...)');
36
- $.mobile.showPageLoadingMsg();
48
+ RubyApp.showWait();
37
49
  request = $.ajax({type:'GET', url:'/' + RubyApp.getData('locale', 'en') + '/elements/' + id + '.html'});
38
50
  request
39
51
  .success( function(content) {
@@ -46,7 +58,7 @@
46
58
  RubyApp.confirmRefreshBrowser(RubyApp.getData('error_message', null));
47
59
  } )
48
60
  .complete( function() {
49
- $.mobile.hidePageLoadingMsg();
61
+ RubyApp.hideWait();
50
62
  $(window).dequeue();
51
63
  } );
52
64
  } );
@@ -59,7 +71,7 @@
59
71
  // RubyApp.log('ENQUEUE RubyApp.updateElement("' + id + '")');
60
72
  $(window).queue( function() {
61
73
  RubyApp.log('DEQUEUE RubyApp.updateElement("' + id + '")');
62
- $.mobile.showPageLoadingMsg();
74
+ RubyApp.showWait();
63
75
  request = $.ajax({type:'GET', url:'/' + RubyApp.getData('locale', 'en') + '/elements/' + id + '.html'});
64
76
  request
65
77
  .success( function(content) {
@@ -72,7 +84,7 @@
72
84
  RubyApp.confirmRefreshBrowser(RubyApp.getData('error_message', null));
73
85
  } )
74
86
  .complete( function() {
75
- $.mobile.hidePageLoadingMsg();
87
+ RubyApp.hideWait();
76
88
  $(window).dequeue();
77
89
  } );
78
90
  } );
@@ -1,4 +1,4 @@
1
1
  module RubyApp
2
- VERSION = "0.5.48"
2
+ VERSION = "0.5.49"
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: 107
4
+ hash: 105
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 48
10
- version: 0.5.48
9
+ - 49
10
+ version: 0.5.49
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-06-14 00:00:00 Z
18
+ date: 2012-06-15 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement