contour 1.2.0.pre4 → 1.2.0.pre5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,8 @@
1
1
  == 1.2.0
2
2
 
3
+ * Breaking Changes
4
+ * Removed support for the subnav partial
5
+
3
6
  * Enhancements
4
7
  * Updated Twitter Bootstrap to 2.3.0
5
8
  * Updated Gem Dependencies
@@ -19,6 +22,7 @@
19
22
  placeholder: 'Search',
20
23
  position: 'left'
21
24
  }
25
+ * Flash messages have been moved up into the navbar
22
26
 
23
27
  == 1.1.3 (February 11, 2013)
24
28
 
@@ -106,7 +110,7 @@
106
110
  * Twitter Bootstrap updated to 2.0.4
107
111
  * Now includes all Bootstrap JavaScript Plugins, http://twitter.github.com/bootstrap/javascript.html
108
112
  * Added styling for .subnav and .subnav-fixed
109
- * Subnav Partial added, can be called as follows:
113
+ * Subnav Partial added, can be called as follows: **Subnav was REMOVED in 1.2.0**
110
114
  * <tt>render partial: 'contour/layouts/subnav', locals: { links: [{name: 'Link A', sublinks: [{name: 'Sublink 1'}, {name: 'Sublink 2'}]}, {name: 'Link B'}]}</tt>
111
115
 
112
116
  == 1.0.1 (June 1, 2012)
@@ -3,15 +3,3 @@ jQuery ->
3
3
  $(".tooltip").tooltip()
4
4
  $("a[rel=tooltip]").tooltip()
5
5
  $('.dropdown-toggle').dropdown()
6
-
7
- $(document).scroll( () ->
8
- if $('.subnav').length > 0
9
- if !$('.subnav').data('top')
10
- return if ($('.subnav').hasClass('subnav-fixed'))
11
- offset = $('.subnav').offset()
12
- $('.subnav').data('top', offset.top)
13
- if $('.subnav').data('top') - $('.subnav').outerHeight() <= $(this).scrollTop()
14
- $('.subnav').addClass('subnav-fixed')
15
- else
16
- $('.subnav').removeClass('subnav-fixed')
17
- )
@@ -42,10 +42,18 @@ h1, h2, h3, h4, h5, h6 {
42
42
  font-weight: 300;
43
43
  }
44
44
 
