RubyApp 0.0.48 → 0.0.49

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- RubyApp (0.0.48)
4
+ RubyApp (0.0.49)
5
5
  BlueCloth
6
6
  chronic
7
7
  chronic_duration
@@ -32,11 +32,12 @@
32
32
  this.centerDialog = function(id) {
33
33
  RubyApp.center('#'+id);
34
34
  },
35
- this.queueEvent = function(event) {
35
+ this.queueEvent = function(event, wait) {
36
36
  event.session_id = '#{RubyApp::Session.session_id}';
37
37
  event.now = new Date().toString();
38
38
  $(window).queue( function() {
39
- request = $.post(location.href, event);
39
+ //request = $.post(location.href, event);
40
+ request = $.ajax({type:'POST', url:location.href, data:event, wait:wait});
40
41
  request
41
42
  .success( function(event) {
42
43
  $.each(event.statements, function(index, statement) {
@@ -44,7 +45,7 @@
44
45
  } );
45
46
  } )
46
47
  .error( function(request, message, exception) {
47
- RubyApp.confirm_refresh(#{RubyApp::Elements::Base::BasePage.translate.error.to_json});
48
+ RubyApp.confirm_refresh(#{RubyApp::Elements::Base::BasePage.translate.error.to_json}, true);
48
49
  } )
49
50
  .complete( function() {
50
51
  $(window).dequeue();
@@ -96,7 +97,8 @@
96
97
  RubyApp._waitCount --;
97
98
  },
98
99
  this.showDialog = function(id) {
99
- request = $.get('/#{RubyApp::Language.locale.code}/elements/' + id + '.html');
100
+ //request = $.get('/#{RubyApp::Language.locale.code}/elements/' + id + '.html');
101
+ request = $.ajax({type:'GET', url:'/#{RubyApp::Language.locale.code}/elements/' + id + '.html', wait:true});
100
102
  request
101
103
  .success( function(dialog) {
102
104
  var overlay = $('body div.overlay');
@@ -121,7 +123,8 @@
121
123
  RubyApp.queueEvent({_class:'RubyApp::Elements::Dialog::HiddenEvent', source_id:id}, false);
122
124
  },
123
125
  this.updateElement = function(id) {
124
- request = $.get('/#{RubyApp::Language.locale.code}/elements/' + id + '.html');
126
+ //request = $.get('/#{RubyApp::Language.locale.code}/elements/' + id + '.html');
127
+ request = $.ajax({type:'GET', url:'/#{RubyApp::Language.locale.code}/elements/' + id + '.html', wait:true});
125
128
  request
126
129
  .success( function(content) {
127
130
  $('#'+id).replaceWith(content);
@@ -146,11 +149,13 @@
146
149
 
147
150
  $(document).ready(function() {
148
151
  $('body div.wait')
149
- .bind('ajaxSend', function() {
150
- RubyApp.showWait();
152
+ .bind('ajaxSend', function(event, request, options) {
153
+ if (options.wait)
154
+ RubyApp.showWait();
151
155
  } )
152
- .bind('ajaxComplete', function() {
153
- RubyApp.hideWait();
156
+ .bind('ajaxComplete', function(event, request, options) {
157
+ if (options.wait)
158
+ RubyApp.hideWait();
154
159
  } );
155
160
  });
156
161
 
@@ -4,15 +4,15 @@
4
4
  $(document).ready(function() {
5
5
  $('div.month > table > thead > tr > td.left > a.previous').live('click', function(event) {
6
6
  event.preventDefault();
7
- RubyApp.queueEvent({_class:'RubyApp::Elements::Calendars::Month::MovedEvent', source_id:$(this).parents('div.month').attr('id'), unit:'month', amount:-1});
7
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Calendars::Month::MovedEvent', source_id:$(this).parents('div.month').attr('id'), unit:'month', amount:-1}, true);
8
8
  });
9
9
  $('div.month > table > thead > tr > td.right > a.next').live('click', function(event) {
10
10
  event.preventDefault();
11
- RubyApp.queueEvent({_class:'RubyApp::Elements::Calendars::Month::MovedEvent', source_id:$(this).parents('div.month').attr('id'), unit:'month', amount:1});
11
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Calendars::Month::MovedEvent', source_id:$(this).parents('div.month').attr('id'), unit:'month', amount:1}, true);
12
12
  });
13
13
  $('div.month > table > tbody > tr > td > a.day').live('click', function(event) {
14
14
  event.preventDefault();
15
- RubyApp.queueEvent({_class:'RubyApp::Elements::Calendars::Month::ChangedEvent', source_id:$(this).parents('div.month').attr('id'), date:$(this).attr('date')});
15
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Calendars::Month::ChangedEvent', source_id:$(this).parents('div.month').attr('id'), date:$(this).attr('date')}, true);
16
16
  });
17
17
  });
18
18
  = yield
@@ -4,7 +4,7 @@
4
4
  $(document).ready(function() {
5
5
  $('.click').live('click', function(event) {
6
6
  event.preventDefault();
7
- RubyApp.queueEvent({_class:'RubyApp::Elements::Click::ClickedEvent', source_id:$(this).attr('id')});
7
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Click::ClickedEvent', source_id:$(this).attr('id')}, true);
8
8
  });
9
9
  });
10
10
  = yield
@@ -4,7 +4,7 @@
4
4
  $(document).ready(function() {
5
5
  $('input[type="text"]').live('change', function(event) {
6
6
  event.preventDefault();
7
- RubyApp.queueEvent({_class:'RubyApp::Elements::Input::ChangedEvent', source_id:$(this).attr('id'), value:$(this).val()});
7
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Input::ChangedEvent', source_id:$(this).attr('id'), value:$(this).val()}, true);
8
8
  });
9
9
  });
10
10
  = yield
@@ -4,7 +4,7 @@
4
4
  $(document).ready(function() {
5
5
  $('ul.list > li.item > a.item').live('click', function(event) {
6
6
  event.preventDefault();
7
- RubyApp.queueEvent({_class:'RubyApp::Elements::List::ClickedEvent', source_id:$(this).parents('ul.list').attr('id'), index:$(this).attr('index')});
7
+ RubyApp.queueEvent({_class:'RubyApp::Elements::List::ClickedEvent', source_id:$(this).parents('ul.list').attr('id'), index:$(this).attr('index')}, true);
8
8
  });
9
9
  });
10
10
  = yield
@@ -4,7 +4,7 @@
4
4
  $(document).ready(function() {
5
5
  $('ul.select > li.item > a.item').live('click', function(event) {
6
6
  event.preventDefault();
7
- RubyApp.queueEvent({_class:'RubyApp::Elements::List::ClickedEvent', source_id:$(this).parents('ul.select').attr('id'), index:$(this).attr('index')});
7
+ RubyApp.queueEvent({_class:'RubyApp::Elements::List::ClickedEvent', source_id:$(this).parents('ul.select').attr('id'), index:$(this).attr('index')}, true);
8
8
  });
9
9
  });
10
10
  = yield
@@ -4,7 +4,7 @@
4
4
  $(document).ready(function() {
5
5
  $('div.markdown a').live('click', function(event) {
6
6
  event.preventDefault();
7
- RubyApp.queueEvent({_class:'RubyApp::Elements::Markdown::ClickedEvent', source_id:$(this).parents('div.markdown').attr('id'), name:$(this).attr('href')});
7
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Markdown::ClickedEvent', source_id:$(this).parents('div.markdown').attr('id'), name:$(this).attr('href')}, true);
8
8
  });
9
9
  });
10
10
  = yield
@@ -4,7 +4,7 @@
4
4
  $(document).ready(function() {
5
5
  $('div.breadcrumbs > a.breadcrumb').click(function(event) {
6
6
  event.preventDefault();
7
- RubyApp.queueEvent({_class:'RubyApp::Elements::Navigation::Breadcrumbs::ClickedEvent', source_id:$(this).parents('div.breadcrumbs').attr('id'), page_id:$(this).attr('page_id')});
7
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Navigation::Breadcrumbs::ClickedEvent', source_id:$(this).parents('div.breadcrumbs').attr('id'), page_id:$(this).attr('page_id')}, true);
8
8
  });
9
9
  });
10
10
  = yield
@@ -4,7 +4,7 @@
4
4
  $(document).ready(function() {
5
5
  $('span.link > a.page').click(function(event) {
6
6
  event.preventDefault();
7
- RubyApp.queueEvent({_class:'RubyApp::Elements::Navigation::PageLink::ClickedEvent', source_id:$(this).parents('span.link').attr('id'), page:$(this).attr('page')});
7
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Navigation::PageLink::ClickedEvent', source_id:$(this).parents('span.link').attr('id'), page:$(this).attr('page')}, true);
8
8
  });
9
9
  });
10
10
  = yield
@@ -20,6 +20,9 @@ module RubyApp
20
20
  extend RubyApp::Mixins::RouteMixin
21
21
 
22
22
  def call(environment)
23
+ #RubyApp::Log.debug("#{self.class}##{__method__} sleeping ...")
24
+ #sleep(5)
25
+ #RubyApp::Log.debug("#{self.class}##{__method__} ... done")
23
26
  self.class.do_route(RubyApp::Request.request_method, RubyApp::Request.path)
24
27
  end
25
28
 
@@ -1,4 +1,4 @@
1
1
  module RubyApp
2
- VERSION = "0.0.48"
2
+ VERSION = "0.0.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: 127
4
+ hash: 125
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 48
10
- version: 0.0.48
9
+ - 49
10
+ version: 0.0.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: 2011-12-20 00:00:00 Z
18
+ date: 2011-12-21 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement