anjlab-bootstrap-rails 0.1.4 → 1.4.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.
@@ -1,5 +1,5 @@
1
1
  module Bootstrap
2
2
  module Rails
3
- VERSION = "0.1.4"
3
+ VERSION = "1.4.0"
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================
2
- * bootstrap-alerts.js v1.3.0
2
+ * bootstrap-alerts.js v1.4.0
3
3
  * http://twitter.github.com/bootstrap/javascript.html#alerts
4
4
  * ==========================================================
5
5
  * Copyright 2011 Twitter, Inc.
@@ -20,6 +20,8 @@
20
20
 
21
21
  !function( $ ){
22
22
 
23
+ "use strict"
24
+
23
25
  /* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
24
26
  * ======================================================= */
25
27
 
@@ -38,11 +40,11 @@
38
40
  if ( $.support.transition ) {
39
41
  transitionEnd = "TransitionEnd"
40
42
  if ( $.browser.webkit ) {
41
- transitionEnd = "webkitTransitionEnd"
43
+ transitionEnd = "webkitTransitionEnd"
42
44
  } else if ( $.browser.mozilla ) {
43
- transitionEnd = "transitionend"
45
+ transitionEnd = "transitionend"
44
46
  } else if ( $.browser.opera ) {
45
- transitionEnd = "oTransitionEnd"
47
+ transitionEnd = "oTransitionEnd"
46
48
  }
47
49
  }
48
50
 
@@ -0,0 +1,62 @@
1
+ /* ============================================================
2
+ * bootstrap-dropdown.js v1.4.0
3
+ * http://twitter.github.com/bootstrap/javascript.html#dropdown
4
+ * ============================================================
5
+ * Copyright 2011 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ============================================================ */
19
+
20
+ !function( $ ){
21
+
22
+ "use strict"
23
+
24
+ function setState(el, state) {
25
+ var d = 'disabled'
26
+ , $el = $(el)
27
+ , data = $el.data()
28
+
29
+ state = state + 'Text'
30
+ data.resetText || $el.data('resetText', $el.html())
31
+
32
+ $el.html( data[state] || $.fn.button.defaults[state] )
33
+
34
+ state == 'loadingText' ?
35
+ $el.addClass(d).attr(d, d) :
36
+ $el.removeClass(d).removeAttr(d)
37
+ }
38
+
39
+ function toggle(el) {
40
+ $(el).toggleClass('active')
41
+ }
42
+
43
+ $.fn.button = function(options) {
44
+ return this.each(function () {
45
+ if (options == 'toggle') {
46
+ return toggle(this)
47
+ }
48
+ options && setState(this, options)
49
+ })
50
+ }
51
+
52
+ $.fn.button.defaults = {
53
+ loadingText: 'loading...'
54
+ }
55
+
56
+ $(function () {
57
+ $('body').delegate('.btn[data-toggle]', 'click', function () {
58
+ $(this).button('toggle')
59
+ })
60
+ })
61
+
62
+ }( window.jQuery || window.ender );
@@ -1,5 +1,5 @@
1
1
  /* ============================================================
2
- * bootstrap-dropdown.js v1.3.0
2
+ * bootstrap-dropdown.js v1.4.0
3
3
  * http://twitter.github.com/bootstrap/javascript.html#dropdown
4
4
  * ============================================================
5
5
  * Copyright 2011 Twitter, Inc.
@@ -20,6 +20,8 @@
20
20
 
21
21
  !function( $ ){
22
22
 
23
+ "use strict"
24
+
23
25
  /* DROPDOWN PLUGIN DEFINITION
24
26
  * ========================== */
25
27
 
@@ -1,5 +1,5 @@
1
1
  /* =========================================================
2
- * bootstrap-modal.js v1.3.0
2
+ * bootstrap-modal.js v1.4.0
3
3
  * http://twitter.github.com/bootstrap/javascript.html#modal
4
4
  * =========================================================
5
5
  * Copyright 2011 Twitter, Inc.
@@ -20,6 +20,8 @@
20
20
 
21
21
  !function( $ ){
22
22
 
23
+ "use strict"
24
+
23
25
  /* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
24
26
  * ======================================================= */
25
27
 
@@ -87,8 +89,7 @@
87
89
  that.$element[0].offsetWidth // force reflow
88
90
  }
89
91
 
90
- that.$element
91
- .addClass('in')
92
+ that.$element.addClass('in')
92
93
 
93
94
  transition ?
94
95
  that.$element.one(transitionEnd, function () { that.$element.trigger('shown') }) :
@@ -115,17 +116,9 @@
115
116
  .trigger('hide')
116
117
  .removeClass('in')
117
118
 
118
- function removeElement () {
119
- that.$element
120
- .hide()
121
- .trigger('hidden')
122
-
123
- backdrop.call(that)
124
- }
125
-
126
119
  $.support.transition && this.$element.hasClass('fade') ?