45
- .tooltip {
45
+ .center {
46
+ text-align: center;
47
+ }
48
+
49
+ .navbar-alert {
50
+ padding: 5px;
46
51
  line-height: 20px;
52
+ margin: 0px 0px 3px 0px;
47
53
  }
48
54
 
49
- .center {
50
- text-align: center;
55
+ .navbar-alert .close {
56
+ position: inherit;
57
+ line-height: 16px;
58
+ padding-left: 5px;
51
59
  }
@@ -7,7 +7,6 @@
7
7
  *= require bootstrap-base-overrides
8
8
  *= require twitter-bootstrap/bootstrap-scroll-modal
9
9
  *= require twitter-bootstrap/v2.3.0/bootstrap-responsive
10
- *= require twitter-bootstrap/bootstrap-subnav
11
10
  *= require bootstrap-responsive-overrides
12
11
  *= require jquery-ui-1.10.0.custom
13
12
  *= require jquery.qtip
@@ -29,7 +29,7 @@ module ContourHelper
29
29
  def flash_container(type, message)
30
30
  type = 'success' if type.to_s == 'notice'
31
31
  type = 'error' if type.to_s == 'alert'
32
- content_tag(:div, class: "alert alert-#{type}") do
32
+ content_tag(:div, class: "navbar-alert alert alert-#{type}") do
33
33
  content_tag(:a, raw("&times;"), href: '#', class: 'close', data: { dismiss: 'alert' }) + message
34
34
  end.html_safe
35
35
  end
@@ -46,6 +46,9 @@
46
46
  <input id="<%= Contour.search_bar[:id] || 'global-search' %>" name="q" type="text" autocomplete="off" class="search-query" value="<%= params[:q] %>" placeholder="<%= Contour.search_bar[:placeholder] || 'Search' %>">
47
47
  </form>
48
48
  <% end %>
49
+ <div class="navbar-search pull-right" data-object="flash-container">
50
+ <%= flash_block %>
51
+ </div>
49
52
  </div>
50
53
  </div>
51
54
  </div>
@@ -14,15 +14,11 @@
14
14
 
15
15
  <%= stylesheet_link_tag "application", media: "all" %>
16
16
  </head>
17
- <body data-spy="scroll" data-target=".subnav" data-offset="0">
17
+ <body>
18
18
  <div class="navbar navbar-inverse navbar-fixed-top">
19
19
  <%= render partial: 'contour/layouts/menu' %>
20
20
  </div>
21
21
 
22
- <div class="container" data-object="flash-container">
23
- <%= flash_block %>
24
- </div>
25
-
26
22
  <div class="container">
27
23
  <%= yield %>
28
24
  </div>
@@ -3,7 +3,7 @@ module Contour
3
3
  MAJOR = 1
4
4
  MINOR = 2
5
5
  TINY = 0
6
- BUILD = "pre4" # nil, "pre", "rc", "rc2"
6
+ BUILD = "pre5" # nil, "pre", "rc", "rc2"
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.')
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contour
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0.pre4
4
+ version: 1.2.0.pre5
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-11 00:00:00.000000000 Z
12
+ date: 2013-02-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -491,7 +491,6 @@ files:
491
491
  - app/assets/stylesheets/jquery.qtip.css
492
492
  - app/assets/stylesheets/timepicker.css
493
493
  - app/assets/stylesheets/twitter-bootstrap/bootstrap-scroll-modal.css
494
- - app/assets/stylesheets/twitter-bootstrap/bootstrap-subnav.css
495
494
  - app/assets/stylesheets/twitter-bootstrap/v2.3.0/bootstrap-responsive.css
496
495
  - app/assets/stylesheets/twitter-bootstrap/v2.3.0/bootstrap.css
497
496
  - app/controllers/contour/authentications_controller.rb
@@ -512,7 +511,6 @@ files:
512
511
  - app/views/contour/layouts/_latest_news.html.erb
513
512
  - app/views/contour/layouts/_menu.html.erb
514
513
  - app/views/contour/layouts/_per_page.html.erb
515
- - app/views/contour/layouts/_subnav.html.erb
516
514
  - app/views/contour/layouts/application.html.erb
517
515
  - app/views/contour/passwords/edit.html.erb
518
516
  - app/views/contour/passwords/new.html.erb
@@ -1,139 +0,0 @@
1
- /* Portion for Fixed Subnav From Bootstrap Components Documentation */
2
- /* http://twitter.github.com/bootstrap/assets/css/docs.css */
3
-
4
- /* Subnav */
5
- .subnav {
6
- width: 100%;
7
- height: 36px;
8
- background-color: #eeeeee; /* Old browsers */
9
- background-repeat: repeat-x; /* Repeat the gradient */
10
- background-image: -moz-linear-gradient(top, #f5f5f5 0%, #eeeeee 100%); /* FF3.6+ */
11
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(100%,#eeeeee)); /* Chrome,Safari4+ */
12
- background-image: -webkit-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* Chrome 10+,Safari 5.1+ */
13
- background-image: -ms-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* IE10+ */
14
- background-image: -o-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* Opera 11.10+ */
15
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#eeeeee',GradientType=0 ); /* IE6-9 */
16
- background-image: linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* W3C */
17
- border: 1px solid #e5e5e5;
18
- -webkit-border-radius: 4px;
19
- -moz-border-radius: 4px;
20
- border-radius: 4px;
21
- }
22
- .subnav .nav {
23
- margin-bottom: 0;
24
- }
25
- .subnav .nav > li > a {
26
- margin: 0;
27
- padding-top: 11px;
28
- padding-bottom: 11px;
29
- border-left: 1px solid #f5f5f5;
30
- border-right: 1px solid #e5e5e5;
31
- -webkit-border-radius: 0;
32
- -moz-border-radius: 0;
33
- border-radius: 0;
34
- }
35
- .subnav .nav > .active > a,
36
- .subnav .nav > .active > a:hover {
37
- padding-left: 13px;
38
- color: #777;
39
- background-color: #e9e9e9;
40
- border-right-color: #ddd;
41
- border-left: 0;
42
- -webkit-box-shadow: inset 0 3px 5px rgba(0,0,0,.05);
43
- -moz-box-shadow: inset 0 3px 5px rgba(0,0,0,.05);
44
- box-shadow: inset 0 3px 5px rgba(0,0,0,.05);
45
- }
46
- .subnav .nav > .active > a .caret,
47
- .subnav .nav > .active > a:hover .caret {
48
- border-top-color: #777;
49
- }
50
- .subnav .nav > li:first-child > a,
51
- .subnav .nav > li:first-child > a:hover {
52
- border-left: 0;
53
- padding-left: 12px;
54
- -webkit-border-radius: 4px 0 0 4px;
55
- -moz-border-radius: 4px 0 0 4px;
56
- border-radius: 4px 0 0 4px;
57
- }
58
- .subnav .nav > li:last-child > a {
59
- border-right: 0;
60
- }
61
- .subnav .dropdown-menu {
62
- -webkit-border-radius: 0 0 4px 4px;
63
- -moz-border-radius: 0 0 4px 4px;
64
- border-radius: 0 0 4px 4px;
65
- }
66
-
67
- /* Fixed subnav on scroll, but only for 980px and up (sorry IE!) */
68
- @media (min-width: 980px) {
69
- .subnav-fixed {
70
- position: fixed;
71
- top: 40px;
72
- left: 0;
73
- right: 0;
74
- z-index: 1020; /* 10 less than .navbar-fixed to prevent any overlap */
75
- border-color: #d5d5d5;
76
- border-width: 0 0 1px; /* drop the border on the fixed edges */
77
- -webkit-border-radius: 0;
78
- -moz-border-radius: 0;
79
- border-radius: 0;
80
- -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
81
- -moz-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
82
- box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
83
- filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); /* IE6-9 */
84
- }
85
- .subnav-fixed .nav {
86
- width: 938px;
87
- margin: 0 auto;
88
- padding: 0 1px;
89
- }
90
- .subnav .nav > li:first-child > a,
91
- .subnav .nav > li:first-child > a:hover {
92
- -webkit-border-radius: 0;
93
- -moz-border-radius: 0;
94
- border-radius: 0;
95
- }
96
- }
97
-
98
- @media (max-width: 768px) {
99
-
100
- /* Subnav */
101
- .subnav {
102
- position: static;
103
- top: auto;
104
- z-index: auto;
105
- width: auto;
106
- height: auto;
107
- background: #fff; /* whole background property since we use a background-image for gradient */
108
- -webkit-box-shadow: none;
109
- -moz-box-shadow: none;
110
- box-shadow: none;
111
- }
112
- .subnav .nav > li {
113
- float: none;
114
- }
115
- .subnav .nav > li > a {
116
- border: 0;
117
- }
118
- .subnav .nav > li + li > a {
119
- border-top: 1px solid #e5e5e5;
120
- }
121
- .subnav .nav > li:first-child > a,
122
- .subnav .nav > li:first-child > a:hover {
123
- -webkit-border-radius: 4px 4px 0 0;
124
- -moz-border-radius: 4px 4px 0 0;
125
- border-radius: 4px 4px 0 0;
126
- }
127
-
128
- }
129
-
130
-
131
- /* LARGE DESKTOP SCREENS */
132
- @media (min-width: 1210px) {
133
-
134
- /* Update subnav container */
135
- .subnav-fixed .nav {
136
- width: 1168px; /* 2px less to account for left/right borders being removed when in fixed mode */
137
- }
138
-
139
- }
@@ -1,23 +0,0 @@
1
- <div style="min-height:36px">
2
- <div class="subnav">
3
- <ul class="nav nav-pills">
4
- <% links.each_with_index do |link_hash, index| %>
5
- <% sublinks = (link_hash[:sublinks] || []) %>
6
- <% href = (sublinks.size == 0 ? (link_hash[:href] || '#') : "##{link_hash[:name].to_s.gsub(/[^\w]/, '_').downcase}_#{index}") %>
7
- <li class="<%= 'dropdown' if sublinks.size %> <%= 'active' if index == 0 %>">
8
- <% if sublinks.size == 0 %>
9
- <%= link_to link_hash[:name].to_s, href %>
10
- <% else %>
11
- <%= link_to (link_hash[:name].to_s + ' <b class="caret"></b>').html_safe, href, class: 'dropdown-toggle', data: { toggle: 'dropdown' } %>
12
- <ul class="dropdown-menu">
13
- <% sublinks.each_with_index do |sublink_hash, sublink_index| %>
14
- <% sublink_href = (sublink_hash[:href] || "##{link_hash[:name].to_s.gsub(/[^\w]/, '_').downcase}_#{index}_#{sublink_hash[:name].to_s.gsub(/[^\w]/, '_').downcase}_#{sublink_index}") %>
15
- <%= link_to sublink_hash[:name].to_s, sublink_href %>
16
- <% end %>
17
- </ul>
18
- <% end %>
19
- </li>
20
- <% end %>
21
- </ul>
22
- </div>
23
- </div>