mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-01 13:24:25 +01:00
Merge branch 'dev' of github.com:twitter/bootstrap into dev
Conflicts: bootstrap.css
This commit is contained in:
commit
a21363a749
4
.gitignore
vendored
4
.gitignore
vendored
@ -1 +1,3 @@
|
||||
.DS_Store
|
||||
*~
|
||||
.DS_Store
|
||||
thumbs.db
|
||||
|
183
LICENSE
183
LICENSE
@ -1,13 +1,176 @@
|
||||
Copyright 2011 Twitter, Inc.
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
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
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
1. Definitions.
|
||||
|
||||
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.
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
14
README.md
14
README.md
@ -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
|
36
bootstrap.css
vendored
36
bootstrap.css
vendored
@ -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);
|
||||
|
34
bootstrap.min.css
vendored
34
bootstrap.min.css
vendored
@ -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><code></code></td>
|
||||
<td>In a line of text like this, your wrapped code will look like this <code>>html<</code> element.</td>
|
||||
<td>In a line of text like this, your wrapped code will look like this <code><html></code> element.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code><pre></code></td>
|
||||
@ -620,7 +620,7 @@
|
||||
<h1>Heading</h1>
|
||||
<p>Something right here...</p>
|
||||
</div></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><pre></code> tags as close to the left as possible; it will render all tabs.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -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>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
@ -22,6 +22,7 @@
|
||||
<script src="../js/bootstrap-dropdown.js"></script>
|
||||
<script src="../js/bootstrap-scrollspy.js"></script>
|
||||
<script src="../js/bootstrap-tabs.js"></script>
|
||||
<script src="../js/bootstrap-buttons.js"></script>
|
||||
|
||||
<!-- Le styles -->
|
||||
<link href="../bootstrap.css" rel="stylesheet">
|
||||
@ -48,6 +49,7 @@
|
||||
<li><a href="#modal">Modals</a></li>
|
||||
<li><a href="#dropdown">Dropdown</a></li>
|
||||
<li><a href="#scrollspy">ScrollSpy</a></li>
|
||||
<li><a href="#buttons">Buttons</a></li>
|
||||
<li><a href="#tabs">Tabs</a></li>
|
||||
<li><a href="#twipsy">Twipsy</a></li>
|
||||
<li><a href="#popover">Popover</a></li>
|
||||
@ -195,7 +197,6 @@ $('#my-modal').bind('hidden', function () {
|
||||
</div>
|
||||
|
||||
<button data-controls-modal="modal-from-dom" data-backdrop="true" data-keyboard="true" class="btn danger">Launch Modal</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@ -313,6 +314,56 @@ $('#my-modal').bind('hidden', function () {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Buttons
|
||||
================================================== -->
|
||||
|
||||
<section id="buttons">
|
||||
<div class="page-header">
|
||||
<h1>Buttons <small>bootstrap-buttons.js</small></h1>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="span4 columns">
|
||||
<p>This plugin offers additional functionality for managing button state.</p>
|
||||
<a href="../js/bootstrap-buttons.js" target="_blank" class="btn primary">Download</a>
|
||||
</div>
|
||||
<div class="span12 columns">
|
||||
<h3>Using bootstrap-buttons.js</h3>
|
||||
<pre class="prettyprint linenums">$('.tabs').button()</pre>
|
||||
<h3>Methods</h3>
|
||||
<h4>$().button('toggle')</h4>
|
||||
<p>Toggles push state. Gives btn the look that it's been activated.</p>
|
||||
<p><span class="label notice">Notice</span> You can enable auto toggling of a button by using the <code>data-toggle</code> attribute.</p>
|
||||
<pre class="prettyprint linenums"><button class="btn" data-toggle="toggle" >...</button></pre>
|
||||
<h4>$().button('loading')</h4>
|
||||
<p>Sets button state to loading - disables button and swaps text to loading text. Loading text should be defined on the button element using the data attribute <code>data-loading-text</code>.
|
||||
</p>
|
||||
<pre class="prettyprint linenums"><button class="btn" data-loading-text="loading stuff..." >...</button></pre>
|
||||
<h4>$().button('reset')</h4>
|
||||
<p>Resets button state - swaps text to original text.</p>
|
||||
<h4>$().button(string)</h4>
|
||||
<p>Resets button state - swaps text to any data defined text state.</p>
|
||||
<pre class="prettyprint linenums"><button class="btn" data-complete-text="finished!" >...</button>
|
||||
<script>
|
||||
$('.btn').button('complete')
|
||||
</scrip></pre>
|
||||
<h3>Demo</h3>
|
||||
<button id="fat-btn" data-loading-text="foo" class="btn danger">Loading Demo</button>
|
||||
<button class="btn" data-toggle="toggle">Toggle Demo</button>
|
||||
<script>
|
||||
$(function() {
|
||||
var btn = $('#fat-btn').click(function () {
|
||||
btn.button('loading')
|
||||
setTimeout(function () {
|
||||
btn.button('reset')
|
||||
}, 3000)
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<!-- Tabs
|
||||
================================================== -->
|
||||
|
||||
@ -384,20 +435,33 @@ $('#.tabs').bind('change', function (e) {
|
||||
<li><a href="#profile">Profile</a></li>
|
||||
<li><a href="#messages">Messages</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>
|
||||
<div id="my-tab-content" class="tab-content">
|
||||
<div class="active" id="home">
|
||||
<div class="active tab-pane" id="home">
|
||||
<p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p>
|
||||
</div>
|
||||
<div id="profile">
|
||||
<div class="tab-pane" id="profile">
|
||||
<p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p>
|
||||
</div>
|
||||
<div id="messages">
|
||||
<div class="tab-pane" id="messages">
|
||||
<p>Banksy do proident, brooklyn photo booth delectus sunt artisan sed organic exercitation eiusmod four loko. Quis tattooed iphone esse aliqua. Master cleanse vero fixie mcsweeney's. Ethical portland aute, irony food truck pitchfork lomo eu anim. Aesthetic blog DIY, ethical beard leggings tofu consequat whatever cardigan nostrud. Helvetica you probably haven't heard of them carles, marfa veniam occaecat lomo before they sold out in shoreditch scenester sustainable thundercats. Consectetur tofu craft beer, mollit brunch fap echo park pitchfork mustache dolor.</p>
|
||||
</div>
|
||||
<div id="settings">
|
||||
<div class="tab-pane" 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>
|
||||
</div>
|
||||
<div class="tab-pane" 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 class="tab-pane" 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>
|
||||
@ -489,8 +553,16 @@ $('#.tabs').bind('change', function (e) {
|
||||
<td>'hover'</td>
|
||||
<td>how tooltip is triggered - hover | focus | manual</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>template</td>
|
||||
<td>string</td>
|
||||
<td>[default markup]</td>
|
||||
<td>The html template used for rendering a twipsy.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><span class="label notice">Notice</span> Individual twipsy instance options can alternatively be specified through the use of data attributes.</code></p>
|
||||
<pre class="prettyprint linenums"><a href="#" data-placement="below" rel='twipsy' title='Some title text'>text</a></pre>
|
||||
<h3>Methods</h3>
|
||||
<h4>$().twipsy(options)</h4>
|
||||
<p>Attaches a twipsy handler to an element collection.</p>
|
||||
@ -605,7 +677,7 @@ $('#.tabs').bind('change', function (e) {
|
||||
<td>content</td>
|
||||
<td>string, function</td>
|
||||
<td>'data-content'</td>
|
||||
<td>attribute or method for retrieving content text</td>
|
||||
<td>a string or method for retrieving content text. if none are provided, content will be sourced from a data-content attribute.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>trigger</td>
|
||||
@ -613,8 +685,16 @@ $('#.tabs').bind('change', function (e) {
|
||||
<td>'hover'</td>
|
||||
<td>how tooltip is triggered - hover | focus | manual</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>template</td>
|
||||
<td>string</td>
|
||||
<td>[default markup]</td>
|
||||
<td>The html template used for rendering a popover.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><span class="label notice">Notice</span> Individual popover instance options can alternatively be specified through the use of data attributes.</code></p>
|
||||
<pre class="prettyprint linenums"><a data-placement="below" href="#" class="btn danger" rel="popover">text</a></pre>
|
||||
<h3>Methods</h3>
|
||||
<h4>$().popover(options)</h4>
|
||||
<p>Initializes popovers for an element collection.</p>
|
||||
@ -625,7 +705,7 @@ $('#.tabs').bind('change', function (e) {
|
||||
<p>Hides an elements popover.</p>
|
||||
<pre class="prettyprint linenums">$('#element').popover('hide')</pre>
|
||||
<h3>Demo</h3>
|
||||
<a href="#" class="btn danger" rel="popover" title="A Title" data-content="And here's some amazing content. It's very engaging. right?">hover for popover</a>
|
||||
<a href="#" class="btn danger" rel="popover" title="A title" data-content="And here's some amazing content. It's very engaging. right?">hover for popover</a>
|
||||
<script>
|
||||
$(function () {
|
||||
$("a[rel=popover]")
|
||||
@ -659,6 +739,26 @@ $('#.tabs').bind('change', function (e) {
|
||||
<pre class="prettyprint linenums">$(".alert-message").alert()</pre>
|
||||
<h3>Markup</h3>
|
||||
<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>
|
||||
<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>
|
||||
|
@ -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 »</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 »</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 »</a></p>
|
||||
|
17
js/bootstrap-alerts.js
vendored
17
js/bootstrap-alerts.js
vendored
@ -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 );
|
62
js/bootstrap-buttons.js
vendored
Normal file
62
js/bootstrap-buttons.js
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
/* ============================================================
|
||||
* 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 );
|
2
js/bootstrap-dropdown.js
vendored
2
js/bootstrap-dropdown.js
vendored
@ -20,6 +20,8 @@
|
||||
|
||||
!function( $ ){
|
||||
|
||||
"use strict"
|
||||
|
||||
/* DROPDOWN PLUGIN DEFINITION
|
||||
* ========================== */
|
||||
|
||||
|
58
js/bootstrap-modal.js
vendored
58
js/bootstrap-modal.js
vendored
@ -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 ) {
|
||||
|
15
js/bootstrap-popover.js
vendored
15
js/bootstrap-popover.js
vendored
@ -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 );
|
2
js/bootstrap-scrollspy.js
vendored
2
js/bootstrap-scrollspy.js
vendored
@ -20,6 +20,8 @@
|
||||
|
||||
!function ( $ ) {
|
||||
|
||||
"use strict"
|
||||
|
||||
var $window = $(window)
|
||||
|
||||
function ScrollSpy( topbar, selector ) {
|
||||
|
22
js/bootstrap-tabs.js
vendored
22
js/bootstrap-tabs.js
vendored
@ -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)
|
||||
|
25
js/bootstrap-twipsy.js
vendored
25
js/bootstrap-twipsy.js
vendored
@ -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 );
|
@ -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>
|
||||
|
42
js/tests/unit/bootstrap-buttons.js
vendored
Normal file
42
js/tests/unit/bootstrap-buttons.js
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
$(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')
|
||||
})
|
||||
|
||||
})
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user