127
- this.$element.one(transitionEnd, removeElement) :
128
- removeElement()
120
+ hideWithTransition.call(this) :
121
+ hideModal.call(this)
129
122
 
130
123
  return this
131
124
  }
@@ -136,6 +129,28 @@
136
129
  /* MODAL PRIVATE METHODS
137
130
  * ===================== */
138
131
 
132
+ function hideWithTransition() {
133
+ // firefox drops transitionEnd events :{o
134
+ var that = this
135
+ , timeout = setTimeout(function () {
136
+ that.$element.unbind(transitionEnd)
137
+ hideModal.call(that)
138
+ }, 500)
139
+
140
+ this.$element.one(transitionEnd, function () {
141
+ clearTimeout(timeout)
142
+ hideModal.call(that)
143
+ })
144
+ }
145
+
146
+ function hideModal (that) {
147
+ this.$element
148
+ .hide()
149
+ .trigger('hidden')
150
+
151
+ backdrop.call(this)
152
+ }
153
+
139
154
  function backdrop ( callback ) {
140
155
  var that = this
141
156
  , animate = this.$element.hasClass('fade') ? 'fade' : ''
@@ -162,19 +177,20 @@
162
177
  } else if ( !this.isShown && this.$backdrop ) {
163
178
  this.$backdrop.removeClass('in')
164
179
 
165
- function removeElement() {
166
- that.$backdrop.remove()
167
- that.$backdrop = null
168
- }
169
-
170
180
  $.support.transition && this.$element.hasClass('fade')?
171
- this.$backdrop.one(transitionEnd, removeElement) :
172
- removeElement()
181
+ this.$backdrop.one(transitionEnd, $.proxy(removeBackdrop, this)) :
182
+ removeBackdrop.call(this)
183
+
173
184
  } else if ( callback ) {
174
185
  callback()
175
186
  }
176
187
  }
177
188
 
