aurita-gui 0.1.0

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.
data/test/tc_form.rb ADDED
@@ -0,0 +1,30 @@
1
+
2
+ require('aurita-gui/form')
3
+
4
+ include Aurita::GUI
5
+
6
+ form = Form.new(:method => :post, :action => '/where/to/send', :onsubmit => "alert('submitting');")
7
+
8
+ input1 = Input_Field.new(:name => :description, :label => 'Description',
9
+ :class => :custom_input_field_class,
10
+ :value => 'first input text'),
11
+ input2 = Input_Field.new(:name => :custom, :label => 'Custom ID',
12
+ :id => :custom_id_value,
13
+ :value => 'second input text'),
14
+ select = Select_Field.new(:name => :category, :label => 'Select category',
15
+ :disabled => true,
16
+ :value => :value_b, # Value to be selected
17
+ :options => { :value_a => :key_a, :value_b => :key_b })
18
+ form[1].readonly!
19
+ form.each { |e| e.attrib[:class] = [ e.attrib[:class], :aurita ] }
20
+ form.each { |e| e.attrib[:onfocus] = "alert('focussed #{e.id}');" }
21
+
22
+ puts HTML.h1 { 'Single element' }
23
+ puts form.element_map[:description]
24
+
25
+ puts HTML.h1 { 'Editable form, one element disabled' }
26
+ puts form
27
+
28
+ puts HTML.h1 { 'Readonly form' }
29
+ form.readonly!
30
+ puts form
data/test/tc_table.rb ADDED
@@ -0,0 +1,23 @@
1
+
2
+ require 'aurita-gui/table'
3
+
4
+
5
+ include Aurita::GUI
6
+
7
+ t = Table.new(:headers => ['user', 'phone', 'email'],
8
+ :options => { :class => 'css_class', :id => 'test_table', :border => 1, :cellpadding => 3 })
9
+
10
+ t.add_row([ 'a','b','c' ])
11
+ t.add_row([ 'd','e','f','g' ])
12
+
13
+ t[0][0].value = 'foo'
14
+ t[0][0].colspan = 2
15
+ t[1][0].onclick = 'test();'
16
+ t[0][1] = HTML.a(:href => 'http://google.com') { 'google' }
17
+
18
+ t[0][1].value.href = 'other'
19
+ t[0][1].value.content = 'clickme'
20
+
21
+ t[0].class = 'highlighted'
22
+
23
+ puts t
metadata ADDED
@@ -0,0 +1,86 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: aurita-gui
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Tobias Fuchs
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-01-09 00:00:00 +01:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: Aurita::GUI provides an intuitive and flexible API for object-oriented creation of primitive and complex HTML elements, such as tables and forms. It is a core module of the Aurita application framework, but it can be used as stand-alone library in any context (such as rails). As there seems to be a lack of ruby form generators, i decided to release this part of Aurita in a single gem with no dependencies.
17
+ email: fuchs@atomnode.net
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files: []
23
+
24
+ files:
25
+ - History.txt
26
+ - lib
27
+ - aurita-gui-0.1.0.gem
28
+ - aurita-gui.gemspec
29
+ - bin
30
+ - test
31
+ - LICENSE
32
+ - lib/aurita-gui
33
+ - lib/aurita-gui.rb
34
+ - lib/aurita-gui/button.rb
35
+ - lib/aurita-gui/form.rb
36
+ - lib/aurita-gui/html.rb
37
+ - lib/aurita-gui/table.rb
38
+ - lib/aurita-gui/form
39
+ - lib/aurita-gui/element.rb
40
+ - lib/aurita-gui/form/options_field.rb
41
+ - lib/aurita-gui/form/file_field.rb
42
+ - lib/aurita-gui/form/form_error.rb
43
+ - lib/aurita-gui/form/checkbox_field.rb
44
+ - lib/aurita-gui/form/form_field.rb
45
+ - lib/aurita-gui/form/textarea_field.rb
46
+ - lib/aurita-gui/form/datetime_field.rb
47
+ - lib/aurita-gui/form/fieldset.rb
48
+ - lib/aurita-gui/form/select_field.rb
49
+ - lib/aurita-gui/form/radio_field.rb
50
+ - lib/aurita-gui/form/hidden_field.rb
51
+ - lib/aurita-gui/form/input_field.rb
52
+ - lib/aurita-gui/form/date_field.rb
53
+ - test/tc_table.rb
54
+ - test/tc_form.rb
55
+ has_rdoc: true
56
+ homepage: http://aurita.wortundform.de/
57
+ post_install_message:
58
+ rdoc_options:
59
+ - --title
60
+ - Aurita::GUI
61
+ - --main
62
+ - Aurita::GUI::HTML
63
+ - --line-numbers
64
+ require_paths:
65
+ - lib
66
+ required_ruby_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: "0"
71
+ version:
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: "0"
77
+ version:
78
+ requirements: []
79
+
80
+ rubyforge_project: aurita
81
+ rubygems_version: 1.1.1
82
+ signing_key:
83
+ specification_version: 2
84
+ summary: Dead-simple object-oriented creation of HTML elements, including forms, tables and many more.
85
+ test_files: []
86
+