Commit a21363a7 authored by Mark Otto's avatar Mark Otto

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

Conflicts:
	bootstrap.css
parents 98007b83 8f726dc6
*~
.DS_Store
thumbs.db
This diff is collapsed.
......@@ -97,19 +97,9 @@ Authors
+ http://github.com/fat
Copyright and license
License
---------------------
Copyright 2011 Twitter, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this work except in compliance with the License.
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.
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
\ No newline at end of file
......@@ -6,7 +6,7 @@
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
* Date: Mon Oct 31 23:18:19 PDT 2011
* Date: Mon Oct 31 23:21:58 PDT 2011
*/
/* 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).
......@@ -814,67 +814,99 @@ textarea.xxlarge {
}
input.span1, textarea.span1 {
display: inline-block;
float: none;
width: 30px;
margin-left: 0;
}
input.span2, textarea.span2 {
display: inline-block;
float: none;
width: 90px;
margin-left: 0;
}
input.span3, textarea.span3 {
display: inline-block;
float: none;
width: 150px;
margin-left: 0;
}
input.span4, textarea.span4 {
display: inline-block;
float: none;
width: 210px;
margin-left: 0;
}
input.span5, textarea.span5 {
display: inline-block;
float: none;
width: 270px;
margin-left: 0;
}
input.span6, textarea.span6 {
display: inline-block;
float: none;
width: 330px;
margin-left: 0;
}
input.span7, textarea.span7 {
display: inline-block;
float: none;
width: 390px;
margin-left: 0;
}
input.span8, textarea.span8 {
display: inline-block;
float: none;
width: 450px;
margin-left: 0;
}
input.span9, textarea.span9 {
display: inline-block;
float: none;
width: 510px;
margin-left: 0;
}
input.span10, textarea.span10 {
display: inline-block;
float: none;
width: 570px;
margin-left: 0;
}
input.span11, textarea.span11 {
display: inline-block;
float: none;
width: 630px;
margin-left: 0;
}
input.span12, textarea.span12 {
display: inline-block;
float: none;
width: 690px;
margin-left: 0;
}
input.span13, textarea.span13 {
display: inline-block;
float: none;
width: 750px;
margin-left: 0;
}
input.span14, textarea.span14 {
display: inline-block;
float: none;
width: 810px;
margin-left: 0;
}
input.span15, textarea.span15 {
display: inline-block;
float: none;
width: 870px;
margin-left: 0;
}
input.span16, textarea.span16 {
display: inline-block;
float: none;
width: 930px;
margin-left: 0;
}
input[disabled],
select[disabled],
......@@ -1886,7 +1918,7 @@ footer {
border-color: #0064cd #0064cd #003f81;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
}
.btn:active {
.btn.active, .btn :active {
-webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
......
......@@ -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-xxlarge,input.xxlarge,textarea.xxlarge,select.xxlarge{width:530px;}
textarea.xxlarge{overflow-y:auto;}
input.span1,textarea.span1{display:inline-block;width:30px;}
input.span2,textarea.span2{display:inline-block;width:90px;}
input.span3,textarea.span3{display:inline-block;width:150px;}
input.span4,textarea.span4{display:inline-block;width:210px;}
input.span5,textarea.span5{display:inline-block;width:270px;}
input.span6,textarea.span6{display:inline-block;width:330px;}
input.span7,textarea.span7{display:inline-block;width:390px;}
input.span8,textarea.span8{display:inline-block;width:450px;}
input.span9,textarea.span9{display:inline-block;width:510px;}
input.span10,textarea.span10{display:inline-block;width:570px;}
input.span11,textarea.span11{display:inline-block;width:630px;}
input.span12,textarea.span12{display:inline-block;width:690px;}
input.span13,textarea.span13{display:inline-block;width:750px;}
input.span14,textarea.span14{display:inline-block;width:810px;}
input.span15,textarea.span15{display:inline-block;width:870px;}
input.span16,textarea.span16{display:inline-block;width:930px;}
input.span1,textarea.span1{display:inline-block;float:none;width:30px;margin-left:0;}
input.span2,textarea.span2{display:inline-block;float:none;width:90px;margin-left:0;}
input.span3,textarea.span3{display:inline-block;float:none;width:150px;margin-left:0;}
input.span4,textarea.span4{display:inline-block;float:none;width:210px;margin-left:0;}
input.span5,textarea.span5{display:inline-block;float:none;width:270px;margin-left:0;}
input.span6,textarea.span6{display:inline-block;float:none;width:330px;margin-left:0;}
input.span7,textarea.span7{display:inline-block;float:none;width:390px;margin-left:0;}
input.span8,textarea.span8{display:inline-block;float:none;width:450px;margin-left:0;}
input.span9,textarea.span9{display:inline-block;float:none;width:510px;margin-left:0;}
input.span10,textarea.span10{display:inline-block;float:none;width:570px;margin-left:0;}
input.span11,textarea.span11{display:inline-block;float:none;width:630px;margin-left:0;}
input.span12,textarea.span12{display:inline-block;float:none;width:690px;margin-left:0;}
input.span13,textarea.span13{display:inline-block;float:none;width:750px;margin-left:0;}
input.span14,textarea.span14{display:inline-block;float:none;width:810px;margin-left:0;}
input.span15,textarea.span15{display:inline-block;float:none;width:870px;margin-left:0;}
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;}
.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;}
......@@ -285,7 +285,7 @@ footer{margin-top:17px;padding-top:17px;border-top:1px solid #eee;}
.btn{cursor:pointer;display:inline-block;background-color:#e6e6e6;background-repeat:no-repeat;background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);background-image:-ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);padding:5px 14px 6px;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);color:#333;font-size:13px;line-height:normal;border:1px solid #ccc;border-bottom-color:#bbb;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-webkit-transition:0.1s linear all;-moz-transition:0.1s linear all;-ms-transition:0.1s linear all;-o-transition:0.1s linear all;transition:0.1s linear all;}.btn:hover{background-position:0 -15px;color:#333;text-decoration:none;}
.btn:focus{outline:1px dotted #666;}
.btn.primary{color:#ffffff;background-color:#0064cd;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));background-image:-moz-linear-gradient(top, #049cdb, #0064cd);background-image:-ms-linear-gradient(top, #049cdb, #0064cd);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));background-image:-webkit-linear-gradient(top, #049cdb, #0064cd);background-image:-o-linear-gradient(top, #049cdb, #0064cd);background-image:linear-gradient(top, #049cdb, #0064cd);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#0064cd #0064cd #003f81;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
.btn:active{-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);}
.btn.active,.btn :active{-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);}
.btn.disabled{cursor:default;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=65);-khtml-opacity:0.65;-moz-opacity:0.65;opacity:0.65;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
.btn[disabled]{cursor:default;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=65);-khtml-opacity:0.65;-moz-opacity:0.65;opacity:0.65;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
.btn.large{font-size:15px;line-height:normal;padding:9px 14px 9px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
......
......@@ -611,7 +611,7 @@
<tbody>
<tr>
<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>
<td><code>&lt;pre&gt;</code></td>
......@@ -620,7 +620,7 @@
&lt;h1&gt;Heading&lt;/h1&gt;
&lt;p&gt;Something right here...&lt;/p&gt;
&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>
</tr>
<tr>
......
This diff is collapsed.
......@@ -52,17 +52,17 @@
<!-- Example row of columns -->
<div class="row">
<div class="span6">
<div class="span-one-third">
<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><a class="btn" href="#">View details &raquo;</a></p>
</div>
<div class="span5">
<div class="span-one-third">
<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><a class="btn" href="#">View details &raquo;</a></p>
</div>
<div class="span5">
<div class="span-one-third">
<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><a class="btn" href="#">View details &raquo;</a></p>
......
......@@ -20,6 +20,8 @@
!function( $ ){
"use strict"
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
* ======================================================= */
......@@ -51,9 +53,10 @@
/* ALERT CLASS DEFINITION
* ====================== */
var Alert = function ( content, selector ) {
var Alert = function ( content, options ) {
this.settings = $.extend({}, $.fn.alert.defaults, options)
this.$element = $(content)
.delegate(selector || '.close', 'click', this.close)
.delegate(this.settings.selector, 'click', this.close)
}
Alert.prototype = {
......@@ -92,13 +95,19 @@
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 () {
new Alert($('body'), '.alert-message[data-alert] .close')
new Alert($('body'), {
selector: '.alert-message[data-alert] .close'
})
})
}( window.jQuery || window.ender );
\ No newline at end of file
/* ============================================================
* bootstrap-dropdown.js v1.3.0
* http://twitter.github.com/bootstrap/javascript.html#dropdown
* ============================================================
* Copyright 2011 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License 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.
* ============================================================ */
!function( $ ){
"use strict"
function setState(el, state) {
var d = 'disabled'
, $el = $(el)
, data = $el.data()
state = state + 'Text'
data.resetText || $el.data('resetText', $el.html())
$el.html( data[state] || $.fn.button.defaults[state] )
state == 'loadingText' ?
$el.addClass(d).attr(d, d) :
$el.removeClass(d).removeAttr(d)
}
function toggle(el) {
$(el).toggleClass('active')
}
$.fn.button = function(options) {
return this.each(function () {
if (options == 'toggle') {
return toggle(this)
}
options && setState(this, options)
})
}
$.fn.button.defaults = {
loadingText: 'loading...'
}
$(function () {
$('body').delegate('.btn[data-toggle]', 'click', function () {
$(this).button('toggle')
})
})
}( window.jQuery || window.ender );
\ No newline at end of file
......@@ -20,6 +20,8 @@
!function( $ ){
"use strict"
/* DROPDOWN PLUGIN DEFINITION
* ========================== */
......
......@@ -20,6 +20,8 @@
!function( $ ){
"use strict"
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
* ======================================================= */
......@@ -53,12 +55,10 @@
* ============================= */
var Modal = function ( content, options ) {
this.settings = $.extend({}, $.fn.modal.defaults)
this.settings = $.extend({}, $.fn.modal.defaults, options)
this.$element = $(content)
.delegate('.close', 'click.modal', $.proxy(this.hide, this))
$.extend( this.settings, options )
if ( this.settings.show ) {
this.show()
}
......@@ -89,8 +89,7 @@
that.$element[0].offsetWidth // force reflow
}
that.$element
.addClass('in')
that.$element.addClass('in')
transition ?
that.$element.one(transitionEnd, function () { that.$element.trigger('shown') }) :
......@@ -117,17 +116,9 @@
.trigger('hide')
.removeClass('in')
function removeElement () {
that.$element
.hide()
.trigger('hidden')
backdrop.call(that)
}
$.support.transition && this.$element.hasClass('fade') ?
this.$element.one(transitionEnd, removeElement) :
removeElement()
hideWithTransition.call(this) :
hideModal.call(this)
return this
}
......@@ -138,6 +129,28 @@
/* MODAL PRIVATE METHODS
* ===================== */
function hideWithTransition() {
// firefox drops transitionEnd events :{o
var that = this
, timeout = setTimeout(function () {
that.$element.unbind(transitionEnd)
hideModal.call(that)
}, 500)
this.$element.one(transitionEnd, function () {
clearTimeout(timeout)
hideModal.call(that)
})
}
function hideModal (that) {
this.$element
.hide()
.trigger('hidden')
backdrop.call(this)
}
function backdrop ( callback ) {
var that = this
, animate = this.$element.hasClass('fade') ? 'fade' : ''
......@@ -164,19 +177,20 @@
} else if ( !this.isShown && this.$backdrop ) {
this.$backdrop.removeClass('in')
function removeElement() {
that.$backdrop.remove()
that.$backdrop = null
}
$.support.transition && this.$element.hasClass('fade')?
this.$backdrop.one(transitionEnd, removeElement) :
removeElement()
this.$backdrop.one(transitionEnd, $.proxy(removeBackdrop, this)) :
removeBackdrop.call(this)
} else if ( callback ) {
callback()
}
}
function removeBackdrop() {
this.$backdrop.remove()
this.$backdrop = null
}
function escape() {
var that = this
if ( this.isShown && this.settings.keyboard ) {
......
......@@ -20,6 +20,8 @@
!function( $ ) {
"use strict"
var Popover = function ( element, options ) {
this.$element = $(element)
this.options = options
......@@ -39,13 +41,17 @@
$tip[0].className = 'popover'
}
, hasContent: function () {
return this.getTitle() || this.getContent()
}
, getContent: function () {
var content
, $e = this.$element
, o = this.options
if (typeof this.options.content == 'string') {
content = $e.attr(o.content)
content = this.options.content
} else if (typeof this.options.content == 'function') {
content = this.options.content.call(this.$element[0])
}
......@@ -55,7 +61,7 @@
, tip: function() {
if (!this.$tip) {
this.$tip = $('<div class="popover" />')
.html('<div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div>')
.html(this.options.template)
}
return this.$tip
}
......@@ -72,6 +78,9 @@
return this
}
$.fn.popover.defaults = $.extend({} , $.fn.twipsy.defaults, { content: 'data-content', placement: 'right'})
$.fn.popover.defaults = $.extend({} , $.fn.twipsy.defaults, {
placement: 'right'
, template: '<div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div>'
})
}( window.jQuery || window.ender );
\ No newline at end of file
......@@ -20,6 +20,8 @@
!function ( $ ) {
"use strict"
var $window = $(window)
function ScrollSpy( topbar, selector ) {
......
......@@ -20,25 +20,37 @@
!function( $ ){
"use strict"
function activate ( element, container ) {
container.find('> .active').removeClass('active')
container
.find('> .active')
.removeClass('active')
.find('> .dropdown-menu > .active')
.removeClass('active')
element.addClass('active')
if ( element.parent('.dropdown-menu') ) {
element.closest('li.dropdown').addClass('active')
}
}
function tab( e ) {
var $this = $(this)
, $ul = $this.closest('ul')
, $ul = $this.closest('ul:not(.dropdown-menu)')
, href = $this.attr('href')
, previous
, $href
if (/^#\w+/.test(href)) {
if ( /^#\w+/.test(href) ) {
e.preventDefault()
if ($this.parent('li').hasClass('active')) {
if ( $this.parent('li').hasClass('active') ) {
return
}
previous = $ul.find('.active a')[0]
previous = $ul.find('.active a').last()[0]
$href = $(href)
activate($this.parent('li'), $ul)
......
......@@ -21,6 +21,8 @@
!function( $ ) {
"use strict"
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
* ======================================================= */
......@@ -70,7 +72,7 @@
, $tip
, tp
if (this.getTitle() && this.enabled) {
if (this.hasContent() && this.enabled) {
$tip = this.tip()
this.setContent()
......@@ -90,7 +92,8 @@
actualWidth = $tip[0].offsetWidth
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) {
case 'below':
......@@ -142,6 +145,10 @@
}
}
, hasContent: function () {
return this.getTitle()
}
, getTitle: function() {
var title
, $e = this.$element
......@@ -162,7 +169,7 @@
, tip: function() {
if (!this.$tip) {
this.$tip = $('<div class="twipsy" />').html('<div class="twipsy-arrow"></div><div class="twipsy-inner"></div>')
this.$tip = $('<div class="twipsy" />').html(this.options.template)
}
return this.$tip
}
......@@ -193,15 +200,10 @@
/* TWIPSY PRIVATE METHODS
* ====================== */
var _ = {
maybeCall: function ( thing, ctx ) {
return (typeof thing == 'function') ? (thing.call(ctx)) : thing
}
function maybeCall ( thing, ctx, args ) {
return typeof thing == 'function' ? thing.apply(ctx, args) : thing
}
/* TWIPSY PLUGIN DEFINITION
* ======================== */
......@@ -298,10 +300,11 @@
, offset: 0
, title: 'title'
, trigger: 'hover'
, template: '<div class="twipsy-arrow"></div><div class="twipsy-inner"></div>'
}
$.fn.twipsy.elementOptions = function(ele, options) {
return $.metadata ? $.extend({}, options, $(ele).metadata()) : options
return $.extend({}, options, $(ele).data())
}
}( window.jQuery || window.ender );
\ No newline at end of file
......@@ -4,7 +4,7 @@
<title>Bootstrap Plugin Test Suite</title>
<!-- jquery -->
<script src="http://code.jquery.com/jquery-1.5.2.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<!-- qunit -->
<link rel="stylesheet" href="vendor/qunit.css" type="text/css" media="screen" />
......@@ -17,6 +17,7 @@
<script src="../../js/bootstrap-tabs.js"></script>
<script src="../../js/bootstrap-twipsy.js"></script>
<script src="../../js/bootstrap-popover.js"></script>
<script src="../../js/bootstrap-buttons.js"></script>
<!-- unit tests -->
<script src="unit/bootstrap-alerts.js"></script>
......@@ -25,6 +26,7 @@
<script src="unit/bootstrap-popover.js"></script>
<script src="unit/bootstrap-tabs.js"></script>
<script src="unit/bootstrap-twipsy.js"></script>
<script src="unit/bootstrap-buttons.js"></script>
<body>
<div>
......
$(function () {
module("bootstrap-buttons")
test("should be defined on jquery object", function () {
ok($(document.body).button, 'tabs method is defined')
})
test("should return element", function () {
ok($(document.body).button()[0] == document.body, 'document.body returned')
})
test("should return set state to loading", function () {
var btn = $('<button class="btn" data-loading-text="fat">mdo</button>')
equals(btn.html(), 'mdo', 'btn text equals mdo')
btn.button('loading')
equals(btn.html(), 'fat', 'btn text equals fat')
ok(btn.attr('disabled'), 'btn is disabled')
ok(btn.hasClass('disabled'), 'btn has disabled class')
})
test("should return reset state", function () {
var btn = $('<button class="btn" data-loading-text="fat">mdo</button>')
equals(btn.html(), 'mdo', 'btn text equals mdo')
btn.button('loading')
equals(btn.html(), 'fat', 'btn text equals fat')
ok(btn.attr('disabled'), 'btn is disabled')
ok(btn.hasClass('disabled'), 'btn is disabled')
btn.button('reset')
equals(btn.html(), 'mdo', 'btn text equals mdo')
ok(!btn.attr('disabled'), 'btn is not disabled')
ok(!btn.hasClass('disabled'), 'btn does not have disabled class')
})
test("should toggle active", function () {
var btn = $('<button class="btn" data-loading-text="fat">mdo</button>')
ok(!btn.hasClass('active'), 'btn does not have active class')
btn.button('toggle')
ok(btn.hasClass('active'), 'btn has class active')
})
})
\ No newline at end of file
......@@ -255,7 +255,9 @@ textarea.xxlarge {
// This is a duplication of the main grid .columns() mixin, but subtracts 10px to account for input padding and border
.formColumns(@columnSpan: 1) {
display: inline-block;
float: none;
width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) - 10;
margin-left: 0;
}
input,
textarea {
......
......@@ -573,7 +573,8 @@ footer {
.transition(.1s linear all);
// Active and Disabled states
&:active {
&.active,
:active {
@shadow: inset 0 2px 4px rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.05);
.box-shadow(@shadow);
}
......
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