Commit 9a30b8c0 authored by Jacob Thornton's avatar Jacob Thornton

Merge branch 'master' of github.com:twitter/bootstrap into dev

Conflicts:
	bootstrap.css
	bootstrap.min.css
	lib/forms.less
parents 61937a80 d3b8a965
.DS_Store *~
\ No newline at end of file .DS_Store
thumbs.db
This diff is collapsed.
...@@ -97,19 +97,9 @@ Authors ...@@ -97,19 +97,9 @@ Authors
+ http://github.com/fat + http://github.com/fat
Copyright and license License
--------------------- ---------------------
Copyright 2011 Twitter, Inc. Copyright 2011 Twitter, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
you may not use this work except in compliance with the License. \ No newline at end of file
You may obtain a copy of the License in the LICENSE file, or at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Designed and built with all the love in the world @twitter by @mdo and @fat. * Designed and built with all the love in the world @twitter by @mdo and @fat.
* Date: Fri Oct 28 18:57:30 PDT 2011 * Date: Sat Oct 29 17:08:31 PDT 2011
*/ */
/* Reset.less /* Reset.less
* Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc). * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc).
...@@ -813,67 +813,99 @@ textarea.xxlarge { ...@@ -813,67 +813,99 @@ textarea.xxlarge {
} }
input.span1, textarea.span1 { input.span1, textarea.span1 {
display: inline-block; display: inline-block;
float: none;
width: 30px; width: 30px;
margin-left: 0;
} }
input.span2, textarea.span2 { input.span2, textarea.span2 {
display: inline-block; display: inline-block;
float: none;
width: 90px; width: 90px;
margin-left: 0;
} }
input.span3, textarea.span3 { input.span3, textarea.span3 {
display: inline-block; display: inline-block;
float: none;
width: 150px; width: 150px;
margin-left: 0;
} }
input.span4, textarea.span4 { input.span4, textarea.span4 {
display: inline-block; display: inline-block;
float: none;
width: 210px; width: 210px;
margin-left: 0;
} }
input.span5, textarea.span5 { input.span5, textarea.span5 {
display: inline-block; display: inline-block;
float: none;
width: 270px; width: 270px;
margin-left: 0;
} }
input.span6, textarea.span6 { input.span6, textarea.span6 {
display: inline-block; display: inline-block;
float: none;
width: 330px; width: 330px;
margin-left: 0;
} }
input.span7, textarea.span7 { input.span7, textarea.span7 {
display: inline-block; display: inline-block;
float: none;
width: 390px; width: 390px;
margin-left: 0;
} }
input.span8, textarea.span8 { input.span8, textarea.span8 {
display: inline-block; display: inline-block;
float: none;
width: 450px; width: 450px;
margin-left: 0;
} }
input.span9, textarea.span9 { input.span9, textarea.span9 {
display: inline-block; display: inline-block;
float: none;
width: 510px; width: 510px;
margin-left: 0;
} }
input.span10, textarea.span10 { input.span10, textarea.span10 {
display: inline-block; display: inline-block;
float: none;
width: 570px; width: 570px;
margin-left: 0;
} }
input.span11, textarea.span11 { input.span11, textarea.span11 {
display: inline-block; display: inline-block;
float: none;
width: 630px; width: 630px;
margin-left: 0;
} }
input.span12, textarea.span12 { input.span12, textarea.span12 {
display: inline-block; display: inline-block;
float: none;
width: 690px; width: 690px;
margin-left: 0;
} }
input.span13, textarea.span13 { input.span13, textarea.span13 {
display: inline-block; display: inline-block;
float: none;
width: 750px; width: 750px;
margin-left: 0;
} }
input.span14, textarea.span14 { input.span14, textarea.span14 {
display: inline-block; display: inline-block;
float: none;
width: 810px; width: 810px;
margin-left: 0;
} }
input.span15, textarea.span15 { input.span15, textarea.span15 {
display: inline-block; display: inline-block;
float: none;
width: 870px; width: 870px;
margin-left: 0;
} }
input.span16, textarea.span16 { input.span16, textarea.span16 {
display: inline-block; display: inline-block;
float: none;
width: 930px; width: 930px;
margin-left: 0;
} }
input[disabled], input[disabled],
select[disabled], select[disabled],
......
...@@ -141,22 +141,22 @@ form .clearfix.success .input-prepend .add-on,form .clearfix.success .input-appe ...@@ -141,22 +141,22 @@ form .clearfix.success .input-prepend .add-on,form .clearfix.success .input-appe
.input-xlarge,input.xlarge,textarea.xlarge,select.xlarge{width:270px;} .input-xlarge,input.xlarge,textarea.xlarge,select.xlarge{width:270px;}
.input-xxlarge,input.xxlarge,textarea.xxlarge,select.xxlarge{width:530px;} .input-xxlarge,input.xxlarge,textarea.xxlarge,select.xxlarge{width:530px;}
textarea.xxlarge{overflow-y:auto;} textarea.xxlarge{overflow-y:auto;}
input.span1,textarea.span1{display:inline-block;width:30px;} input.span1,textarea.span1{display:inline-block;float:none;width:30px;margin-left:0;}
input.span2,textarea.span2{display:inline-block;width:90px;} input.span2,textarea.span2{display:inline-block;float:none;width:90px;margin-left:0;}
input.span3,textarea.span3{display:inline-block;width:150px;} input.span3,textarea.span3{display:inline-block;float:none;width:150px;margin-left:0;}
input.span4,textarea.span4{display:inline-block;width:210px;} input.span4,textarea.span4{display:inline-block;float:none;width:210px;margin-left:0;}
input.span5,textarea.span5{display:inline-block;width:270px;} input.span5,textarea.span5{display:inline-block;float:none;width:270px;margin-left:0;}
input.span6,textarea.span6{display:inline-block;width:330px;} input.span6,textarea.span6{display:inline-block;float:none;width:330px;margin-left:0;}
input.span7,textarea.span7{display:inline-block;width:390px;} input.span7,textarea.span7{display:inline-block;float:none;width:390px;margin-left:0;}
input.span8,textarea.span8{display:inline-block;width:450px;} input.span8,textarea.span8{display:inline-block;float:none;width:450px;margin-left:0;}
input.span9,textarea.span9{display:inline-block;width:510px;} input.span9,textarea.span9{display:inline-block;float:none;width:510px;margin-left:0;}
input.span10,textarea.span10{display:inline-block;width:570px;} input.span10,textarea.span10{display:inline-block;float:none;width:570px;margin-left:0;}
input.span11,textarea.span11{display:inline-block;width:630px;} input.span11,textarea.span11{display:inline-block;float:none;width:630px;margin-left:0;}
input.span12,textarea.span12{display:inline-block;width:690px;} input.span12,textarea.span12{display:inline-block;float:none;width:690px;margin-left:0;}
input.span13,textarea.span13{display:inline-block;width:750px;} input.span13,textarea.span13{display:inline-block;float:none;width:750px;margin-left:0;}
input.span14,textarea.span14{display:inline-block;width:810px;} input.span14,textarea.span14{display:inline-block;float:none;width:810px;margin-left:0;}
input.span15,textarea.span15{display:inline-block;width:870px;} input.span15,textarea.span15{display:inline-block;float:none;width:870px;margin-left:0;}
input.span16,textarea.span16{display:inline-block;width:930px;} input.span16,textarea.span16{display:inline-block;float:none;width:930px;margin-left:0;}
input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{background-color:#f5f5f5;border-color:#ddd;cursor:not-allowed;} input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{background-color:#f5f5f5;border-color:#ddd;cursor:not-allowed;}
.actions{background:#f5f5f5;margin-top:18px;margin-bottom:18px;padding:17px 20px 18px 150px;border-top:1px solid #ddd;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;}.actions .secondary-action{float:right;}.actions .secondary-action a{line-height:30px;}.actions .secondary-action a:hover{text-decoration:underline;} .actions{background:#f5f5f5;margin-top:18px;margin-bottom:18px;padding:17px 20px 18px 150px;border-top:1px solid #ddd;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;}.actions .secondary-action{float:right;}.actions .secondary-action a{line-height:30px;}.actions .secondary-action a:hover{text-decoration:underline;}
.help-inline,.help-block{font-size:13px;line-height:18px;color:#bfbfbf;} .help-inline,.help-block{font-size:13px;line-height:18px;color:#bfbfbf;}
......
...@@ -611,7 +611,7 @@ ...@@ -611,7 +611,7 @@
<tbody> <tbody>
<tr> <tr>
<td><code>&lt;code&gt;</code></td> <td><code>&lt;code&gt;</code></td>
<td>In a line of text like this, your wrapped code will look like this <code>&gt;html&lt;</code> element.</td> <td>In a line of text like this, your wrapped code will look like this <code>&lt;html&gt;</code> element.</td>
</tr> </tr>
<tr> <tr>
<td><code>&lt;pre&gt;</code></td> <td><code>&lt;pre&gt;</code></td>
...@@ -620,7 +620,7 @@ ...@@ -620,7 +620,7 @@
&lt;h1&gt;Heading&lt;/h1&gt; &lt;h1&gt;Heading&lt;/h1&gt;
&lt;p&gt;Something right here...&lt;/p&gt; &lt;p&gt;Something right here...&lt;/p&gt;
&lt;/div&gt;</pre> &lt;/div&gt;</pre>
<p><strong>Note:</strong> Be sure to keep code within <code>pre</code> tags as close to the left as possible; it will render all tabs.</p> <p><strong>Note:</strong> Be sure to keep code within <code>&lt;pre&gt;</code> tags as close to the left as possible; it will render all tabs.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -2030,4 +2030,4 @@ Lorem ipsum dolar sit amet illo error <a href="#" title="below">ipsum</a> verita ...@@ -2030,4 +2030,4 @@ Lorem ipsum dolar sit amet illo error <a href="#" title="below">ipsum</a> verita
<script src="assets/js/application.js"></script> <script src="assets/js/application.js"></script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -195,7 +195,6 @@ $('#my-modal').bind('hidden', function () { ...@@ -195,7 +195,6 @@ $('#my-modal').bind('hidden', function () {
</div> </div>
<button data-controls-modal="modal-from-dom" data-backdrop="true" data-keyboard="true" class="btn danger">Launch Modal</button> <button data-controls-modal="modal-from-dom" data-backdrop="true" data-keyboard="true" class="btn danger">Launch Modal</button>
</div> </div>
</div> </div>
</section> </section>
...@@ -384,6 +383,13 @@ $('#.tabs').bind('change', function (e) { ...@@ -384,6 +383,13 @@ $('#.tabs').bind('change', function (e) {
<li><a href="#profile">Profile</a></li> <li><a href="#profile">Profile</a></li>
<li><a href="#messages">Messages</a></li> <li><a href="#messages">Messages</a></li>
<li><a href="#settings">Settings</a></li> <li><a href="#settings">Settings</a></li>
<li class="dropdown" data-dropdown="dropdown">
<a href="#" class="dropdown-toggle">Dropdown</a>
<ul class="dropdown-menu">
<li><a href="#fat">@fat</a></li>
<li><a href="#mdo">@mdo</a></li>
</ul>
</li>
</ul> </ul>
<div id="my-tab-content" class="tab-content"> <div id="my-tab-content" class="tab-content">
<div class="active" id="home"> <div class="active" id="home">
...@@ -398,6 +404,12 @@ $('#.tabs').bind('change', function (e) { ...@@ -398,6 +404,12 @@ $('#.tabs').bind('change', function (e) {
<div id="settings"> <div id="settings">
<p>Sunt qui biodiesel mollit officia, fanny pack put a bird on it thundercats seitan squid ad wolf bicycle rights blog. Et aute readymade farm-to-table carles 8-bit, nesciunt nulla etsy adipisicing organic ea. Master cleanse mollit high life, next level Austin nesciunt american apparel twee mustache adipisicing reprehenderit hoodie portland irony. Aliqua tofu quinoa +1 commodo eiusmod. High life williamsburg cupidatat twee homo leggings. Four loko vinyl DIY consectetur nisi, marfa retro keffiyeh vegan. Fanny pack viral retro consectetur gentrify fap.</p> <p>Sunt qui biodiesel mollit officia, fanny pack put a bird on it thundercats seitan squid ad wolf bicycle rights blog. Et aute readymade farm-to-table carles 8-bit, nesciunt nulla etsy adipisicing organic ea. Master cleanse mollit high life, next level Austin nesciunt american apparel twee mustache adipisicing reprehenderit hoodie portland irony. Aliqua tofu quinoa +1 commodo eiusmod. High life williamsburg cupidatat twee homo leggings. Four loko vinyl DIY consectetur nisi, marfa retro keffiyeh vegan. Fanny pack viral retro consectetur gentrify fap.</p>
</div> </div>
<div id="fat">
<p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p>
</div>
<div id="mdo">
<p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -659,6 +671,26 @@ $('#.tabs').bind('change', function (e) { ...@@ -659,6 +671,26 @@ $('#.tabs').bind('change', function (e) {
<pre class="prettyprint linenums">$(".alert-message").alert()</pre> <pre class="prettyprint linenums">$(".alert-message").alert()</pre>
<h3>Markup</h3> <h3>Markup</h3>
<p>Just add a <code>data-alert</code> attribute to your alert messages to automatically give them close functionality.</p> <p>Just add a <code>data-alert</code> attribute to your alert messages to automatically give them close functionality.</p>
<h3>Options</h3>
<table class="zebra-striped">
<thead>
<tr>
<th style="width: 100px;">Name</th>
<th style="width: 100px;">type</th>
<th style="width: 50px;">default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>selector</td>
<td>string</td>
<td>'.close'</td>
<td>What selector to target for closing an alert.</td>
</tr>
</tbody>
</table>
<h3>Methods</h3> <h3>Methods</h3>
<h4>$().alert()</h4> <h4>$().alert()</h4>
<p>Wraps all alerts with close functionality. To have your alerts animate out when closed, make sure they have the <code>.fade</code> and <code>.in</code> class already applied to them.</p> <p>Wraps all alerts with close functionality. To have your alerts animate out when closed, make sure they have the <code>.fade</code> and <code>.in</code> class already applied to them.</p>
......
...@@ -52,17 +52,17 @@ ...@@ -52,17 +52,17 @@
<!-- Example row of columns --> <!-- Example row of columns -->
<div class="row"> <div class="row">
<div class="span6"> <div class="span-one-third">
<h2>Heading</h2> <h2>Heading</h2>
<p>Etiam porta sem malesuada magna mollis euismod. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</p> <p>Etiam porta sem malesuada magna mollis euismod. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</p>
<p><a class="btn" href="#">View details &raquo;</a></p> <p><a class="btn" href="#">View details &raquo;</a></p>
</div> </div>
<div class="span5"> <div class="span-one-third">
<h2>Heading</h2> <h2>Heading</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p> <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
<p><a class="btn" href="#">View details &raquo;</a></p> <p><a class="btn" href="#">View details &raquo;</a></p>
</div> </div>
<div class="span5"> <div class="span-one-third">
<h2>Heading</h2> <h2>Heading</h2>
<p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p> <p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
<p><a class="btn" href="#">View details &raquo;</a></p> <p><a class="btn" href="#">View details &raquo;</a></p>
......
...@@ -51,9 +51,10 @@ ...@@ -51,9 +51,10 @@
/* ALERT CLASS DEFINITION /* ALERT CLASS DEFINITION
* ====================== */ * ====================== */
var Alert = function ( content, selector ) { var Alert = function ( content, options ) {
this.settings = $.extend({}, $.fn.alert.defaults, options)
this.$element = $(content) this.$element = $(content)
.delegate(selector || '.close', 'click', this.close) .delegate(this.settings.selector, 'click', this.close)
} }
Alert.prototype = { Alert.prototype = {
...@@ -92,13 +93,19 @@ ...@@ -92,13 +93,19 @@
return $this.data('alert')[options]() return $this.data('alert')[options]()
} }
$(this).data('alert', new Alert( this )) $(this).data('alert', new Alert( this, options ))
}) })
} }
$.fn.alert.defaults = {
selector: '.close'
}
$(document).ready(function () { $(document).ready(function () {
new Alert($('body'), '.alert-message[data-alert] .close') new Alert($('body'), {
selector: '.alert-message[data-alert] .close'
})
}) })
}( window.jQuery || window.ender ); }( window.jQuery || window.ender );
\ No newline at end of file
...@@ -53,12 +53,10 @@ ...@@ -53,12 +53,10 @@
* ============================= */ * ============================= */
var Modal = function ( content, options ) { var Modal = function ( content, options ) {
this.settings = $.extend({}, $.fn.modal.defaults) this.settings = $.extend({}, $.fn.modal.defaults, options)
this.$element = $(content) this.$element = $(content)
.delegate('.close', 'click.modal', $.proxy(this.hide, this)) .delegate('.close', 'click.modal', $.proxy(this.hide, this))
$.extend( this.settings, options )
if ( this.settings.show ) { if ( this.settings.show ) {
this.show() this.show()
} }
......
...@@ -21,24 +21,33 @@ ...@@ -21,24 +21,33 @@
!function( $ ){ !function( $ ){
function activate ( element, container ) { function activate ( element, container ) {
container.find('> .active').removeClass('active') container
.find('> .active')
.removeClass('active')
.find('> .dropdown-menu > .active')
.removeClass('active')
element.addClass('active') element.addClass('active')
if ( element.parent('.dropdown-menu') ) {
element.closest('li.dropdown').addClass('active')
}
} }
function tab( e ) { function tab( e ) {
var $this = $(this) var $this = $(this)
, $ul = $this.closest('ul') , $ul = $this.closest('ul:not(.dropdown-menu)')
, href = $this.attr('href') , href = $this.attr('href')
, previous , previous
if (/^#\w+/.test(href)) { if ( /^#\w+/.test(href) ) {
e.preventDefault() e.preventDefault()
if ($this.parent('li').hasClass('active')) { if ( $this.parent('li').hasClass('active') ) {
return return
} }
previous = $ul.find('.active a')[0] previous = $ul.find('.active a').last()[0]
$href = $(href) $href = $(href)
activate($this.parent('li'), $ul) activate($this.parent('li'), $ul)
......
...@@ -90,7 +90,8 @@ ...@@ -90,7 +90,8 @@
actualWidth = $tip[0].offsetWidth actualWidth = $tip[0].offsetWidth
actualHeight = $tip[0].offsetHeight actualHeight = $tip[0].offsetHeight
placement = _.maybeCall(this.options.placement, this.$element[0])
placement = maybeCall(this.options.placement, this, [ $tip[0], this.$element[0] ])
switch (placement) { switch (placement) {
case 'below': case 'below':
...@@ -193,15 +194,10 @@ ...@@ -193,15 +194,10 @@
/* TWIPSY PRIVATE METHODS /* TWIPSY PRIVATE METHODS
* ====================== */ * ====================== */
var _ = { function maybeCall ( thing, ctx, args ) {
return typeof thing == 'function' ? thing.apply(ctx, args) : thing
maybeCall: function ( thing, ctx ) {
return (typeof thing == 'function') ? (thing.call(ctx)) : thing
}
} }
/* TWIPSY PLUGIN DEFINITION /* TWIPSY PLUGIN DEFINITION
* ======================== */ * ======================== */
......
...@@ -254,7 +254,9 @@ textarea.xxlarge { ...@@ -254,7 +254,9 @@ textarea.xxlarge {
// This is a duplication of the main grid .columns() mixin, but subtracts 10px to account for input padding and border // This is a duplication of the main grid .columns() mixin, but subtracts 10px to account for input padding and border
.formColumns(@columnSpan: 1) { .formColumns(@columnSpan: 1) {
display: inline-block; display: inline-block;
float: none;
width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) - 10; width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) - 10;
margin-left: 0;
} }
input, input,
textarea { textarea {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment