anjlab-bootstrap-rails 2.2.2.rc1 → 2.2.2.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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Twitter Bootstrap v2.2.2.rc for Rails 3
1
+ # Twitter Bootstrap v2.2.2.0 for Rails 3
2
2
  Bootstrap is a toolkit from Twitter designed to kickstart development of webapps and sites.
3
3
  It includes base CSS and HTML for typography, forms, buttons, tables, grids, navigation, and more.
4
4
 
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ namespace :twitter do
5
5
 
6
6
  desc "Pulls Twitter's Bootstrap Scss"
7
7
  task :pull do
8
- if !system "git pull -s subtree twitter twb2rc"
8
+ if !system "git pull -s subtree twitter twb2"
9
9
  abort "Have to add twitter scss remote `git remote add -f twitter git@github.com:yury/bootstrap.git`"
10
10
  end
11
11
  end
@@ -1,5 +1,5 @@
1
1
  module Bootstrap
2
2
  module Rails
3
- VERSION = "2.2.2.rc1"
3
+ VERSION = "2.2.2.0"
4
4
  end
5
5
  end
@@ -68,6 +68,8 @@
68
68
  /* AFFIX PLUGIN DEFINITION
69
69
  * ======================= */
70
70
 
71
+ var old = $.fn.affix
72
+
71
73
  $.fn.affix = function (option) {
72
74
  return this.each(function () {
73
75
  var $this = $(this)
@@ -85,6 +87,15 @@
85
87
  }
86
88
 
87
89
 
90
+ /* AFFIX NO CONFLICT
91
+ * ================= */
92
+
93
+ $.fn.affix.noConflict = function () {
94
+ $.fn.affix = old
95
+ return this
96
+ }
97
+
98
+
88
99
  /* AFFIX DATA-API
89
100
  * ============== */
90
101
 
@@ -68,6 +68,8 @@
68
68
  /* ALERT PLUGIN DEFINITION
69
69
  * ======================= */
70
70
 
71
+ var old = $.fn.alert
72
+
71
73
  $.fn.alert = function (option) {
72
74
  return this.each(function () {
73
75
  var $this = $(this)
@@ -80,6 +82,15 @@
80
82
  $.fn.alert.Constructor = Alert
81
83
 
82
84
 
85
+ /* ALERT NO CONFLICT
86
+ * ================= */
87
+
88
+ $.fn.alert.noConflict = function () {
89
+ $.fn.alert = old
90
+ return this
91
+ }
92
+
93
+
83
94
  /* ALERT DATA-API
84
95
  * ============== */
85
96
 
@@ -64,6 +64,8 @@
64
64
  /* BUTTON PLUGIN DEFINITION
65
65
  * ======================== */
66
66
 
67
+ var old = $.fn.button
68
+
67
69
  $.fn.button = function (option) {
68
70
  return this.each(function () {
69
71
  var $this = $(this)
@@ -82,6 +84,15 @@
82
84
  $.fn.button.Constructor = Button
83
85
 
84
86
 
87
+ /* BUTTON NO CONFLICT
88
+ * ================== */
89
+
90
+ $.fn.button.noConflict = function () {
91
+ $.fn.button = old
92
+ return this
93
+ }
94
+
95
+
85
96
  /* BUTTON DATA-API
86
97
  * =============== */
87
98
 
@@ -29,7 +29,6 @@
29
29
  var Carousel = function (element, options) {
30
30
  this.$element = $(element)
31
31
  this.options = options
32
- this.options.slide && this.slide(this.options.slide)
33
32
  this.options.pause == 'hover' && this.$element
34
33
  .on('mouseenter', $.proxy(this.pause, this))
35
34
  .on('mouseleave', $.proxy(this.cycle, this))
@@ -141,6 +140,8 @@
141
140
  /* CAROUSEL PLUGIN DEFINITION
142
141
  * ========================== */
143
142
 
143
+ var old = $.fn.carousel
144
+
144
145
  $.fn.carousel = function (option) {
145
146
  return this.each(function () {
146
147
  var $this = $(this)
@@ -162,6 +163,14 @@
162
163
  $.fn.carousel.Constructor = Carousel
163
164
 
164
165
 
166
+ /* CAROUSEL NO CONFLICT
167
+ * ==================== */
168
+
169
+ $.fn.carousel.noConflict = function () {
170
+ $.fn.carousel = old
171
+ return this
172
+ }
173
+
165
174
  /* CAROUSEL DATA-API
166
175
  * ================= */
167
176
 
@@ -120,8 +120,10 @@
120
120
  }
121
121
 
122
122
 
123
- /* COLLAPSIBLE PLUGIN DEFINITION
124
- * ============================== */
123
+ /* COLLAPSE PLUGIN DEFINITION
124
+ * ========================== */
125
+
126
+ var old = $.fn.collapse
125
127
 
126
128
  $.fn.collapse = function (option) {
127
129
  return this.each(function () {
@@ -140,9 +142,18 @@
140
142
  $.fn.collapse.Constructor = Collapse
141
143
 
142
144
 
143
- /* COLLAPSIBLE DATA-API
145
+ /* COLLAPSE NO CONFLICT
144
146
  * ==================== */
145
147
 
148
+ $.fn.collapse.noConflict = function () {
149
+ $.fn.collapse = old
150
+ return this
151
+ }
152
+
153
+
154
+ /* COLLAPSE DATA-API
155
+ * ================= */
156
+
146
157
  $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
147
158
  var $this = $(this), href
148
159
  , target = $this.attr('data-target')
@@ -53,9 +53,10 @@
53
53
 
54
54
  if (!isActive) {
55
55
  $parent.toggleClass('open')
56
- $this.focus()
57
56
  }
58
57
 
58
+ $this.focus()
59
+
59
60
  return false
60
61
  }
61
62
 
@@ -82,7 +83,7 @@
82
83
 
83
84
  if (!isActive || (isActive && e.keyCode == 27)) return $this.click()
84
85
 
85
- $items = $('[role=menu] li:not(.divider) a', $parent)
86
+ $items = $('[role=menu] li:not(.divider):visible a', $parent)
86
87
 
87
88
  if (!$items.length) return
88
89
 
@@ -124,6 +125,8 @@
124
125
  /* DROPDOWN PLUGIN DEFINITION
125
126
  * ========================== */
126
127
 
128
+ var old = $.fn.dropdown
129
+
127
130
  $.fn.dropdown = function (option) {
128
131
  return this.each(function () {
129
132
  var $this = $(this)
@@ -136,6 +139,15 @@
136
139
  $.fn.dropdown.Constructor = Dropdown
137
140
 
138
141
 
142
+ /* DROPDOWN NO CONFLICT
143
+ * ==================== */
144
+
145
+ $.fn.dropdown.noConflict = function () {
146
+ $.fn.dropdown = old
147
+ return this
148
+ }
149
+
150
+
139
151
  /* APPLY TO STANDARD DROPDOWN ELEMENTS
140
152
  * =================================== */
141
153
 
@@ -193,6 +193,8 @@
193
193
  /* MODAL PLUGIN DEFINITION
194
194
  * ======================= */
195
195
 
196
+ var old = $.fn.modal
197
+
196
198
  $.fn.modal = function (option) {
197
199
  return this.each(function () {
198
200
  var $this = $(this)
@@ -213,6 +215,15 @@
213
215
  $.fn.modal.Constructor = Modal
214
216
 
215
217
 
218
+ /* MODAL NO CONFLICT
219
+ * ================= */
220
+
221
+ $.fn.modal.noConflict = function () {
222
+ $.fn.modal = old
223
+ return this
224
+ }
225
+
226
+
216
227
  /* MODAL DATA-API
217
228
  * ============== */
218
229
 
@@ -81,6 +81,8 @@
81
81
  /* POPOVER PLUGIN DEFINITION
82
82
  * ======================= */
83
83
 
84
+ var old = $.fn.popover
85
+
84
86
  $.fn.popover = function (option) {
85
87
  return this.each(function () {
86
88
  var $this = $(this)
@@ -100,4 +102,13 @@
100
102
  , template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"></div></div></div>'
101
103
  })
102
104
 
103
- }(window.jQuery);
105
+
106
+ /* POPOVER NO CONFLICT
107
+ * =================== */
108
+
109
+ $.fn.popover.noConflict = function () {
110
+ $.fn.popover = old
111
+ return this
112
+ }
113
+
114
+ }(window.jQuery);
@@ -59,7 +59,7 @@
59
59
  , $href = /^#\w/.test(href) && $(href)
60
60
  return ( $href
61
61
  && $href.length
62
- && [[ $href.position().top, href ]] ) || null
62
+ && [[ $href.position().top + self.$scrollElement.scrollTop(), href ]] ) || null
63
63
  })
64
64
  .sort(function (a, b) { return a[0] - b[0] })
65
65
  .each(function () {
@@ -121,6 +121,8 @@
121
121
  /* SCROLLSPY PLUGIN DEFINITION
122
122
  * =========================== */
123
123
 
124
+ var old = $.fn.scrollspy
125
+
124
126
  $.fn.scrollspy = function (option) {
125
127
  return this.each(function () {
126
128
  var $this = $(this)
@@ -138,6 +140,15 @@
138
140
  }
139
141
 
140
142
 
143
+ /* SCROLLSPY NO CONFLICT
144
+ * ===================== */
145
+
146
+ $.fn.scrollspy.noConflict = function () {
147
+ $.fn.scrollspy = old
148
+ return this
149
+ }
150
+
151
+
141
152
  /* SCROLLSPY DATA-API
142
153
  * ================== */
143
154
 
@@ -110,6 +110,8 @@
110
110
  /* TAB PLUGIN DEFINITION
111
111
  * ===================== */
112
112
 
113
+ var old = $.fn.tab
114
+
113
115
  $.fn.tab = function ( option ) {
114
116
  return this.each(function () {
115
117
  var $this = $(this)
@@ -122,6 +124,15 @@
122
124
  $.fn.tab.Constructor = Tab
123
125
 
124
126
 
127
+ /* TAB NO CONFLICT
128
+ * =============== */
129
+
130
+ $.fn.tab.noConflict = function () {
131
+ $.fn.tab = old
132
+ return this
133
+ }
134
+
135
+
125
136
  /* TAB DATA-API
126
137
  * ============ */
127
138
 
@@ -250,6 +250,8 @@
250
250
  /* TOOLTIP PLUGIN DEFINITION
251
251
  * ========================= */
252
252
 
253
+ var old = $.fn.tooltip
254
+
253
255
  $.fn.tooltip = function ( option ) {
254
256
  return this.each(function () {
255
257
  var $this = $(this)
@@ -273,4 +275,13 @@
273
275
  , html: false
274
276
  }
275
277
 
278
+
279
+ /* TOOLTIP NO CONFLICT
280
+ * =================== */
281
+
282
+ $.fn.tooltip.noConflict = function () {
283
+ $.fn.tooltip = old
284
+ return this
285
+ }
286
+
276
287
  }(window.jQuery);
@@ -33,8 +33,8 @@
33
33
  this.sorter = this.options.sorter || this.sorter
34
34
  this.highlighter = this.options.highlighter || this.highlighter
35
35
  this.updater = this.options.updater || this.updater
36
- this.$menu = $(this.options.menu).appendTo('body')
37
36
  this.source = this.options.source
37
+ this.$menu = $(this.options.menu)
38
38
  this.shown = false
39
39
  this.listen()
40
40
  }
@@ -56,16 +56,18 @@
56
56
  }
57
57
 
58
58
  , show: function () {
59
- var pos = $.extend({}, this.$element.offset(), {
59
+ var pos = $.extend({}, this.$element.position(), {
60
60
  height: this.$element[0].offsetHeight
61
61
  })
62
62
 
63
- this.$menu.css({
64
- top: pos.top + pos.height
65
- , left: pos.left
66
- })
63
+ this.$menu
64
+ .insertAfter(this.$element)
65
+ .css({
66
+ top: pos.top + pos.height
67
+ , left: pos.left
68
+ })
69
+ .show()
67
70
 
68
- this.$menu.show()
69
71
  this.shown = true
70
72
  return this
71
73
  }
@@ -217,7 +219,7 @@
217
219
  }
218
220
 
219
221
  , keydown: function (e) {
220
- this.suppressKeyPressRepeat = !~$.inArray(e.keyCode, [40,38,9,13,27])
222
+ this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
221
223
  this.move(e)
222
224
  }
223
225
 
@@ -276,6 +278,8 @@
276
278
  /* TYPEAHEAD PLUGIN DEFINITION
277
279
  * =========================== */
278
280
 
281
+ var old = $.fn.typeahead
282
+
279
283
  $.fn.typeahead = function (option) {
280
284
  return this.each(function () {
281
285
  var $this = $(this)
@@ -297,7 +301,16 @@
297
301
  $.fn.typeahead.Constructor = Typeahead
298
302
 
299
303
 
300
- /* TYPEAHEAD DATA-API
304
+ /* TYPEAHEAD NO CONFLICT
305
+ * =================== */
306
+
307
+ $.fn.typeahead.noConflict = function () {
308
+ $.fn.typeahead = old
309
+ return this
310
+ }
311
+
312
+
313
+ /* TYPEAHEAD DATA-API
301
314
  * ================== */
302
315
 
303
316
  $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
@@ -13,11 +13,11 @@
13
13
  display: inline-block;
14
14
  @include ie7-inline-block();
15
15
  text-shadow: 0 1px 0 $white;
16
- }
17
16
  > .divider {
18
17
  padding: 0 5px;
19
18
  color: #ccc;
20
19
  }
20
+ }
21
21
  > .active {
22
22
  color: $grayLight;
23
23
  }
@@ -86,6 +86,10 @@
86
86
  .btn-small [class*=" icon-"] {
87
87
  margin-top: 0;
88
88
  }
89
+ .btn-mini [class^="icon-"],
90
+ .btn-mini [class*=" icon-"] {
91
+ margin-top: -1px;
92
+ }
89
93
 
90
94
  // Mini
91
95
  .btn-mini {
@@ -47,6 +47,8 @@ pre {
47
47
  code {
48
48
  padding: 0;
49
49
  color: inherit;
50
+ white-space: pre;
51
+ white-space: pre-wrap;
50
52
  background-color: transparent;
51
53
  border: 0;
52
54
  }
@@ -126,62 +126,4 @@
126
126
  }
127
127
  }
128
128
 
129
-
130
-
131
- /*
132
- &.top .arrow {
133
- bottom: -$popoverArrowWidth;
134
- left: 50%;
135
- margin-left: -$popoverArrowWidth;
136
- border-width: $popoverArrowWidth $popoverArrowWidth 0;
137
- //border-top-color: $popoverArrowColor;
138
- border-top-color: blue;
139
- &:after {
140
- border-width: $popoverArrowOuterWidth $popoverArrowOuterWidth 0;
141
- //border-top-color: $popoverArrowOuterColor;
142
- border-top-color: red;
143
- top: -$popoverArrowWidth;
144
- //bottom: -1px;
145
- left: -$popoverArrowOuterWidth;
146
- }
147
- }
148
- &.right .arrow {
149
- top: 50%;
150
- left: -$popoverArrowWidth;
151
- margin-top: -$popoverArrowWidth;
152
- border-width: $popoverArrowWidth $popoverArrowWidth $popoverArrowWidth 0;
153
- border-right-color: $popoverArrowColor;
154
- &:after {
155
- border-width: $popoverArrowOuterWidth $popoverArrowOuterWidth $popoverArrowOuterWidth 0;
156
- border-right-color: $popoverArrowOuterColor;
157
- bottom: -$popoverArrowOuterWidth;
158
- left: -1px;
159
- }
160
- }
161
- &.bottom .arrow {
162
- top: -$popoverArrowWidth;
163
- left: 50%;
164
- margin-left: -$popoverArrowWidth;
165
- border-width: 0 $popoverArrowWidth $popoverArrowWidth;
166
- border-bottom-color: $popoverArrowColor;
167
- &:after {
168
- border-width: 0 $popoverArrowOuterWidth $popoverArrowOuterWidth;
169
- border-bottom-color: $popoverArrowOuterColor;
170
- top: -1px;
171
- left: -$popoverArrowOuterWidth;
172
- }
173
- }
174
- &.left .arrow {
175
- top: 50%;
176
- right: -$popoverArrowWidth;
177
- margin-top: -$popoverArrowWidth;
178
- border-width: $popoverArrowWidth 0 $popoverArrowWidth $popoverArrowWidth;
179
- border-left-color: $popoverArrowColor;
180
- &:after {
181
- border-width: $popoverArrowOuterWidth 0 $popoverArrowOuterWidth $popoverArrowOuterWidth;
182
- border-left-color: $popoverArrowOuterColor;
183
- bottom: -$popoverArrowOuterWidth;
184
- right: -1px;
185
- }
186
- }*/
187
129
  }
@@ -48,6 +48,11 @@ table {
48
48
  tbody + tbody {
49
49
  border-top: 2px solid $tableBorder;
50
50
  }
51
+
52
+ // Nesting
53
+ .table {
54
+ background-color: $bodyBackground;
55
+ }
51
56
  }
52
57
 
53
58
 
@@ -89,23 +94,23 @@ table {
89
94
  border-top: 0;
90
95
  }
91
96
  // For first th or td in the first row in the first thead or tbody
92
- thead:first-child tr:first-child th:first-child,
93
- tbody:first-child tr:first-child td:first-child {
97
+ thead:first-child tr:first-child > th:first-child,
98
+ tbody:first-child tr:first-child > td:first-child {
94
99
  @include border-top-left-radius($baseBorderRadius);
95
100
  }
96
- thead:first-child tr:first-child th:last-child,
97
- tbody:first-child tr:first-child td:last-child {
101
+ thead:first-child tr:first-child > th:last-child,
102
+ tbody:first-child tr:first-child > td:last-child {
98
103
  @include border-top-right-radius($baseBorderRadius);
99
104
  }
100
105
  // For first th or td in the last row in the last thead or tbody
101
- thead:last-child tr:last-child th:first-child,
102
- tbody:last-child tr:last-child td:first-child,
103
- tfoot:last-child tr:last-child td:first-child {
106
+ thead:last-child tr:last-child > th:first-child,
107
+ tbody:last-child tr:last-child > td:first-child,
108
+ tfoot:last-child tr:last-child > td:first-child {
104
109
  @include border-bottom-left-radius($baseBorderRadius);
105
110
  }
106
- thead:last-child tr:last-child th:last-child,
107
- tbody:last-child tr:last-child td:last-child,
108
- tfoot:last-child tr:last-child td:last-child {
111
+ thead:last-child tr:last-child > th:last-child,
112
+ tbody:last-child tr:last-child > td:last-child,
113
+ tfoot:last-child tr:last-child > td:last-child {
109
114
  @include border-bottom-right-radius($baseBorderRadius);
110
115
  }
111
116
 
@@ -143,8 +148,8 @@ table {
143
148
  // Default zebra-stripe styles (alternating gray and transparent backgrounds)
144
149
  .table-striped {
145
150
  tbody {
146
- tr:nth-child(odd) td,
147
- tr:nth-child(odd) th {
151
+ > tr:nth-child(odd) > td,
152
+ > tr:nth-child(odd) > th {
148
153
  background-color: $tableBackgroundAccent;
149
154
  }
150
155
  }
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anjlab-bootstrap-rails
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: 6
5
- version: 2.2.2.rc1
4
+ prerelease:
5
+ version: 2.2.2.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Yury Korolev
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-05 00:00:00.000000000 Z
12
+ date: 2012-12-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  version_requirements: !ruby/object:Gem::Requirement
@@ -168,13 +168,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
168
168
  version: '0'
169
169
  segments:
170
170
  - 0
171
- hash: 629169741563936471
171
+ hash: 2028513592731663622
172
172
  none: false
173
173
  required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  requirements:
175
- - - ! '>'
175
+ - - ! '>='
176
176
  - !ruby/object:Gem::Version
177
- version: 1.3.1
177
+ version: '0'
178
+ segments:
179
+ - 0
180
+ hash: 2028513592731663622
178
181
  none: false
179
182
  requirements: []
180
183
  rubyforge_project: