RubyApp 0.0.47 → 0.0.48
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/ruby_app/elements/base/base_page.js.haml +37 -22
- data/lib/ruby_app/elements/pages/authentication/open_id/base/base_authentication_page.html.haml +0 -5
- data/lib/ruby_app/rack/route.rb +0 -3
- data/lib/ruby_app/translations/en.yml +2 -14
- data/lib/ruby_app/version.rb +1 -1
- metadata +3 -5
- data/lib/ruby_app/elements/pages/authentication/open_id/base/base_authentication_page.css.haml +0 -9
- data/lib/ruby_app/resources/elements/pages/authentication/open_id/base/base_authentication_page.gif +0 -0
data/Gemfile.lock
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
this.translation = {code:'#{RubyApp::Language.locale.code}', title:'#{RubyApp::Language.locale.title}'},
|
6
6
|
this.interval = #{self.interval * 1000},
|
7
7
|
this._interval = 0,
|
8
|
+
this._waitCount = 0,
|
8
9
|
this.maximize = function(selector) {
|
9
10
|
var element = $(selector);
|
10
11
|
var _document = $(document);
|
@@ -35,20 +36,14 @@
|
|
35
36
|
event.session_id = '#{RubyApp::Session.session_id}';
|
36
37
|
event.now = new Date().toString();
|
37
38
|
$(window).queue( function() {
|
38
|
-
RubyApp.showWait();
|
39
39
|
request = $.post(location.href, event);
|
40
40
|
request
|
41
41
|
.success( function(event) {
|
42
42
|
$.each(event.statements, function(index, statement) {
|
43
|
-
|
44
|
-
eval(statement);
|
45
|
-
$(window).dequeue();
|
46
|
-
} );
|
43
|
+
eval(statement);
|
47
44
|
} );
|
48
|
-
RubyApp.hideWait();
|
49
45
|
} )
|
50
46
|
.error( function(request, message, exception) {
|
51
|
-
RubyApp.hideWait();
|
52
47
|
RubyApp.confirm_refresh(#{RubyApp::Elements::Base::BasePage.translate.error.to_json});
|
53
48
|
} )
|
54
49
|
.complete( function() {
|
@@ -60,6 +55,7 @@
|
|
60
55
|
alert(message);
|
61
56
|
},
|
62
57
|
this.refresh = function() {
|
58
|
+
RubyApp.showWait();
|
63
59
|
$(window).clearQueue();
|
64
60
|
location.assign(location.pathname);
|
65
61
|
},
|
@@ -70,25 +66,34 @@
|
|
70
66
|
}
|
71
67
|
},
|
72
68
|
this.go = function(url) {
|
69
|
+
RubyApp.showWait();
|
73
70
|
$(window).clearQueue();
|
74
71
|
location.assign(url);
|
75
72
|
},
|
76
73
|
this.showWait = function() {
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
$(window).bind('resize.wait', function() {
|
74
|
+
if (RubyApp._waitCount <= 0)
|
75
|
+
{
|
76
|
+
var wait = $('body div.wait');
|
77
|
+
wait.show();
|
82
78
|
RubyApp.maximizeWait();
|
83
79
|
RubyApp.centerWaitImage();
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
80
|
+
$(window).bind('resize.wait', function() {
|
81
|
+
RubyApp.maximizeWait();
|
82
|
+
RubyApp.centerWaitImage();
|
83
|
+
} );
|
84
|
+
$(window).bind('scroll.wait', function() {
|
85
|
+
RubyApp.centerWaitImage();
|
86
|
+
} );
|
87
|
+
}
|
88
|
+
RubyApp._waitCount ++;
|
88
89
|
},
|
89
90
|
this.hideWait = function() {
|
90
|
-
|
91
|
-
|
91
|
+
if (RubyApp._waitCount == 1)
|
92
|
+
{
|
93
|
+
$(window).unbind('.wait');
|
94
|
+
$('body div.wait').hide();
|
95
|
+
}
|
96
|
+
RubyApp._waitCount --;
|
92
97
|
},
|
93
98
|
this.showDialog = function(id) {
|
94
99
|
request = $.get('/#{RubyApp::Language.locale.code}/elements/' + id + '.html');
|
@@ -106,14 +111,14 @@
|
|
106
111
|
$(window).bind('scroll.dialog', function() {
|
107
112
|
RubyApp.centerDialog(id);
|
108
113
|
} );
|
109
|
-
RubyApp.queueEvent({_class:'RubyApp::Elements::Dialog::ShownEvent', source_id:id});
|
114
|
+
RubyApp.queueEvent({_class:'RubyApp::Elements::Dialog::ShownEvent', source_id:id}, false);
|
110
115
|
} );
|
111
116
|
},
|
112
117
|
this.hideDialog = function(id) {
|
113
118
|
$(window).unbind('.dialog');
|
114
119
|
$('body div.overlay').hide();
|
115
120
|
$('#'+id).remove();
|
116
|
-
RubyApp.queueEvent({_class:'RubyApp::Elements::Dialog::HiddenEvent', source_id:id});
|
121
|
+
RubyApp.queueEvent({_class:'RubyApp::Elements::Dialog::HiddenEvent', source_id:id}, false);
|
117
122
|
},
|
118
123
|
this.updateElement = function(id) {
|
119
124
|
request = $.get('/#{RubyApp::Language.locale.code}/elements/' + id + '.html');
|
@@ -139,11 +144,21 @@
|
|
139
144
|
}
|
140
145
|
};
|
141
146
|
|
147
|
+
$(document).ready(function() {
|
148
|
+
$('body div.wait')
|
149
|
+
.bind('ajaxSend', function() {
|
150
|
+
RubyApp.showWait();
|
151
|
+
} )
|
152
|
+
.bind('ajaxComplete', function() {
|
153
|
+
RubyApp.hideWait();
|
154
|
+
} );
|
155
|
+
});
|
156
|
+
|
142
157
|
$(window).load(function() {
|
143
|
-
RubyApp.queueEvent({_class:'RubyApp::Elements::Page::LoadedEvent', source_id:$('html').attr('id')});
|
158
|
+
RubyApp.queueEvent({_class:'RubyApp::Elements::Page::LoadedEvent', source_id:$('html').attr('id')}, false);
|
144
159
|
if ( RubyApp.interval > 0 ) {
|
145
160
|
RubyApp._interval = window.setInterval(function() {
|
146
|
-
RubyApp.queueEvent({_class:'RubyApp::Elements::Page::TriggeredEvent', source_id:$('html').attr('id')});
|
161
|
+
RubyApp.queueEvent({_class:'RubyApp::Elements::Page::TriggeredEvent', source_id:$('html').attr('id')}, false);
|
147
162
|
}, RubyApp.interval);
|
148
163
|
}
|
149
164
|
});
|
data/lib/ruby_app/elements/pages/authentication/open_id/base/base_authentication_page.html.haml
CHANGED
@@ -1,8 +1,3 @@
|
|
1
1
|
- self.content_for(:body) do
|
2
2
|
/
|
3
3
|
#{__FILE__}
|
4
|
-
%div.authenticating
|
5
|
-
%div.image
|
6
|
-
%img{:src => '/ruby_app/resources/elements/pages/authentication/open_id/base/base_authentication_page.gif'}
|
7
|
-
%div.content
|
8
|
-
= RubyApp::Elements::Pages::Authentication::OpenID::Base::BaseAuthenticationPage.translate.message
|
data/lib/ruby_app/rack/route.rb
CHANGED
@@ -76,9 +76,6 @@ module RubyApp
|
|
76
76
|
|
77
77
|
route(RubyApp::Mixins::RouteMixin::POST, /.*/) do |method, path|
|
78
78
|
RubyApp::Log.debug("#{self}.route method=#{method.inspect} path=#{path.inspect} POST=#{RubyApp::Request.POST.inspect}")
|
79
|
-
#RubyApp::Log.debug("#{self}.route sleeping ...")
|
80
|
-
#sleep(5)
|
81
|
-
#RubyApp::Log.debug("#{self}.route ... done")
|
82
79
|
begin
|
83
80
|
if RubyApp::Session.session_id == RubyApp::Request.POST['session_id']
|
84
81
|
event = RubyApp::Element::Event.from_hash(RubyApp::Request.POST)
|
@@ -75,7 +75,7 @@ ruby_app:
|
|
75
75
|
|
76
76
|
[`ExceptionDialog`](do_exception_dialog) ... Raise an exception and show the `class` and `message` properties.
|
77
77
|
|
78
|
-
[`
|
78
|
+
[`_Exception`](do_unhandled_exception_dialog) ... Raise an unhandled exception.
|
79
79
|
|
80
80
|
[`MessageDialog`](do_message_dialog) ... Show a sample message dialog.
|
81
81
|
|
@@ -87,19 +87,7 @@ ruby_app:
|
|
87
87
|
|
88
88
|
[`ExceptionDialog`](do_exception_dialog) ... Raise an exception and show the `class` and `message` properties.
|
89
89
|
|
90
|
-
[`
|
91
|
-
|
92
|
-
[`MessageDialog`](do_message_dialog) ... Show a sample message dialog.
|
93
|
-
|
94
|
-
[`MonthDialog`](do_month_dialog) ... Show a calendar month dialog, hide it when a date is clicked, and then show the clicked date (the last date clicked was <span id='last_value'>(nothing)</span>).
|
95
|
-
|
96
|
-
---
|
97
|
-
|
98
|
-
[`ConfirmationDialog`](do_confirmation_dialog) ... Ask for confirmation.
|
99
|
-
|
100
|
-
[`ExceptionDialog`](do_exception_dialog) ... Raise an exception and show the `class` and `message` properties.
|
101
|
-
|
102
|
-
[`Exception`](do_unhandled_exception_dialog) ... Raise an unhandled exception.
|
90
|
+
[`_Exception`](do_unhandled_exception_dialog) ... Raise an unhandled exception.
|
103
91
|
|
104
92
|
[`MessageDialog`](do_message_dialog) ... Show a sample message dialog.
|
105
93
|
|
data/lib/ruby_app/version.rb
CHANGED
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:
|
4
|
+
hash: 127
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 48
|
10
|
+
version: 0.0.48
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Frank G. Ficnar
|
@@ -429,7 +429,6 @@ files:
|
|
429
429
|
- lib/ruby_app/elements/page.rb
|
430
430
|
- lib/ruby_app/elements/pages/authentication/open_id/authentication_page.rb
|
431
431
|
- lib/ruby_app/elements/pages/authentication/open_id/ax_authentication_page.rb
|
432
|
-
- lib/ruby_app/elements/pages/authentication/open_id/base/base_authentication_page.css.haml
|
433
432
|
- lib/ruby_app/elements/pages/authentication/open_id/base/base_authentication_page.html.haml
|
434
433
|
- lib/ruby_app/elements/pages/authentication/open_id/base/base_authentication_page.rb
|
435
434
|
- lib/ruby_app/elements/pages/authentication/open_id/email_authentication_page.rb
|
@@ -504,7 +503,6 @@ files:
|
|
504
503
|
- lib/ruby_app/rack/route.rb
|
505
504
|
- lib/ruby_app/request.rb
|
506
505
|
- lib/ruby_app/resources/elements/base/base_page.gif
|
507
|
-
- lib/ruby_app/resources/elements/pages/authentication/open_id/base/base_authentication_page.gif
|
508
506
|
- lib/ruby_app/resources/favicon.ico
|
509
507
|
- lib/ruby_app/resources/scripts/jquery-1.7.1.min.js
|
510
508
|
- lib/ruby_app/resources/themes/mobile/base/base_page/icon.png
|