189
+ function removeBackdrop() {
190
+ this.$backdrop.remove()
191
+ this.$backdrop = null
192
+ }
193
+
178
194
  function escape() {
179
195
  var that = this
180
196
  if ( this.isShown && this.settings.keyboard ) {
@@ -1,5 +1,5 @@
1
1
  /* ===========================================================
2
- * bootstrap-popover.js v1.3.0
2
+ * bootstrap-popover.js v1.4.0
3
3
  * http://twitter.github.com/bootstrap/javascript.html#popover
4
4
  * ===========================================================
5
5
  * Copyright 2011 Twitter, Inc.
@@ -20,6 +20,8 @@
20
20
 
21
21
  !function( $ ) {
22
22
 
23
+ "use strict"
24
+
23
25
  var Popover = function ( element, options ) {
24
26
  this.$element = $(element)
25
27
  this.options = options
@@ -39,13 +41,17 @@
39
41
  $tip[0].className = 'popover'
40
42
  }
41
43
 
44
+ , hasContent: function () {
45
+ return this.getTitle() || this.getContent()
46
+ }
47
+
42
48
  , getContent: function () {
43
49
  var content
44
50
  , $e = this.$element
45
51
  , o = this.options
46
52
 
47
53
  if (typeof this.options.content == 'string') {
48
- content = $e.attr(o.content)
54
+ content = this.options.content
49
55
  } else if (typeof this.options.content == 'function') {
50
56
  content = this.options.content.call(this.$element[0])
51
57
  }
@@ -55,7 +61,7 @@
55
61
  , tip: function() {
56
62
  if (!this.$tip) {
57
63
  this.$tip = $('<div class="popover" />')
58
- .html('<div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div>')
64
+ .html(this.options.template)
59
65
  }
60
66
  return this.$tip
61
67
  }
@@ -72,6 +78,9 @@
72
78
  return this
73
79
  }
74
80
 
75
- $.fn.popover.defaults = $.extend({} , $.fn.twipsy.defaults, { content: 'data-content', placement: 'right'})
81
+ $.fn.popover.defaults = $.extend({} , $.fn.twipsy.defaults, {
82
+ placement: 'right'
83
+ , template: '<div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div>'
84
+ })
76
85
 
77
86
  }( window.jQuery || window.ender );
@@ -1,5 +1,5 @@
1
1
  /* =============================================================
2
- * bootstrap-scrollspy.js v1.3.0
2
+ * bootstrap-scrollspy.js v1.4.0
3
3
  * http://twitter.github.com/bootstrap/javascript.html#scrollspy
4
4
  * =============================================================
5
5
  * Copyright 2011 Twitter, Inc.
@@ -20,6 +20,8 @@
20
20
 
21
21
  !function ( $ ) {
22
22
 
23
+ "use strict"
24
+
23
25
  var $window = $(window)
24
26
 
25
27
  function ScrollSpy( topbar, selector ) {
@@ -1,5 +1,5 @@
1
1
  /* ========================================================
2
- * bootstrap-tabs.js v1.3.0
2
+ * bootstrap-tabs.js v1.4.0
3
3
  * http://twitter.github.com/bootstrap/javascript.html#tabs
4
4
  * ========================================================
5
5
  * Copyright 2011 Twitter, Inc.
@@ -20,6 +20,8 @@
20
20
 
21
21
  !function( $ ){
22
22
 
23
+ "use strict"
24
+
23
25
  function activate ( element, container ) {
24
26
  container
25
27
  .find('> .active')
@@ -39,6 +41,7 @@
39
41
  , $ul = $this.closest('ul:not(.dropdown-menu)')
40
42
  , href = $this.attr('href')
41
43
  , previous
44
+ , $href
42
45
 
43
46
  if ( /^#\w+/.test(href) ) {
44
47
  e.preventDefault()
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================
2
- * bootstrap-twipsy.js v1.3.0
2
+ * bootstrap-twipsy.js v1.4.0
3
3
  * http://twitter.github.com/bootstrap/javascript.html#twipsy
4
4
  * Adapted from the original jQuery.tipsy by Jason Frame
5
5
  * ==========================================================
@@ -21,6 +21,8 @@
21
21
 
22
22
  !function( $ ) {
23
23
 
24
+ "use strict"
25
+
24
26
  /* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
25
27
  * ======================================================= */
26
28
 
@@ -70,7 +72,7 @@
70
72
  , $tip
71
73
  , tp
72
74
 
73
- if (this.getTitle() && this.enabled) {
75
+ if (this.hasContent() && this.enabled) {
74
76
  $tip = this.tip()
75
77
  this.setContent()
76
78
 
@@ -143,6 +145,10 @@
143
145
  }
144
146
  }
145
147
 
148
+ , hasContent: function () {
149
+ return this.getTitle()
150
+ }
151
+
146
152
  , getTitle: function() {
147
153
  var title
148
154
  , $e = this.$element
@@ -163,7 +169,7 @@
163
169
 
164
170
  , tip: function() {
165
171
  if (!this.$tip) {
166
- this.$tip = $('<div class="twipsy" />').html('<div class="twipsy-arrow"></div><div class="twipsy-inner"></div>')
172
+ this.$tip = $('<div class="twipsy" />').html(this.options.template)
167
173
  }
168
174
  return this.$tip
169
175
  }
@@ -294,10 +300,11 @@
294
300
  , offset: 0
295
301
  , title: 'title'
296
302
  , trigger: 'hover'
303
+ , template: '<div class="twipsy-arrow"></div><div class="twipsy-inner"></div>'
297
304
  }
298
305
 
299
306
  $.fn.twipsy.elementOptions = function(ele, options) {
300
- return $.metadata ? $.extend({}, options, $(ele).metadata()) : options
307
+ return $.extend({}, options, $(ele).data())
301
308
  }
302
309
 
303
310
  }( window.jQuery || window.ender );
@@ -1,5 +1,6 @@
1
1
  // Bootstrap v1.3.0
2
2
  //= require bootstrap-alerts.js
3
+ //= require bootstrap-buttons.js
3
4
  //= require bootstrap-dropdown.js
4
5
  //= require bootstrap-modal.js
5
6
  //= require bootstrap-tabs.js
@@ -77,7 +77,12 @@ select,
77
77
  @include border-radius(3px);
78
78
  }
79
79
 
80
- /* mini reset for non-html5 file types */
80
+ // remove padding from select
81
+ select {
82
+ padding: initial;
83
+ }
84
+
85
+ // mini reset for non-html5 file types
81
86
  input[type=checkbox],
