fidelity 0.0.1

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.
Files changed (74) hide show
  1. data/.gitignore +15 -0
  2. data/.rvmrc +48 -0
  3. data/Gemfile +13 -0
  4. data/Gemfile.lock +95 -0
  5. data/README.md +46 -0
  6. data/app/.DS_Store +0 -0
  7. data/app/controllers/fidelity/documentations_controller.rb +14 -0
  8. data/app/fidelity/doc/_row.html.erb +8 -0
  9. data/app/fidelity/doc/index.html.erb +33 -0
  10. data/app/fidelity/doc/widgets/_alerts.html.erb +12 -0
  11. data/app/fidelity/doc/widgets/_breadcrumb.html.erb +9 -0
  12. data/app/fidelity/doc/widgets/_buttons.html.erb +4 -0
  13. data/app/fidelity/doc/widgets/_form.html.erb +14 -0
  14. data/app/fidelity/doc/widgets/_labels.html.erb +2 -0
  15. data/app/fidelity/doc/widgets/_navbar.html.erb +12 -0
  16. data/app/fidelity/doc/widgets/_pagination.html.erb +1 -0
  17. data/app/fidelity/doc/widgets/_panel.html.erb +4 -0
  18. data/app/fidelity/doc/widgets/_sub_nav.html.erb +14 -0
  19. data/app/fidelity/doc/widgets/_table.html.erb +10 -0
  20. data/app/fidelity/doc/widgets/_tabs_contained.html.erb +8 -0
  21. data/app/fidelity/doc/widgets/_tabs_nice.html.erb +8 -0
  22. data/app/fidelity/doc/widgets/_tabs_open.html.erb +8 -0
  23. data/app/fidelity/doc/widgets/_tabs_vertical.html.erb +5 -0
  24. data/app/fidelity/doc/widgets/_tooltip.html.erb +8 -0
  25. data/app/fidelity/helpers/misc_helper.rb +25 -0
  26. data/app/fidelity/widgets/alert/views/index.html.erb +4 -0
  27. data/app/fidelity/widgets/breadcrumb/breadcrumb.rb +44 -0
  28. data/app/fidelity/widgets/breadcrumb/helpers/breadcrumb_helper.rb +4 -0
  29. data/app/fidelity/widgets/breadcrumb/views/index.html.erb +7 -0
  30. data/app/fidelity/widgets/button/views/index.html.erb +4 -0
  31. data/app/fidelity/widgets/form/helpers/form_helper.rb +42 -0
  32. data/app/fidelity/widgets/form/views/_label.html.erb +1 -0
  33. data/app/fidelity/widgets/form/views/index.html.erb +1 -0
  34. data/app/fidelity/widgets/form/views/types/_checkbox.html.erb +14 -0
  35. data/app/fidelity/widgets/form/views/types/_radio.html.erb +16 -0
  36. data/app/fidelity/widgets/form/views/types/_select.html.erb +18 -0
  37. data/app/fidelity/widgets/form/views/types/_text.html.erb +4 -0
  38. data/app/fidelity/widgets/form/views/types/_textarea.html.erb +5 -0
  39. data/app/fidelity/widgets/heading/.DS_Store +0 -0
  40. data/app/fidelity/widgets/heading/views/index.html.erb +1 -0
  41. data/app/fidelity/widgets/label/views/index.html.erb +3 -0
  42. data/app/fidelity/widgets/markup/views/index.html.erb +5 -0
  43. data/app/fidelity/widgets/navbar/navbar.rb +62 -0
  44. data/app/fidelity/widgets/navbar/views/index.html.erb +17 -0
  45. data/app/fidelity/widgets/pagination/helpers/pagination_helper.rb +67 -0
  46. data/app/fidelity/widgets/pagination/views/index.html.erb +14 -0
  47. data/app/fidelity/widgets/panel/views/index.html.erb +3 -0
  48. data/app/fidelity/widgets/subnav/subnav.rb +36 -0
  49. data/app/fidelity/widgets/subnav/views/index.html.erb +8 -0
  50. data/app/fidelity/widgets/table/helpers/table_helper.rb +4 -0
  51. data/app/fidelity/widgets/table/views/index.html.erb +5 -0
  52. data/app/fidelity/widgets/tabs/helpers/tab_helper.rb +4 -0
  53. data/app/fidelity/widgets/tabs/tabs.rb +36 -0
  54. data/app/fidelity/widgets/tabs/views/index.html.erb +13 -0
  55. data/app/fidelity/widgets/tooltip/tooltip.rb +18 -0
  56. data/app/fidelity/widgets/tooltip/views/index.html.erb +3 -0
  57. data/app/helpers/fidelity_helper.rb +8 -0
  58. data/config/routes.rb +4 -0
  59. data/fidelity.gemspec +24 -0
  60. data/lib/fidelity.rb +14 -0
  61. data/lib/fidelity/builder.rb +112 -0
  62. data/lib/fidelity/engine.rb +12 -0
  63. data/lib/fidelity/generators/USAGE +9 -0
  64. data/lib/fidelity/generators/install_generator.rb +13 -0
  65. data/lib/fidelity/version.rb +3 -0
  66. data/lib/fidelity/widget_helper.rb +17 -0
  67. data/vendor/assets/images/rails.png +0 -0
  68. data/vendor/assets/javascripts/.DS_Store +0 -0
  69. data/vendor/assets/javascripts/fidelity/app.js +2 -0
  70. data/vendor/assets/stylesheets/.DS_Store +0 -0
  71. data/vendor/assets/stylesheets/fidelity/app.css +11 -0
  72. data/vendor/assets/stylesheets/fidelity/foundation_extra.css.scss +26 -0
  73. data/vendor/assets/stylesheets/fidelity/grid.css.scss +49 -0
  74. metadata +173 -0
