RubyApp 0.0.56 → 0.0.57

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.0.56)
4
+ RubyApp (0.0.57)
5
5
  BlueCloth
6
6
  chronic
7
7
  chronic_duration
@@ -46,6 +46,10 @@ module RubyApp
46
46
  source.send(:on_event, self)
47
47
  end
48
48
 
49
+ def log(message)
50
+ execute("RubyApp.log(#{message.to_json});")
51
+ end
52
+
49
53
  def alert(message)
50
54
  execute("RubyApp.alert(#{message.to_json});")
51
55
  end
@@ -2,8 +2,6 @@
2
2
  :sass
3
3
  /* #{__FILE__}
4
4
  body
5
- > ul.log
6
- display: none
7
5
  > div.overlay
8
6
  display: none
9
7
  height: 100%
@@ -28,4 +26,6 @@
28
26
  height: 48px
29
27
  position: absolute
30
28
  width: 48px
29
+ > ul.log
30
+ display: none
31
31
  = yield
@@ -17,7 +17,9 @@
17
17
  %body
18
18
  %div.body
19
19
  = yield :body
20
- %ul.log
21
20
  %div.overlay
22
21
  %div.wait
23
22
  %div.image
23
+ %ul.log
24
+ %li.status
25
+ (blank)
@@ -33,26 +33,32 @@
33
33
  RubyApp.center('#'+id);
34
34
  },
35
35
  this.log = function(message) {
36
- $('ul.log').append('<li>' + message + '</li>');
36
+ $('ul.log > li.status').text(new Date().toString() + ' - ' + message);
37
+ $('ul.log').append('<li>' + new Date().toString() + ' - ' + message + '</li>');
38
+ },
39
+ this.status = function(message) {
37
40
  },
38
41
  this.queueEvent = function(event, wait) {
39
42
  event.session_id = '#{RubyApp::Session.session_id}';
40
43
  event.now = new Date().toString();
41
44
  RubyApp.log('RubyApp.queueEvent ENQUEUE event.class=' + event._class + ' wait=' + wait);
42
45
  $(window).queue( function() {
43
- RubyApp.log('RubyApp.queueEvent DEQUEUE event.class=' + event._class + ' wait=' + wait);
46
+ RubyApp.log('RubyApp.queueEvent SEND event.class=' + event._class + ' wait=' + wait);
44
47
  request = $.ajax({type:'POST', url:location.href, data:event, wait:wait});
45
48
  request
46
49
  .success( function(event) {
50
+ RubyApp.log('RubyApp.queueEvent SUCCESS event.class=' + event._class + ' wait=' + wait);
47
51
  $.each(event.statements, function(index, statement) {
48
52
  eval(statement);
49
53
  } );
50
54
  } )
51
55
  .error( function(request, message, exception) {
56
+ RubyApp.log('RubyApp.queueEvent ERROR event.class=' + event._class + ' wait=' + wait);
52
57
  if (#{RubyApp::Session['show_event_error'] || 'false'} == true)
53
58
  RubyApp.confirm_refresh(#{RubyApp::Elements::Base::BasePage.translate.error.to_json});
54
59
  } )
55
60
  .complete( function() {
61
+ RubyApp.log('RubyApp.queueEvent COMPLETE event.class=' + event._class + ' wait=' + wait);
56
62
  $(window).dequeue();
57
63
  } )
58
64
  } );
@@ -102,7 +108,6 @@
102
108
  RubyApp._waitCount --;
103
109
  },
104
110
  this.showDialog = function(id) {
105
- //request = $.get('/#{RubyApp::Language.locale.code}/elements/' + id + '.html');
106
111
  request = $.ajax({type:'GET', url:'/#{RubyApp::Language.locale.code}/elements/' + id + '.html', wait:true});
107
112
  request
108
113
  .success( function(dialog) {
@@ -128,7 +133,6 @@
128
133
  RubyApp.queueEvent({_class:'RubyApp::Elements::Dialog::HiddenEvent', source_id:id}, false);
129
134
  },
130
135
  this.updateElement = function(id) {
131
- //request = $.get('/#{RubyApp::Language.locale.code}/elements/' + id + '.html');
132
136
  request = $.ajax({type:'GET', url:'/#{RubyApp::Language.locale.code}/elements/' + id + '.html', wait:true});
133
137
  request
134
138
  .success( function(content) {
@@ -1,4 +1,4 @@
1
1
  module RubyApp
2
- VERSION = "0.0.56"
2
+ VERSION = "0.0.57"
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: 111
4
+ hash: 109
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 56
10
- version: 0.0.56
9
+ - 57
10
+ version: 0.0.57
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-01-07 00:00:00 Z
18
+ date: 2012-01-08 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  prerelease: false