RubyApp 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/bin/console.rb +1 -1
- data/lib/ruby_app/elements/calendars/base/base_month.css.haml +4 -6
- data/lib/ruby_app/elements/calendars/base/base_month.js.haml +3 -3
- data/lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.css.haml +2 -2
- data/lib/ruby_app/elements/dialogs/exception_dialog.rb +9 -0
- data/lib/ruby_app/elements/input.js.haml +1 -0
- data/lib/ruby_app/elements/list.js.haml +2 -2
- data/lib/ruby_app/elements/lists/select.js.haml +2 -2
- data/lib/ruby_app/elements/navigation/base/base_breadcrumbs.js.haml +2 -2
- data/lib/ruby_app/elements/navigation/page_link.js.haml +2 -2
- data/lib/ruby_app/elements/pages/test_pages/dialog_test_page.rb +1 -3
- data/lib/ruby_app/templates/application/console.rb +1 -1
- data/lib/ruby_app/themes/mobile/dialogs/yes_no_dialog.css.haml +1 -1
- data/lib/ruby_app/version.rb +1 -1
- metadata +4 -7
- data/lib/ruby_app/elements/navigation/page_menu.html.haml +0 -12
- data/lib/ruby_app/elements/navigation/page_menu.js.haml +0 -10
- data/lib/ruby_app/elements/navigation/page_menu.rb +0 -57
data/Gemfile.lock
CHANGED
data/bin/console.rb
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
:plain
|
3
3
|
// #{__FILE__}
|
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
7
|
RubyApp.sendEvent({_class:'RubyApp::Elements::Calendars::Month::MovedEvent', source_id:$(this).parents('div.month').attr('id'), unit:'month', amount:-1});
|
8
8
|
});
|
9
|
-
$(
|
9
|
+
$('div.month > table > thead > tr > td.right > a.next').live('click', function(event) {
|
10
10
|
event.preventDefault();
|
11
11
|
RubyApp.sendEvent({_class:'RubyApp::Elements::Calendars::Month::MovedEvent', source_id:$(this).parents('div.month').attr('id'), unit:'month', amount:1});
|
12
12
|
});
|
13
|
-
$(
|
13
|
+
$('div.month > table > tbody > tr > td > a.day').live('click', function(event) {
|
14
14
|
event.preventDefault();
|
15
15
|
RubyApp.sendEvent({_class:'RubyApp::Elements::Calendars::Month::ChangedEvent', source_id:$(this).parents('div.month').attr('id'), date:$(this).attr('date')});
|
16
16
|
});
|
@@ -4,6 +4,7 @@ module RubyApp
|
|
4
4
|
|
5
5
|
module Dialogs
|
6
6
|
require 'ruby_app/elements/dialogs/close_dialog'
|
7
|
+
require 'ruby_app/session'
|
7
8
|
|
8
9
|
class ExceptionDialog < RubyApp::Elements::Dialogs::CloseDialog
|
9
10
|
|
@@ -14,6 +15,14 @@ module RubyApp
|
|
14
15
|
@exception = exception
|
15
16
|
end
|
16
17
|
|
18
|
+
def self.show(event)
|
19
|
+
begin
|
20
|
+
yield
|
21
|
+
rescue Exception => exception
|
22
|
+
RubyApp::Session.show(event, RubyApp::Elements::Dialogs::ExceptionDialog.new(exception))
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
17
26
|
end
|
18
27
|
|
19
28
|
end
|
@@ -2,9 +2,9 @@
|
|
2
2
|
:plain
|
3
3
|
// #{__FILE__}
|
4
4
|
$(document).ready(function() {
|
5
|
-
$(
|
5
|
+
$('ul.list > li.item > a.item').live('click', function(event) {
|
6
6
|
event.preventDefault();
|
7
|
-
RubyApp.sendEvent({_class:'RubyApp::Elements::List::ClickedEvent', source_id:$(this).
|
7
|
+
RubyApp.sendEvent({_class:'RubyApp::Elements::List::ClickedEvent', source_id:$(this).parents('ul.list').attr('id'), index:$(this).attr('index')});
|
8
8
|
});
|
9
9
|
});
|
10
10
|
= yield
|
@@ -2,9 +2,9 @@
|
|
2
2
|
:plain
|
3
3
|
// #{__FILE__}
|
4
4
|
$(document).ready(function() {
|
5
|
-
$(
|
5
|
+
$('ul.select > li.item > a.item').live('click', function(event) {
|
6
6
|
event.preventDefault();
|
7
|
-
RubyApp.sendEvent({_class:'RubyApp::Elements::List::ClickedEvent', source_id:$(this).
|
7
|
+
RubyApp.sendEvent({_class:'RubyApp::Elements::List::ClickedEvent', source_id:$(this).parents('ul.select').attr('id'), index:$(this).attr('index')});
|
8
8
|
});
|
9
9
|
});
|
10
10
|
= yield
|
@@ -2,9 +2,9 @@
|
|
2
2
|
:plain
|
3
3
|
// #{__FILE__}
|
4
4
|
$(document).ready(function() {
|
5
|
-
$(
|
5
|
+
$('div.breadcrumbs > a.breadcrumb').click(function(event) {
|
6
6
|
event.preventDefault();
|
7
|
-
RubyApp.sendEvent({_class:'RubyApp::Elements::Navigation::Breadcrumbs::ClickedEvent', source_id:$(this).
|
7
|
+
RubyApp.sendEvent({_class:'RubyApp::Elements::Navigation::Breadcrumbs::ClickedEvent', source_id:$(this).parents('div.breadcrumbs').attr('id'), page_id:$(this).attr('page_id')});
|
8
8
|
});
|
9
9
|
});
|
10
10
|
= yield
|
@@ -2,9 +2,9 @@
|
|
2
2
|
:plain
|
3
3
|
// #{__FILE__}
|
4
4
|
$(document).ready(function() {
|
5
|
-
$(
|
5
|
+
$('span.link > a.page').click(function(event) {
|
6
6
|
event.preventDefault();
|
7
|
-
RubyApp.sendEvent({_class:'RubyApp::Elements::Navigation::PageLink::ClickedEvent', source_id:$(this).
|
7
|
+
RubyApp.sendEvent({_class:'RubyApp::Elements::Navigation::PageLink::ClickedEvent', source_id:$(this).parents('span.link').attr('id'), page:$(this).attr('page')});
|
8
8
|
});
|
9
9
|
});
|
10
10
|
= yield
|
@@ -35,10 +35,8 @@ module RubyApp
|
|
35
35
|
self.translate.confirmation_dialog.message_dialog.message(response)))
|
36
36
|
end
|
37
37
|
when 'do_exception_dialog'
|
38
|
-
|
38
|
+
RubyApp::Elements::Dialogs::ExceptionDialog.show(event) do
|
39
39
|
raise self.translate.exception
|
40
|
-
rescue Exception => exception
|
41
|
-
RubyApp::Session.show(event, RubyApp::Elements::Dialogs::ExceptionDialog.new(exception))
|
42
40
|
end
|
43
41
|
when 'do_message_dialog'
|
44
42
|
RubyApp::Session.show(event, RubyApp::Elements::Dialogs::MessageDialog.new(self.translate.message_dialog.message.title,
|
@@ -13,4 +13,4 @@ options = { :application_class => _APPLICATION_UPCODE_::Application,
|
|
13
13
|
:default_language => :en,
|
14
14
|
:translations_paths => File.join(_APPLICATION_UPCODE_::ROOT, %w[translations]) }
|
15
15
|
|
16
|
-
_APPLICATION_UPCODE_::Application.create options
|
16
|
+
_APPLICATION_UPCODE_::Application.create! options
|
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: 9
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 11
|
10
|
+
version: 0.0.11
|
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-11-
|
18
|
+
date: 2011-11-20 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
@@ -416,9 +416,6 @@ files:
|
|
416
416
|
- lib/ruby_app/elements/navigation/page_link.html.haml
|
417
417
|
- lib/ruby_app/elements/navigation/page_link.js.haml
|
418
418
|
- lib/ruby_app/elements/navigation/page_link.rb
|
419
|
-
- lib/ruby_app/elements/navigation/page_menu.html.haml
|
420
|
-
- lib/ruby_app/elements/navigation/page_menu.js.haml
|
421
|
-
- lib/ruby_app/elements/navigation/page_menu.rb
|
422
419
|
- lib/ruby_app/elements/page.rb
|
423
420
|
- lib/ruby_app/elements/pages/authentication/open_id/authentication_page.css.haml
|
424
421
|
- lib/ruby_app/elements/pages/authentication/open_id/authentication_page.js.haml
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/
|
2
|
-
#{__FILE__}
|
3
|
-
%div.menu{attributes}
|
4
|
-
- self.pages.each do |page|
|
5
|
-
- if page == self.current_page
|
6
|
-
%div.current
|
7
|
-
%span.current{:page => page}
|
8
|
-
= page.translate.title
|
9
|
-
- else
|
10
|
-
%div.page
|
11
|
-
%a.page{:href => '', :page => page}
|
12
|
-
= page.translate.title
|
@@ -1,10 +0,0 @@
|
|
1
|
-
- self.rendered?(__FILE__) do
|
2
|
-
:plain
|
3
|
-
// #{__FILE__}
|
4
|
-
$(document).ready(function() {
|
5
|
-
$("div.menu a.page").click(function(event) {
|
6
|
-
event.preventDefault();
|
7
|
-
RubyApp.sendEvent({_class:'RubyApp::Elements::Navigation::PageMenu::ClickedEvent', source_id:$(this).parent().parent().attr('id'), page:$(this).attr('page')});
|
8
|
-
});
|
9
|
-
});
|
10
|
-
= yield
|
@@ -1,57 +0,0 @@
|
|
1
|
-
module RubyApp
|
2
|
-
|
3
|
-
module Elements
|
4
|
-
|
5
|
-
module Navigation
|
6
|
-
require 'ruby_app/element'
|
7
|
-
|
8
|
-
class PageMenu < RubyApp::Element
|
9
|
-
|
10
|
-
class ClickedEvent < RubyApp::Element::Event
|
11
|
-
|
12
|
-
attr_reader :page
|
13
|
-
|
14
|
-
def initialize(data)
|
15
|
-
super(data)
|
16
|
-
@page = eval(data['page'])
|
17
|
-
end
|
18
|
-
|
19
|
-
def to_hash
|
20
|
-
super.merge('page' => @page)
|
21
|
-
end
|
22
|
-
|
23
|
-
end
|
24
|
-
|
25
|
-
template_path(:all, File.dirname(__FILE__))
|
26
|
-
|
27
|
-
attr_reader :pages
|
28
|
-
|
29
|
-
def initialize
|
30
|
-
super
|
31
|
-
@pages = []
|
32
|
-
end
|
33
|
-
|
34
|
-
def current_page
|
35
|
-
RubyApp::Session.pages.last.class
|
36
|
-
end
|
37
|
-
|
38
|
-
protected
|
39
|
-
|
40
|
-
def on_event(event)
|
41
|
-
on_clicked(event) if event.is_a?(RubyApp::Elements::Navigation::PageMenu::ClickedEvent)
|
42
|
-
super(event)
|
43
|
-
end
|
44
|
-
|
45
|
-
def on_clicked(event)
|
46
|
-
RubyApp::Session.pages.pop
|
47
|
-
RubyApp::Session.pages.push(event.page.new)
|
48
|
-
event.refresh
|
49
|
-
end
|
50
|
-
|
51
|
-
end
|
52
|
-
|
53
|
-
end
|
54
|
-
|
55
|
-
end
|
56
|
-
|
57
|
-
end
|