@@ -0,0 +1,15 @@
1
+ # See http://help.github.com/ignore-files/ for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile ~/.gitignore_global
6
+
7
+ # Ignore bundler config
8
+ /.bundle
9
+
10
+ # Ignore the default SQLite database.
11
+ /db/*.sqlite3
12
+
13
+ # Ignore all logfiles and tempfiles.
14
+ /log/*.log
15
+ /tmp
data/.rvmrc ADDED
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # This is an RVM Project .rvmrc file, used to automatically load the ruby
4
+ # development environment upon cd'ing into the directory
5
+
6
+ # First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
7
+ # Only full ruby name is supported here, for short names use:
8
+ # echo "rvm use 1.9.3" > .rvmrc
9
+ environment_id="ruby-1.9.3-p0@fidelity_engine"
10
+
11
+ # Uncomment the following lines if you want to verify rvm version per project
12
+ # rvmrc_rvm_version="1.10.2" # 1.10.1 seams as a safe start
13
+ # eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
14
+ # echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
15
+ # return 1
16
+ # }
17
+
18
+ # First we attempt to load the desired environment directly from the environment
19
+ # file. This is very fast and efficient compared to running through the entire
20
+ # CLI and selector. If you want feedback on which environment was used then
21
+ # insert the word 'use' after --create as this triggers verbose mode.
22
+ if [[ -d "${rvm_path:-$HOME/.rvm}/environments"
23
+ && -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
24
+ then
25
+ \. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
26
+ [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] &&
27
+ \. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true
28
+ else
29
+ # If the environment file has not yet been created, use the RVM CLI to select.
30
+ rvm --create "$environment_id" || {
31
+ echo "Failed to create RVM environment '${environment_id}'."
32
+ return 1
33
+ }
34
+ fi
35
+
36
+ # If you use bundler, this might be useful to you:
37
+ # if [[ -s Gemfile ]] && {
38
+ # ! builtin command -v bundle >/dev/null ||
39
+ # builtin command -v bundle | grep $rvm_path/bin/bundle >/dev/null
40
+ # }
41
+ # then
42
+ # printf "%b" "The rubygem 'bundler' is not installed. Installing it now.\n"
43
+ # gem install bundler
44
+ # fi
45
+ # if [[ -s Gemfile ]] && builtin command -v bundle >/dev/null
46
+ # then
47
+ # bundle install | grep -vE '^Using|Your bundle is complete'
48
+ # fi
data/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'zurb-foundation', :path => '~/Projects/fidelity_dev/foundation_gem'
4
+
5
+ group :assets do
6
+ gem 'sass-rails', '~> 3.2.3'
7
+ gem 'coffee-rails', '~> 3.2.1'
8
+
9
+ # See https://github.com/sstephenson/execjs#readme for more supported runtimes
10
+ # gem 'therubyracer'
11
+
12
+ gem 'uglifier', '>= 1.0.3'
13
+ end
@@ -0,0 +1,95 @@
1
+ PATH
2
+ remote: ~/Projects/fidelity_dev/foundation_gem
3
+ specs:
4
+ zurb-foundation (2.1.5.1)
5
+ jquery-rails (>= 1.0)
6
+ rails (~> 3.1)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionmailer (3.2.1)
12
+ actionpack (= 3.2.1)
13
+ mail (~> 2.4.0)
14
+ actionpack (3.2.1)
15
+ activemodel (= 3.2.1)
16
+ activesupport (= 3.2.1)
17
+ builder (~> 3.0.0)
18
+ erubis (~> 2.7.0)
19
+ journey (~> 1.0.1)
20
+ rack (~> 1.4.0)
21
+ rack-cache (~> 1.1)
22
+ rack-test (~> 0.6.1)
23
+ sprockets (~> 2.1.2)
24
+ activemodel (3.2.1)
25
+ activesupport (= 3.2.1)
26
+ builder (~> 3.0.0)
27
+ activerecord (3.2.1)
28
+ activemodel (= 3.2.1)
29
+ activesupport (= 3.2.1)
30
+ arel (~> 3.0.0)
31
+ tzinfo (~> 0.3.29)
32
+ activeresource (3.2.1)
33
+ activemodel (= 3.2.1)
34
+ activesupport (= 3.2.1)
35
+ activesupport (3.2.1)
36
+ i18n (~> 0.6)
37
+ multi_json (~> 1.0)
38
+ arel (3.0.0)
39
+ builder (3.0.0)
40
+ erubis (2.7.0)
41
+ hike (1.2.1)
42
+ i18n (0.6.0)
43
+ journey (1.0.1)
44
+ jquery-rails (2.0.0)
45
+ railties (>= 3.2.0.beta, < 5.0)
46
+ thor (~> 0.14)
47
+ json (1.6.5)
48
+ mail (2.4.1)
49
+ i18n (>= 0.4.0)
50
+ mime-types (~> 1.16)
51
+ treetop (~> 1.4.8)
52
+ mime-types (1.17.2)
53
+ multi_json (1.0.4)
54
+ polyglot (0.3.3)
55
+ rack (1.4.1)
56
+ rack-cache (1.1)
57
+ rack (>= 0.4)
58
+ rack-ssl (1.3.2)
59
+ rack
60
+ rack-test (0.6.1)
61
+ rack (>= 1.0)
62
+ rails (3.2.1)
63
+ actionmailer (= 3.2.1)
64
+ actionpack (= 3.2.1)
65
+ activerecord (= 3.2.1)
66
+ activeresource (= 3.2.1)
67
+ activesupport (= 3.2.1)
68
+ bundler (~> 1.0)
69
+ railties (= 3.2.1)
70
+ railties (3.2.1)
71
+ actionpack (= 3.2.1)
72
+ activesupport (= 3.2.1)
73
+ rack-ssl (~> 1.3.2)
74
+ rake (>= 0.8.7)
75
+ rdoc (~> 3.4)
76
+ thor (~> 0.14.6)
77
+ rake (0.9.2.2)
78
+ rdoc (3.12)
79
+ json (~> 1.4)
80
+ sprockets (2.1.2)
81
+ hike (~> 1.2)
82
+ rack (~> 1.0)
83
+ tilt (~> 1.1, != 1.3.0)
84
+ thor (0.14.6)
85
+ tilt (1.3.3)
86
+ treetop (1.4.10)
87
+ polyglot
88
+ polyglot (>= 0.3.1)
89
+ tzinfo (0.3.31)
90
+
91
+ PLATFORMS
92
+ ruby
93
+
94
+ DEPENDENCIES
95
+ zurb-foundation!
@@ -0,0 +1,46 @@
1
+ # Fidelity gem
2
+ A Ruby on Rails DSL for creating rapid prototypes. Depends on [Foundation](http://http://foundation.zurb.com/).
3
+
4
+ Install
5
+ -----
6
+
7
+ This is still in alpha and under development. But to test clone this rails engine:
8
+
9
+ git clone@github.com/jhoglund/fidelity.git
10
+
11
+ Link to in from gem to your Gemfile in your Ruby on Rails 3.2 application and add the 'zurb-foundation' gem:
12
+
13
+ gem "fidelity", :path => 'path/to/the/git/repository'
14
+ gem 'zurb-foundation'
15
+
16
+ Once you have it installed you need to run inside the rails applications root directory:
17
+
18
+ rails g fidelity:install
19
+
20
+
21
+ How to use
22
+ -----
23
+
24
+ Below is a brief example of how to use the DSL (the example is a HAML template so don't forget to include the haml gem in your Gemfile to make the example work ).
25
+
26
+ ```ruby
27
+ = fidelity_for(:width => 960) do |f|
28
+ = f.row do
29
+ = f.column(3) do
30
+ = f.widget :heading, 'Label'
31
+ = f.column(9) do
32
+ = f.widget :label, :content => 'This is the content of the label'
33
+ = f.row(:border => true) do
34
+ = f.column(3) do
35
+ = f.widget :heading, 'Alert'
36
+ = f.column(9) do
37
+ = f.widget(:alert, :type => :success) do
38
+ This is a success alert
39
+ = f.widget(:alert, :type => :error) do
40
+ This is a error alert
41
+ = f.row(:border => true) do
42
+ = f.column(3) do
43
+ = f.widget :heading, 'Buttons'
44
+ = f.column(9) do
45
+ %p= f.widget :button, :size => 'medium', :corners => 'radius', :style => 'nice', :color => 'red', :label => 'Medium red nice looking button'
46
+ ```
Binary file
@@ -0,0 +1,14 @@
1
+ class Fidelity::DocumentationsController < ApplicationController
2
+ prepend_view_path Fidelity::Engine.root.join("app/fidelity/doc")
3
+
4
+ def show
5
+ render :template => current_page
6
+ end
7
+
8
+ private
9
+
10
+ def current_page
11
+ 'index'
12
+ end
13
+
14
+ end
@@ -0,0 +1,8 @@
1
+ <%= fidelity.row(:border) do %>
2
+ <%= fidelity.column(3, :shaded) do %>
3
+ <h3 class="doc-label"><%= heading %></h3>
4
+ <% end %>
5
+ <%= fidelity.column(9) do %>
6
+ <%= yield %>
7
+ <% end %>
8
+ <% end %>
@@ -0,0 +1,33 @@
1
+
2
+ <%= fidelity_for do |fidelity| %>
3
+ <%
4
+ widgets = {
5
+ :form => 'Form',
6
+ :table => 'Table',
7
+ :breadcrumb => 'Breadcrumb',
8
+ :pagination => 'Pagination',
9
+ :panel => 'Panel',
10
+ :sub_nav => 'Sub nav',
11
+ :navbar => 'Navbar',
12
+ :tabs_contained => 'Tabs (contained)',
13
+ :tabs_open => 'Tabs (open)',
14
+ :tabs_nice => 'Nice tabs',
15
+ :tabs_vertical => 'Vertical tabs',
16
+ :labels => 'Labels',
17
+ :tooltip => 'Tooltip',
18
+ :alerts => 'Alerts',
19
+ :buttons => 'Buttons'
20
+ }
21
+ %>
22
+
23
+ <%= fidelity.grid(:visible => false) do %>
24
+ <% widgets.each do |k,v| %>
25
+ <%= render :layout => "/row", :locals => { :fidelity => fidelity, :heading => v } do %>
26
+ <%= render :partial => "/widgets/#{k.to_s}", :locals => { :fidelity => fidelity } %>
27
+ <hr>
28
+ <%= CodeRay.scan_file(Fidelity::Engine.root.join('app','fidelity','doc','widgets',"_#{k.to_s}.html.erb"), :erb).div(:line_numbers => :table).html_safe %>
29
+ <% end %>
30
+ <% end %>
31
+ <% end %>
32
+
33
+ <% end %>
@@ -0,0 +1,12 @@
1
+ <%= fidelity.widget(:alert) do %>
2
+ This is a default label
3
+ <% end %>
4
+ <%= fidelity.widget(:alert, :type => :success) do %>
5
+ This is a success label
6
+ <% end %>
7
+ <%= fidelity.widget(:alert, :type => :warning) do %>
8
+ This is a warning label
9
+ <% end %>
10
+ <%= fidelity.widget(:alert, :type => :error) do %>
11
+ This is a error label
12
+ <% end %>
@@ -0,0 +1,9 @@
1
+ <%= fidelity.widget(:breadcrumb) do |b| %>
2
+ <%= b.item('First', :state => :current, :path => 'xxx') %>
3
+ <%= b.item('Second', :state => :unavailable, :path => 'xxx') %>
4
+ <%= b.item('Third', :path => 'xxx') %>
5
+ <%= b.item('Fourth', :path => 'xxx') %>
6
+ <%= b.item('This label will not be used since we have a block') do %>
7
+ <span>Fifth <a href="ccc" style="margin:0 -10px">element</a></span>
8
+ <% end %>
9
+ <% end %>
@@ -0,0 +1,4 @@
1
+ <p><%= fidelity.widget :button, :size => 'small', :corners => nil, :style => nil, :color => 'red', :text => 'This is a small red standard button' %>
2
+ <p><%= fidelity.widget :button, :size => 'medium', :corners => 'round', :style => nil, :color => 'blue', :text => 'This is a medium blue rounded button' %>
3
+ <p><%= fidelity.widget :button, :size => 'large', :corners => 'radius', :style => 'nice', :color => 'black', :text => 'This is a large black nice button with rounded edges' %>
4
+ <p><%= fidelity.widget :button, :size => 'medium', :corners => 'radius', :style => 'nice', :color => 'white', :text => 'This is a medium white nice button with rounded edges' %>
@@ -0,0 +1,14 @@
1
+ <%= fidelity.widget(:form, :label => 'Text field', :placeholder => 'Some text') %>
2
+ <hr>
3
+ <%= fidelity.widget(:form, :type => :textarea, :label => 'Textarea', :placeholder => 'Some text') do %>
4
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.
5
+ <% end %>
6
+ <hr>
7
+ <%= fidelity.widget(:form, :type => :checkbox, :collection => %w(First Second Third Forth), :checked => [1,2], :label => 'Checkboxes') %>
8
+ <hr>
9
+ <%= fidelity.widget(:form, :type => :radio, :collection => %w(First Second Third Forth), :checked => 1, :label => 'Radio buttons') %>
10
+ <hr>
11
+ <%= fidelity.widget(:form, :type => :select, :collection => %w(First Second Third Forth), :checked => 3, :label => 'Select menu') %>
12
+ <hr>
13
+ <%= fidelity.widget(:form, :label => 'Text field', :placeholder => 'Some text', :error => 'With error') %>
14
+ <hr>
@@ -0,0 +1,2 @@
1
+ <%= fidelity.widget :label, :text => 'This is the content' %>
2
+ <%= fidelity.widget :label, :text => 'This is the content', :color => 'green', :corners => 'round' %>
@@ -0,0 +1,12 @@
1
+ <%= fidelity.widget(:navbar) do |n| %>
2
+ <%= n.item do %>
3
+ <%= fidelity.widget :label, :text => 'A label in an item' %>
4
+ <% end %>
5
+ <%= n.link do %>
6
+ A link
7
+ <% end %>
8
+ <%= n.flyout(:label => 'A flyout') do %>
9
+ <h4>The content of the flyout</h4>
10
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
11
+ <% end %>
12
+ <% end %>
@@ -0,0 +1 @@
1
+ <%= fidelity.widget(:pagination, { :range => 1..12, :page => 2, :size => 8 }) %>
@@ -0,0 +1,4 @@
1
+ <%= fidelity.widget :panel do %>
2
+ <h4>Consectetur adipisicing elit</h4>
3
+ <p> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
4
+ <% end %>
@@ -0,0 +1,14 @@
1
+ <%= fidelity.widget(:subnav) do |s| %>
2
+ <%= s.title do %>
3
+ Filter:
4
+ <% end %>
5
+ <%= s.item do %>
6
+ Alphabetically
7
+ <% end %>
8
+ <%= s.item(:state => :active) do %>
9
+ By date
10
+ <% end %>
11
+ <%= s.item do %>
12
+ By relevance
13
+ <% end %>
14
+ <% end %>
@@ -0,0 +1,10 @@
1
+ <%= fidelity.widget(:table) do %>
2
+ | Left align | Right align | Center align
3
+ |:-----------|------------:|:------------:
4
+ | This | This | This
5
+ | column | column | column
6
+ | will | will | will
7
+ | be | be | be
8
+ | left | right | center
9
+ | aligned | aligned | aligned
10
+ <% end %>
@@ -0,0 +1,8 @@
1
+ <%= fidelity.widget(:tabs, :outline => :contained) do |t| %>
2
+ <%= t.tab('First tab', :state => :active) do %>
3
+ Eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in.
4
+ <% end %>
5
+ <%= t.tab('Second tab') do %>
6
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in.
7
+ <% end %>
8
+ <% end %>
@@ -0,0 +1,8 @@
1
+ <%= fidelity.widget(:tabs, :outline => :contained, :style => :nice) do |t| %>
2
+ <%= t.tab('First tab') do %>
3
+ Eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in.
4
+ <% end %>
5
+ <%= t.tab('Second tab', :state => :active) do %>
6
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in.
7
+ <% end %>
8
+ <% end %>
@@ -0,0 +1,8 @@
1
+ <%= fidelity.widget(:tabs) do |t| %>
2
+ <%= t.tab('First tab') do %>
3
+ Eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in.
4
+ <% end %>
5
+ <%= t.tab('Second tab', :state => :active) do %>
6
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in.
7
+ <% end %>
8
+ <% end %>
@@ -0,0 +1,5 @@
1
+ <%= fidelity.widget(:tabs, :outline => :contained, :orientation => :vertical, :style => :nice) do |t| %>
2
+ <%= t.tab('First tab') %>
3
+ <%= t.tab('Second tab', :state => :active) %>
4
+ <%= t.tab('Third tab') %>
5
+ <% end %>
@@ -0,0 +1,8 @@
1
+ This is some text width some
2
+ <%= fidelity.widget :tooltip do |t| %>
3
+ <% t.tip do %>
4
+ This is the content of the Tip
5
+ <% end %>
6
+ tooltip to it
7
+ <% end %>
8
+ Eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
@@ -0,0 +1,25 @@
1
+ module Fidelity
2
+ module MiscHelper
3
+
4
+ def to_html_attributes *args
5
+ [''].tap do |a|
6
+ to_attribute_hash(args).each do |name, value|
7
+ a << %Q(#{name.to_s}="#{value}")
8
+ end
9
+ end.join(' ').html_safe
10
+ end
11
+
12
+ private
13
+
14
+ def to_attribute_hash args
15
+ args.extract_options!.tap do |arguments|
16
+ if options = args.shift and not args.empty?
17
+ args.each do |name|
18
+ arguments.merge!(name => options[name])
19
+ end
20
+ end
21
+ end
22
+ end
23
+
24
+ end
25
+ end