82
87
  input[type=radio] {
83
88
  width: auto;
@@ -107,6 +112,7 @@ input[type=submit] {
107
112
  select,
108
113
  input[type=file] {
109
114
  height: $baseline * 1.5; // In IE7, the height of the select element cannot be changed by height, only font-size
115
+ *height: auto; // Reset for IE7
110
116
  line-height: $baseline * 1.5;
111
117
  *margin-top: 4px; /* For IE7, add top margin to align select with labels */
112
118
  }
@@ -114,6 +120,7 @@ input[type=file] {
114
120
  // Make multiple select elements height not fixed
115
121
  select[multiple] {
116
122
  height: inherit;
123
+ background-color: $white; // Fixes Chromium bug of unreadable items
117
124
  }
118
125
 
119
126
  textarea {
@@ -158,36 +165,49 @@ select:focus {
158
165
  outline: 1px dotted #666; // Selet elements don't get box-shadow styles, so instead we do outline
159
166
  }
160
167
 
161
- // Error styles
162
- form div.clearfix.error {
163
- background: lighten($red, 57%);
164
- padding: 10px 0;
165
- margin: -10px 0 10px;
166
- @include border-radius(4px);
167
- $error-text: desaturate(lighten($red, 25%), 25%);
168
+
169
+ // FORM FIELD FEEDBACK STATES
170
+ // --------------------------
171
+
172
+ // Mixin for form field states
173
+ @mixin formFieldState($textColor: #555, $borderColor: #ccc, $backgroundColor: #f5f5f5) {
174
+ // Set the text color
168
175
  > label,
169
- span.help-inline,
170
- span.help-block {
171
- color: $red;
176
+ .help-block,
177
+ .help-inline {
178
+ color: $textColor;
172
179
  }
180
+ // Style inputs accordingly
173
181
  input,
174
182
  textarea {
175
- border-color: $error-text;
176
- @include box-shadow(0 0 3px rgba(171,41,32,.25));
183
+ color: $textColor;
184
+ border-color: $borderColor;
177
185
  &:focus {
178
- border-color: darken($error-text, 10%);
179
- @include box-shadow(0 0 6px rgba(171,41,32,.5));
186
+ border-color: darken($borderColor, 10%);
187
+ @include box-shadow(0 0 6px lighten($borderColor, 20%));
180
188
  }
181
189
  }
182
- .input-prepend,
183
- .input-append {
184
- span.add-on {
185
- background: lighten($red, 50%);
186
- border-color: $error-text;
187
- color: darken($error-text, 10%);
188
- }
190
+ // Give a small background color for input-prepend/-append
191
+ .input-prepend .add-on,
192
+ .input-append .add-on {
193
+ color: $textColor;
194
+ background-color: $backgroundColor;
195
+ border-color: $textColor;
189
196
  }
190
197
  }
198
+ // Error
199
+ form .clearfix.error {
200
+ @include formFieldState(#b94a48, #ee5f5b, lighten(#ee5f5b, 30%));
201
+ }
202
+ // Warning
203
+ form .clearfix.warning {
204
+ @include formFieldState(#c09853, #ccae64, lighten(#CCAE64, 5%));
205
+ }
206
+ // Success
207
+ form .clearfix.success {
208
+ @include formFieldState(#468847, #57a957, lighten(#57a957, 30%));
209
+ }
210
+
191
211
 
192
212
  // Form element sizes
193
213
  // TODO v2: remove duplication here and just stick to .input-[size] in light of adding .spanN sizes
@@ -240,25 +260,11 @@ textarea.xxlarge {
240
260
  margin-left: 0;
241
261
  }
242
262
  input,
243
- textarea,
244
- select {
263
+ textarea {
245
264
  // Default columns
246
- &.span1 { @include form-columns(1); }
247
- &.span2 { @include form-columns(2); }
248
- &.span3 { @include form-columns(3); }
249
- &.span4 { @include form-columns(4); }
250
- &.span5 { @include form-columns(5); }
251
- &.span6 { @include form-columns(6); }
252
- &.span7 { @include form-columns(7); }
253
- &.span8 { @include form-columns(8); }
254
- &.span9 { @include form-columns(9); }
255
- &.span10 { @include form-columns(10); }
256
- &.span11 { @include form-columns(11); }
257
- &.span12 { @include form-columns(12); }
258
- &.span13 { @include form-columns(13); }
259
- &.span14 { @include form-columns(14); }
260
- &.span15 { @include form-columns(15); }
261
- &.span16 { @include form-columns(16); }
265
+ @for $i from 1 through 16 {
266
+ &.span#{$i} { @include form-columns($i); }
267
+ }
262
268
  }
263
269
 
264
270
  // Disabled and read-only inputs
@@ -293,9 +299,10 @@ textarea[readonly] {
293
299
  }
294
300
 
295
301
  // Help Text
302
+ // TODO: Do we need to set basefont and baseline here?
296
303
  .help-inline,
297
304
  .help-block {
298
- font-size: $basefont - 2;
305
+ font-size: $basefont;
299
306
  line-height: $baseline;
300
307
  color: $grayLight;
301
308
  }
@@ -314,15 +321,6 @@ textarea[readonly] {
314
321
  // Inline Fields (input fields that appear as inline objects
315
322
  .inline-inputs {
316
323
  color: $gray;
317
- span, input {
318
- display: inline-block;
319
- }
320
- input.mini {
321
- width: 60px;
322
- }
323
- input.small {
324
- width: 90px;
325
- }
326
324
  span {
327
325
  padding: 0 2px 0 1px;
328
326
  }
@@ -389,6 +387,7 @@ textarea[readonly] {
389
387
  float: none;
390
388
  width: auto;
391
389
  padding: 0;
390
+ margin-left: 20px;
392
391
  line-height: $baseline;
393
392
  text-align: left;
394
393
  white-space: normal;
@@ -414,6 +413,8 @@ textarea[readonly] {
414
413
  input[type=radio],
415
414
  input[type=checkbox] {
416
415
  margin-bottom: 0;
416
+ margin-left: -20px;
417
+ float: left;
417
418
  }
418
419
  }
419
420
 
@@ -6,16 +6,15 @@
6
6
  // Clearfix for clearing floats like a boss h5bp.com/q
7
7
  @mixin clearfix {
8
8
  zoom: 1;
9
- &:before,
9
+ &:before,
10
10
  &:after {
11
11
  display: table;
12
12
  content: "";
13
13
  zoom: 1;
14
- *display: inline;
15
- }
16
- &:after {
14
+ }
15
+ &:after {
17
16
  clear: both;
18
- }
17
+ }
19
18
  }
20
19
 
21
20
  .clearfix {
@@ -38,7 +37,7 @@
38
37
  height: $height;
39
38
  width: $width;
40
39
  }
41
- @mixin square($size: $px) {
40
+ @mixin square($size: 5px) {
42
41
  @include size($size, $size);
43
42
  }
44
43
 
@@ -147,6 +146,12 @@
147
146
  column-gap: $columnGap;
148
147
  }
149
148
 
149
+ // Make any element resizable for prototyping
150
+ @mixin resizable($direction: both) {
151
+ resize: $direction; // Options are horizontal, vertical, both
152
+ overflow: auto; // Safari fix
153
+ }
154
+
150
155
  // Add an alphatransparency value to any background or border color (via Elyse Holladay)
151
156
  @mixin translucent-background($color: $white, $alpha: 1) {
152
157
  background-color: hsla(hue($color), saturation($color), lightness($color), $alpha);
@@ -25,7 +25,7 @@
25
25
  // Hover and active states
26
26
  // h3 for backwards compatibility
27
27
  h3 a:hover,
28
- .brand a:hover,
28
+ .brand:hover,
29
29
  ul .active > a {
30
30
  background-color: #333;
31
31
  background-color: rgba(255,255,255,.05);
@@ -277,7 +277,8 @@ a.menu:after,
277
277
  }
278
278
  }
279
279
 
280
- .topbar .dropdown-menu, .dropdown-menu {
280
+ .topbar .dropdown-menu,
281
+ .dropdown-menu {
281
282
  // Links within the dropdown menu
282
283
  a {
283
284
  display: block;
@@ -288,7 +289,8 @@ a.menu:after,
288
289
  color: $gray;
289
290
  text-shadow: 0 1px 0 $white;
290
291
  // Hover state
291
- &:hover {
292
+ &:hover,
293
+ &.hover {
292
294
  @include gradient-vertical(#eeeeee, #dddddd);
293
295
  color: $grayDark;
294
296
  text-decoration: none;
@@ -317,10 +319,13 @@ a.menu:after,
317
319
  }
318
320
 
319
321
 
320
- // Tabs and Pills
322
+ // TABS AND PILLS
323
+ // --------------
324
+
325
+ // Common styles
321
326
  .tabs,
322
327
  .pills {
323
- margin: 0 0 20px;
328
+ margin: 0 0 $baseline;
324
329
  padding: 0;
325
330
  list-style: none;
326
331
  @include clearfix;
@@ -332,18 +337,18 @@ a.menu:after,
332
337
  }
333
338
  }
334
339
 
335
- // Basic Tabs
340
+ // Tabs
336
341
  .tabs {
337
- float: left;
338
- width: 100%;
339
- border-bottom: 1px solid #ddd;
342
+ border-color: #ddd;
343
+ border-style: solid;
344
+ border-width: 0 0 1px;
340
345
  > li {
341
346
  position: relative; // For the dropdowns mostly
342
- top: 1px;
347
+ margin-bottom: -1px;
343
348
  > a {
344
349
  padding: 0 15px;
345
350
  margin-right: 2px;
346
- line-height: $baseline * 2;
351
+ line-height: ($baseline * 2) - 2;
347
352
  border: 1px solid transparent;
348
353
  @include border-radius(4px 4px 0 0);
349
354
  &:hover {
@@ -352,13 +357,20 @@ a.menu:after,
352
357
  border-color: #eee #eee #ddd;
353
358
  }
354
359
  }
355
- &.active > a {
356
- color: $gray;
357
- background-color: $white;
358
- border: 1px solid #ddd;
359
- border-bottom-color: transparent;
360
- }
361
360
  }
361
+ // Active state, and it's :hover to override normal :hover
362
+ .active > a,
363
+ .active > a:hover {
364
+ color: $gray;
365
+ background-color: $white;
366
+ border: 1px solid #ddd;
367
+ border-bottom-color: transparent;
368
+ cursor: default;
369
+ }
370
+ }
371
+
372
+ // Dropdowns in tabs
373
+ .tabs {
362
374
  // first one for backwards compatibility
363
375
  .menu-dropdown,
364
376
  .dropdown-menu {
@@ -384,40 +396,45 @@ a.menu:after,
384
396
  border-top-color: #555;
385
397
  }
386
398
  }
387
- .tab-content {
388
- clear: both;
389
- }
390
399
 
391
- // Basic pill nav
400
+ // Pills
392
401
  .pills {
393
402
  a {
394
- margin: 5px 3px 5px 0;
403
+ margin: 5px 3px 5px 0;
395
404
  padding: 0 15px;
396
- text-shadow: 0 1px 1px $white;
397
405
  line-height: 30px;
406
+ text-shadow: 0 1px 1px $white;
398
407
  @include border-radius(15px);
399
408
  &:hover {
400
- background: $linkColorHover;
401
409
  color: $white;
402
410
  text-decoration: none;
403
411
  text-shadow: 0 1px 1px rgba(0,0,0,.25);
412
+ background-color: $linkColorHover;
404
413
  }
405
414
  }
406
415
  .active a {
407
- background: $linkColor;
408
416
  color: $white;
409
417
  text-shadow: 0 1px 1px rgba(0,0,0,.25);
418
+ background-color: $linkColor;
410
419
  }
411
420
  }
412
421
 
413
- .tab-content > *,
414
- .pill-content > * {
415
- display: none;
422
+ // Stacked pills
423
+ .pills-vertical > li {
424
+ float: none;
416
425
  }
417
426
 
427
+ // Tabbable areas
428
+ .tab-content,
429
+ .pill-content {
430
+ }
431
+ .tab-content > .tab-pane,
432
+ .pill-content > .pill-pane {
433
+ display: none;
434
+ }
418
435
  .tab-content > .active,
419
436
  .pill-content > .active {
420
- display:block;
437
+ display: block;
421
438
  }
422
439
 
423
440
 
@@ -425,8 +442,8 @@ a.menu:after,
425
442
  // -----------
426
443
 
427
444
  .breadcrumb {
428
- margin: 0 0 $baseline;
429
445
  padding: 7px 14px;
446
+ margin: 0 0 $baseline;
430
447
  @include gradient-vertical(#ffffff, #f5f5f5);
431
448
  border: 1px solid #ddd;
432
449
  @include border-radius(3px);
@@ -439,8 +456,6 @@ a.menu:after,
439
456
  padding: 0 5px;
440
457
  color: $grayLight;
441
458
  }
442
- a {
443
- }
444
459
  .active a {
445
460
  color: $grayDark;
446
461
  }
@@ -504,6 +519,11 @@ footer {
504
519
  &.info:hover {
505
520
  color: $white
506
521
  }
522
+ // Sets the close button to the middle of message
523
+ .close{
524
+ font-family: Arial, sans-serif;
525
+ line-height: 18px;
526
+ }
507
527
  // Danger and error appear as red
508
528
  &.danger,
509
529
  &.error {
@@ -557,7 +577,8 @@ footer {
557
577
  @include transition(.1s linear all);
558
578
 
559
579
  // Active and Disabled states
560
- &:active {
580
+ &.active,
581
+ :active {
561
582
  $shadow: inset 0 2px 4px rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.05);
562
583
  @include box-shadow($shadow);
563
584
  }
@@ -615,7 +636,7 @@ input[type=submit].btn {
615
636
  font-weight: bold;
616
637
  line-height: $baseline * .75;
617
638
  text-shadow: 0 1px 0 rgba(255,255,255,1);
618
- @include opacity(20);
639
+ @include opacity(25);
619
640
  &:hover {
620
641
  color: $black;
621
642
  text-decoration: none;
@@ -642,7 +663,20 @@ input[type=submit].btn {
642
663
 
643
664
  // Adjust close icon
644
665
  .close {
645
- *margin-top: 3px; /* IE7 spacing */
666
+ margin-top: 1px;
667
+ *margin-top: 0; // For IE7
668
+ }
669
+
670
+ // Make links same color as text and stand out more
671
+ a {
672
+ font-weight: bold;
673
+ color: $grayDark;
674
+ }
675
+ &.danger p a,
676
+ &.error p a,
677
+ &.success p a,
678
+ &.info p a {
679
+ color: $white;
646
680
  }
647
681
 
648
682
  // Remove extra margin from content
@@ -699,6 +733,14 @@ input[type=submit].btn {
699
733
  background-color: lighten(#6bd0ee, 25%);
700
734
  border-color: lighten(#6bd0ee, 20%);
701
735
  }
736
+ // Change link color back
737
+ &.danger p a,
738
+ &.error p a,
739
+ &.success p a,
740
+ &.info p a {
741
+ color: $grayDark;
742
+ }
743
+
702
744
  }
703
745
  }
704
746
 
@@ -779,7 +821,8 @@ input[type=submit].btn {
779
821
  &.fade { opacity: 0; }
780
822
  }
781
823
 
782
- .modal-backdrop, .modal-backdrop.fade.in {
824
+ .modal-backdrop,
825
+ .modal-backdrop.fade.in {
783
826
  @include opacity(80);
784
827
  }
785
828
 
@@ -789,7 +832,7 @@ input[type=submit].btn {
789
832
  left: 50%;
790
833
  z-index: 11000;
791
834
  width: 560px;
792
- margin: -250px 0 0 -250px;
835
+ margin: -250px 0 0 -280px;
793
836
  background-color: $white;
794
837
  border: 1px solid #999;
795
838
  border: 1px solid rgba(0,0,0,.3);
@@ -811,6 +854,9 @@ input[type=submit].btn {
811
854
  .modal-body {
812
855
  padding: 15px;
813
856
  }
857
+ .modal-body form {
858
+ margin-bottom: 0;
859
+ }
814
860
  .modal-footer {
815
861
  background-color: #f5f5f5;
816
862
  padding: 14px 15px 15px;
@@ -825,6 +871,12 @@ input[type=submit].btn {
825
871
  }
826
872
  }
827
873
 
874
+ // Fix the stacking of these components when in modals
875
+ .modal .popover,
876
+ .modal .twipsy {
877
+ z-index: 12000;
878
+ }
879
+
828
880
 
829
881
  // POPOVER ARROWS
830
882
  // --------------
@@ -917,8 +969,8 @@ input[type=submit].btn {
917
969
  height: 0;
918
970
  }
919
971
  .inner {
920
- background-color: $black;
921
- background-color: rgba(0,0,0,.8);
972
+ background: $black;
973
+ background: rgba(0,0,0,.8);
922
974
  padding: 3px;
923
975
  overflow: hidden;
924
976
  width: 280px;
@@ -961,12 +1013,12 @@ input[type=submit].btn {
961
1013
 
962
1014
  .label {
963
1015
  padding: 1px 3px 2px;
964
- background-color: $grayLight;
965
1016
  font-size: $basefont * .75;
966
1017
  font-weight: bold;
967
1018
  color: $white;
968
1019
  text-transform: uppercase;
969
1020
  white-space: nowrap;
1021
+ background-color: $grayLight;
970
1022
  @include border-radius(3px);
971
1023
  &.important { background-color: #c43c35; }
972
1024
  &.warning { background-color: $orange; }
@@ -979,7 +1031,7 @@ input[type=submit].btn {
979
1031
  // -----------
980
1032
 
981
1033
  .media-grid {
982
- margin-left: -20px;
1034
+ margin-left: -$gridGutterWidth;
983
1035
  margin-bottom: 0;
984
1036
  @include clearfix;
985
1037
  li {
@@ -988,7 +1040,7 @@ input[type=submit].btn {
988
1040
  a {
989
1041
  float: left;
990
1042
  padding: 4px;
991
- margin: 0 0 20px 20px;
1043
+ margin: 0 0 $baseline $gridGutterWidth;
992
1044
  border: 1px solid #ddd;
993
1045
  @include border-radius(4px);
994
1046
  @include box-shadow(0 1px 1px rgba(0,0,0,.075));
@@ -7,10 +7,8 @@
7
7
  // STRUCTURAL LAYOUT
8
8
  // -----------------
9
9
 
10
- html, body {
11
- background-color: $white;
12
- }
13
10
  body {
11
+ background-color: $white;
14
12
  margin: 0;
15
13
  @include font-sans-serif(normal,$basefont,$baseline);
16
14
  color: $grayDark;
@@ -29,7 +27,9 @@ body {
29
27
  padding-right: 20px;
30
28
  @include clearfix;
31
29
  > .sidebar {
32
- float: left;
30
+ position: absolute;
31
+ top: 0;
32
+ left: 20px;
33
33
  width: 220px;
34
34
  }
35
35
  // TODO in v2: rename this and .popover .content to be more specific
@@ -77,12 +77,12 @@ a {
77
77
 
78
78
  .row {
79
79
  @include clearfix;
80
- margin-left: -1 * $gridGutterWidth;
80
+ margin-left: -$gridGutterWidth;
81
81
  }
82
82
 
83
83
  // Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7)
84
84
  // Credit to @dhg for the idea
85
- [class*="span"] {
85
+ .row > [class*="span"] {
86
86
  @include gridColumn;
87
87
  }
88
88
 
@@ -97,8 +97,10 @@ a {
97
97
  }
98
98
 
99
99
  // Offset column options
100
- @for $i from 1 through 12 {
101
- .offset#{$i} { @include offset($i); }
100
+ .row {
101
+ @for $i from 1 through 12 {
102
+ & > .offset#{$i} { @include offset($i); }
103
+ }
102
104
  }
103
105
 
104
106
  // Unique column sizes for 16-column grid
@@ -11,12 +11,10 @@ table {
11
11
  width: 100%;
12
12
  margin-bottom: $baseline;
13
13
  padding: 0;
14
- border-collapse: separate; // Done so we can round those corners!
15
- *border-collapse: collapse; /* IE7, collapse table to remove spacing */
16
14
  font-size: $basefont;
17
- border: 1px solid #ddd;
18
- @include border-radius(4px);
19
- th, td {
15
+ border-collapse: collapse;
16
+ th,
17
+ td {
20
18
  padding: 10px 10px 9px;
21
19
  line-height: $baseline;
22
20
  text-align: left;
@@ -25,21 +23,47 @@ table {
25
23
  padding-top: 9px;
26
24
  font-weight: bold;
27
25
  vertical-align: middle;
28
- border-bottom: 1px solid #ddd;
29
26
  }
30
27
  td {
31
28
  vertical-align: top;
29
+ border-top: 1px solid #ddd;
30
+ }
31
+ // When scoped to row, fix th in tbody
32
+ tbody th {
33
+ border-top: 1px solid #ddd;
34
+ vertical-align: top;
35
+ }
36
+ }
37
+
38
+
39
+ // CONDENSED VERSION
40
+ // -----------------
41
+ .condensed-table {
42
+ th,
43
+ td {
44
+ padding: 5px 5px 4px;
32
45
  }
46
+ }
47
+
48
+
49
+ // BORDERED VERSION
50
+ // ----------------
51
+
52
+ .bordered-table {
53
+ border: 1px solid #ddd;
54
+ border-collapse: separate; // Done so we can round those corners!
55
+ *border-collapse: collapse; /* IE7, collapse table to remove spacing */
56
+ @include border-radius(4px);
33
57
  th + th,
34
- td + td {
58
+ td + td,
59
+ th + td {
35
60
  border-left: 1px solid #ddd;
36
61
  }
37
- tr + tr td {
38
- border-top: 1px solid #ddd;
39
- }
62
+ thead tr:first-child th:first-child,
40
63
  tbody tr:first-child td:first-child {
41
64
  @include border-radius(4px 0 0 0);
42
65
  }
66
+ thead tr:first-child th:last-child,
43
67
  tbody tr:first-child td:last-child {
44
68
  @include border-radius(0 4px 0 0);
45
69
  }
@@ -52,16 +76,33 @@ table {
52
76
  }
53
77
 
54
78
 
79
+ // TABLE CELL SIZES
80
+ // ----------------
81
+
82
+ // This is a duplication of the main grid .columns() mixin, but subtracts 20px to account for input padding and border
83
+ @mixin tableColumns($columnSpan: 1) {
84
+ width: (($gridColumnWidth - 20) * $columnSpan) + (($gridColumnWidth - 20) * ($columnSpan - 1));
85
+ }
86
+ table {
87
+ // Default columns
88
+ @for $i from 1 through 16 {
89
+ .span#{$i} { @include tableColumns($i); }
90
+ }
91
+ }
92
+
93
+
55
94
  // ZEBRA-STRIPING
56
95
  // --------------
57
96
 
58
97
  // Default zebra-stripe styles (alternating gray and transparent backgrounds)
59
98
  .zebra-striped {
60
99
  tbody {
61
- tr:nth-child(odd) td {
100
+ tr:nth-child(odd) td,
101
+ tr:nth-child(odd) th {
62
102
  background-color: #f9f9f9;
63
103
  }
64
- tr:hover td {
104
+ tr:hover td,
105
+ tr:hover th {
65
106
  background-color: #f5f5f5;
66
107
  }
67
108
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anjlab-bootstrap-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 1.4.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-11 00:00:00.000000000 Z
12
+ date: 2011-11-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
16
- requirement: &70142818712380 !ruby/object:Gem::Requirement
16
+ requirement: &70202329313980 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70142818712380
24
+ version_requirements: *70202329313980
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: thor
27
- requirement: &70142818711720 !ruby/object:Gem::Requirement
27
+ requirement: &70202329313480 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0.14'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70142818711720
35
+ version_requirements: *70202329313480
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: bundler
38
- requirement: &70142818711020 !ruby/object:Gem::Requirement
38
+ requirement: &70202329313020 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.0.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70142818711020
46
+ version_requirements: *70202329313020
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rails
49
- requirement: &70142818710380 !ruby/object:Gem::Requirement
49
+ requirement: &70202329312560 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '3.0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70142818710380
57
+ version_requirements: *70202329312560
58
58
  description: Twitter Bootstrap CSS (with SASS flavour) and JS toolkits for Rails 3
59
59
  projects
60
60
  email:
@@ -73,6 +73,7 @@ files:
73
73
  - lib/bootstrap-rails/railtie.rb
74
74
  - lib/bootstrap-rails/version.rb
75
75
  - vendor/assets/javascripts/bootstrap-alerts.js
76
+ - vendor/assets/javascripts/bootstrap-buttons.js
76
77
  - vendor/assets/javascripts/bootstrap-dropdown.js
77
78
  - vendor/assets/javascripts/bootstrap-modal.js
78
79
  - vendor/assets/javascripts/bootstrap-popover.js