bettertabs 1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/.gitignore +5 -0
  2. data/Gemfile +4 -0
  3. data/Gemfile.lock +14 -0
  4. data/README.md +288 -0
  5. data/Rakefile +2 -0
  6. data/bettertabs.gemspec +19 -0
  7. data/lib/bettertabs.rb +7 -0
  8. data/lib/bettertabs/bettertabs_builder.rb +162 -0
  9. data/lib/bettertabs/bettertabs_helper.rb +16 -0
  10. data/lib/bettertabs/javascripts/README.md +38 -0
  11. data/lib/bettertabs/javascripts/jquery.bettertabs.coffee +77 -0
  12. data/lib/bettertabs/javascripts/jquery.bettertabs.js +81 -0
  13. data/lib/bettertabs/javascripts/jquery.bettertabs.min.js +4 -0
  14. data/lib/bettertabs/version.rb +3 -0
  15. data/test/README_for_TEST.txt +5 -0
  16. data/test/ruby_1_9/rails_3_0/.rspec +1 -0
  17. data/test/ruby_1_9/rails_3_0/.rvmc +1 -0
  18. data/test/ruby_1_9/rails_3_0/Gemfile +11 -0
  19. data/test/ruby_1_9/rails_3_0/Gemfile.lock +105 -0
  20. data/test/ruby_1_9/rails_3_0/README +3 -0
  21. data/test/ruby_1_9/rails_3_0/Rakefile +7 -0
  22. data/test/ruby_1_9/rails_3_0/app/controllers/application_controller.rb +3 -0
  23. data/test/ruby_1_9/rails_3_0/app/controllers/bettertabs_controller.rb +24 -0
  24. data/test/ruby_1_9/rails_3_0/app/helpers/application_helper.rb +2 -0
  25. data/test/ruby_1_9/rails_3_0/app/views/bettertabs/_ajax.html.haml +6 -0
  26. data/test/ruby_1_9/rails_3_0/app/views/bettertabs/_link.html.haml +4 -0
  27. data/test/ruby_1_9/rails_3_0/app/views/bettertabs/_mixed.html.haml +6 -0
  28. data/test/ruby_1_9/rails_3_0/app/views/bettertabs/_tab_content.html.haml +1 -0
  29. data/test/ruby_1_9/rails_3_0/app/views/bettertabs/ajax.html.haml +2 -0
  30. data/test/ruby_1_9/rails_3_0/app/views/bettertabs/link_tab_1.html.haml +2 -0
  31. data/test/ruby_1_9/rails_3_0/app/views/bettertabs/link_tab_2.html.haml +2 -0
  32. data/test/ruby_1_9/rails_3_0/app/views/bettertabs/mixed.html.haml +2 -0
  33. data/test/ruby_1_9/rails_3_0/app/views/bettertabs/mixed_with_erb.html.erb +8 -0
  34. data/test/ruby_1_9/rails_3_0/app/views/bettertabs/static.html.haml +7 -0
  35. data/test/ruby_1_9/rails_3_0/app/views/layouts/application.html.erb +23 -0
  36. data/test/ruby_1_9/rails_3_0/config.ru +4 -0
  37. data/test/ruby_1_9/rails_3_0/config/application.rb +47 -0
  38. data/test/ruby_1_9/rails_3_0/config/boot.rb +6 -0
  39. data/test/ruby_1_9/rails_3_0/config/environment.rb +5 -0
  40. data/test/ruby_1_9/rails_3_0/config/environments/development.rb +26 -0
  41. data/test/ruby_1_9/rails_3_0/config/environments/test.rb +35 -0
  42. data/test/ruby_1_9/rails_3_0/config/initializers/mime_types.rb +5 -0
  43. data/test/ruby_1_9/rails_3_0/config/initializers/secret_token.rb +7 -0
  44. data/test/ruby_1_9/rails_3_0/config/initializers/session_store.rb +8 -0
  45. data/test/ruby_1_9/rails_3_0/config/routes.rb +6 -0
  46. data/test/ruby_1_9/rails_3_0/public/404.html +26 -0
  47. data/test/ruby_1_9/rails_3_0/public/422.html +26 -0
  48. data/test/ruby_1_9/rails_3_0/public/500.html +26 -0
  49. data/test/ruby_1_9/rails_3_0/public/favicon.ico +0 -0
  50. data/test/ruby_1_9/rails_3_0/public/images/rails.png +0 -0
  51. data/test/ruby_1_9/rails_3_0/public/javascripts/jquery-1.5.2.min.js +16 -0
  52. data/test/ruby_1_9/rails_3_0/public/javascripts/jquery.bettertabs.min.js +4 -0
  53. data/test/ruby_1_9/rails_3_0/public/javascripts/rails.js +278 -0
  54. data/test/ruby_1_9/rails_3_0/public/robots.txt +5 -0
  55. data/test/ruby_1_9/rails_3_0/public/stylesheets/bettertabs.css +23 -0
  56. data/test/ruby_1_9/rails_3_0/public/stylesheets/layout.css +8 -0
  57. data/test/ruby_1_9/rails_3_0/script/rails +6 -0
  58. data/test/ruby_1_9/rails_3_0/spec/requests/bettertabs_spec.rb +54 -0
  59. data/test/ruby_1_9/rails_3_0/spec/spec_helper.rb +19 -0
  60. metadata +122 -0
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-Agent: *
5
+ # Disallow: /
@@ -0,0 +1,23 @@
1
+ div.bettertabs { margin: 1em; width: 500px; }
2
+
3
+ div.bettertabs ul.tabs { margin: 0; padding: 0; position: relative; }
4
+ div.bettertabs ul.tabs li {
5
+ background-color: #ccc;
6
+ border: 1px solid #999;
7
+ display: inline; float: left; height: 24px; line-height: 24px;
8
+ list-style: none outside none;
9
+ margin-right: .5em; padding-right: .5em; padding-left: .5em;
10
+ position: relative; top: 1px;
11
+ }
12
+ div.bettertabs ul.tabs li.active { height: 25px; background-color: #eee; border-bottom: none; }
13
+ div.bettertabs ul.tabs li.active a { color: black; }
14
+
15
+ div.bettertabs ul.tabs li a { font-size: 80%; text-decoration: none; float: left; }
16
+ div.bettertabs ul.tabs li a:link,
17
+ div.bettertabs ul.tabs li a:visited { color: #444; }
18
+ div.bettertabs ul.tabs li a:hover { color: black; }
19
+ div.bettertabs ul.tabs li a:active { color: blue; }
20
+
21
+ div.bettertabs div.content { padding: 1em; border: 1px solid #999; background-color: #eee; clear: left; }
22
+ div.bettertabs div.content.hidden { display: block; margin: 5px; border: 2px dashed #ccc; background-color: white; } /* display: none; to hide content */
23
+ div.bettertabs div.content.active { display: block; }
@@ -0,0 +1,8 @@
1
+ body {
2
+ background-color: white;
3
+ margin: 10px;
4
+ font-size: 12px;
5
+ font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
6
+ }
7
+ div.nav { margin: 10px 0 20px 24px; padding: 0; }
8
+ div.nav a { padding: 0 5px 0 6px; }
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,54 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Bettertabs requests" do
4
+ describe "GET /bettertabs/static" do
5
+ it "has a 200 status code" do
6
+ get '/bettertabs/static'
7
+ response.status.should be(200)
8
+ end
9
+
10
+ it "should render all content even for hidden tabs" do
11
+ get '/bettertabs/static'
12
+ response.body.should include("Content for tab1")
13
+ response.body.should include("Content for tab2")
14
+ response.body.should include("tab_content partial content")
15
+ end
16
+ end
17
+
18
+ describe "GET /bettertabs/link_tab_1" do
19
+ it "has a 200 status code" do
20
+ get '/bettertabs/link_tab_1'
21
+ response.status.should be(200)
22
+ end
23
+ end
24
+
25
+ describe "GET /bettertabs/link_tab_2" do
26
+ it "has a 200 status code" do
27
+ get '/bettertabs/link_tab_2'
28
+ response.status.should be(200)
29
+ end
30
+ end
31
+
32
+ describe "GET /bettertabs/ajax" do
33
+ it "has a 200 status code" do
34
+ get '/bettertabs/ajax'
35
+ response.status.should be(200)
36
+ end
37
+ end
38
+
39
+ describe "GET /bettertabs/mixed" do
40
+ it "has a 200 status code" do
41
+ get '/bettertabs/mixed'
42
+ response.status.should be(200)
43
+ end
44
+ end
45
+
46
+ describe "GET /bettertabs/mixed_with_erb" do
47
+ it "has a 200 status code" do
48
+ get '/bettertabs/mixed_with_erb'
49
+ response.status.should be(200)
50
+ end
51
+ end
52
+
53
+
54
+ end
@@ -0,0 +1,19 @@
1
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
2
+ ENV["RAILS_ENV"] ||= 'test'
3
+ require File.expand_path("../../config/environment", __FILE__)
4
+ require 'rspec/rails'
5
+
6
+ # Requires supporting ruby files with custom matchers and macros, etc,
7
+ # in spec/support/ and its subdirectories.
8
+ Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
9
+
10
+ RSpec.configure do |config|
11
+ # == Mock Framework
12
+ #
13
+ # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
14
+ #
15
+ # config.mock_with :mocha
16
+ # config.mock_with :flexmock
17
+ # config.mock_with :rr
18
+ config.mock_with :rspec
19
+ end
metadata ADDED
@@ -0,0 +1,122 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bettertabs
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 0
8
+ version: "1.0"
9
+ platform: ruby
10
+ authors:
11
+ - Mario Izquierdo
12
+ autorequire:
13
+ bindir: bin
14
+ cert_chain: []
15
+
16
+ date: 2011-04-25 00:00:00 -04:00
17
+ default_executable:
18
+ dependencies: []
19
+
20
+ description: "The bettertabs helper defines the markup for a tabbed area in a easy and declarative way, using the appropiate JavaScript but ensuring accessibility and usability, no matter if the content is loaded statically, via ajax or the tabs are links. In the other hand, the CSS styles are up to you. "
21
+ email:
22
+ - tothemario@gmail.com
23
+ executables: []
24
+
25
+ extensions: []
26
+
27
+ extra_rdoc_files: []
28
+
29
+ files:
30
+ - .gitignore
31
+ - Gemfile
32
+ - Gemfile.lock
33
+ - README.md
34
+ - Rakefile
35
+ - bettertabs.gemspec
36
+ - lib/bettertabs.rb
37
+ - lib/bettertabs/bettertabs_builder.rb
38
+ - lib/bettertabs/bettertabs_helper.rb
39
+ - lib/bettertabs/javascripts/README.md
40
+ - lib/bettertabs/javascripts/jquery.bettertabs.coffee
41
+ - lib/bettertabs/javascripts/jquery.bettertabs.js
42
+ - lib/bettertabs/javascripts/jquery.bettertabs.min.js
43
+ - lib/bettertabs/version.rb
44
+ - test/README_for_TEST.txt
45
+ - test/ruby_1_9/rails_3_0/.rspec
46
+ - test/ruby_1_9/rails_3_0/.rvmc
47
+ - test/ruby_1_9/rails_3_0/Gemfile
48
+ - test/ruby_1_9/rails_3_0/Gemfile.lock
49
+ - test/ruby_1_9/rails_3_0/README
50
+ - test/ruby_1_9/rails_3_0/Rakefile
51
+ - test/ruby_1_9/rails_3_0/app/controllers/application_controller.rb
52
+ - test/ruby_1_9/rails_3_0/app/controllers/bettertabs_controller.rb
53
+ - test/ruby_1_9/rails_3_0/app/helpers/application_helper.rb
54
+ - test/ruby_1_9/rails_3_0/app/views/bettertabs/_ajax.html.haml
55
+ - test/ruby_1_9/rails_3_0/app/views/bettertabs/_link.html.haml
56
+ - test/ruby_1_9/rails_3_0/app/views/bettertabs/_mixed.html.haml
57
+ - test/ruby_1_9/rails_3_0/app/views/bettertabs/_tab_content.html.haml
58
+ - test/ruby_1_9/rails_3_0/app/views/bettertabs/ajax.html.haml
59
+ - test/ruby_1_9/rails_3_0/app/views/bettertabs/link_tab_1.html.haml
60
+ - test/ruby_1_9/rails_3_0/app/views/bettertabs/link_tab_2.html.haml
61
+ - test/ruby_1_9/rails_3_0/app/views/bettertabs/mixed.html.haml
62
+ - test/ruby_1_9/rails_3_0/app/views/bettertabs/mixed_with_erb.html.erb
63
+ - test/ruby_1_9/rails_3_0/app/views/bettertabs/static.html.haml
64
+ - test/ruby_1_9/rails_3_0/app/views/layouts/application.html.erb
65
+ - test/ruby_1_9/rails_3_0/config.ru
66
+ - test/ruby_1_9/rails_3_0/config/application.rb
67
+ - test/ruby_1_9/rails_3_0/config/boot.rb
68
+ - test/ruby_1_9/rails_3_0/config/environment.rb
69
+ - test/ruby_1_9/rails_3_0/config/environments/development.rb
70
+ - test/ruby_1_9/rails_3_0/config/environments/test.rb
71
+ - test/ruby_1_9/rails_3_0/config/initializers/mime_types.rb
72
+ - test/ruby_1_9/rails_3_0/config/initializers/secret_token.rb
73
+ - test/ruby_1_9/rails_3_0/config/initializers/session_store.rb
74
+ - test/ruby_1_9/rails_3_0/config/routes.rb
75
+ - test/ruby_1_9/rails_3_0/public/404.html
76
+ - test/ruby_1_9/rails_3_0/public/422.html
77
+ - test/ruby_1_9/rails_3_0/public/500.html
78
+ - test/ruby_1_9/rails_3_0/public/favicon.ico
79
+ - test/ruby_1_9/rails_3_0/public/images/rails.png
80
+ - test/ruby_1_9/rails_3_0/public/javascripts/jquery-1.5.2.min.js
81
+ - test/ruby_1_9/rails_3_0/public/javascripts/jquery.bettertabs.min.js
82
+ - test/ruby_1_9/rails_3_0/public/javascripts/rails.js
83
+ - test/ruby_1_9/rails_3_0/public/robots.txt
84
+ - test/ruby_1_9/rails_3_0/public/stylesheets/bettertabs.css
85
+ - test/ruby_1_9/rails_3_0/public/stylesheets/layout.css
86
+ - test/ruby_1_9/rails_3_0/script/rails
87
+ - test/ruby_1_9/rails_3_0/spec/requests/bettertabs_spec.rb
88
+ - test/ruby_1_9/rails_3_0/spec/spec_helper.rb
89
+ has_rdoc: true
90
+ homepage: ""
91
+ licenses: []
92
+
93
+ post_install_message:
94
+ rdoc_options: []
95
+
96
+ require_paths:
97
+ - lib
98
+ required_ruby_version: !ruby/object:Gem::Requirement
99
+ none: false
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ segments:
104
+ - 0
105
+ version: "0"
106
+ required_rubygems_version: !ruby/object:Gem::Requirement
107
+ none: false
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ segments:
112
+ - 0
113
+ version: "0"
114
+ requirements: []
115
+
116
+ rubyforge_project: bettertabs
117
+ rubygems_version: 1.3.7
118
+ signing_key:
119
+ specification_version: 3
120
+ summary: The better (simple, accessible, usable, flexible and fast) way to split content in tabs.
121
+ test_files: []
122
+