From: Jacob Thornton Date: Tue, 24 Jul 2012 07:24:25 +0000 (-0700) Subject: Merge branch '2.1.0-wip' of https://github.com/twitter/bootstrap into 2.1.0-wip X-Git-Tag: v2.1.0~2^2~141^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5b2f2ed82181c651626b541aee6963f74bf8be31;p=thirdparty%2Fbootstrap.git Merge branch '2.1.0-wip' of https://github.com/twitter/bootstrap into 2.1.0-wip Conflicts: docs/assets/css/docs.css docs/javascript.html docs/templates/pages/javascript.mustache --- 5b2f2ed82181c651626b541aee6963f74bf8be31 diff --cc docs/assets/css/docs.css index 4f55f268a6,fa487e001a..ff7d48ae4f --- a/docs/assets/css/docs.css +++ b/docs/assets/css/docs.css @@@ -947,20 -950,43 +952,51 @@@ form.bs-docs-example margin-top: 30px; margin-right: 0; } +} +@media (min-width: 768px) and (max-width: 979px) { + .bs-docs-sidenav { + width: 166px; + } } +@media (max-width: 767px) { + .bs-docs-sidenav { + width: auto; + } + .bs-docs-sidenav.affix { + position: relative; + width: auto; + } +} + + @media (min-width: 979px) { + .masthead, + .subhead { + position: fixed; + top: 40px; + right: 0; + left: 0; + } + .masthead { + height: 380px; + } + .subhead { + height: 130px; /* +80px pdding */ + } + .bs-docs-canvas { + position: absolute; + width: 100%; + z-index: 10; + background-color: #fff; + -webkit-box-shadow: 0 -5px 15px rgba(0,0,0,.15); + -moz-box-shadow: 0 -5px 15px rgba(0,0,0,.15); + box-shadow: 0 -5px 15px rgba(0,0,0,.15); + } + .masthead + .bs-docs-canvas { + top: 530px; + } + .subhead + .bs-docs-canvas { + top: 250px; + } -} - -@media (max-width: 767px) { - .bs-docs-sidenav.affix { - position: relative; - } -} ++} diff --cc docs/javascript.html index e0d5495184,d34c9c94dd..5baa5eb263 --- a/docs/javascript.html +++ b/docs/javascript.html @@@ -78,141 -78,125 +78,126 @@@ -
- - - -
- -
- + +
- -
- +
-

Individual or compiled

-

If you have downloaded the latest version of Bootstrap, both bootstrap.js and bootstrap.min.js contain all of the plugins listed on this page.

+ +
+ +
-

Data attributes

-

You can use all Bootstrap plugins purely through the markup API without writing a single line of JavaScript. This is Bootstrap's first class API and should be your first consideration when using a plugin.

-

That said, in some situations it may be desirable to turn this functionality off. Therefore, we also provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this: + +

+ -
-   $('body').off('.data-api')
- 
+

Individual or compiled

+

If you have downloaded the latest version of Bootstrap, both bootstrap.js and bootstrap.min.js contain all of the plugins listed on this page.

-

Alternatively, to target a specific plugin, just include the plugins name as a namespace along with the data-api namespace like this:

+

Data attributes

+

You can use all Bootstrap plugins purely through the markup API without writing a single line of JavaScript. This is Bootstrap's first class API and should be your first consideration when using a plugin.

-
-   $('body').off('.alert.data-api')
- 
+

That said, in some situations it may be desirable to turn this functionality off. Therefore, we also provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this: +

$('body').off('.data-api')
-

Programmatic API

-

We also believe you should be able to use all Bootstrap plugins purely through the JavaScript API. All public APIs are single, chainable methods, and return the collection acted upon.

+

Alternatively, to target a specific plugin, just include the plugins name as a namespace along with the data-api namespace like this:

+
$('body').off('.alert.data-api')
+

Programmatic API

+

We also believe you should be able to use all Bootstrap plugins purely through the JavaScript API. All public APIs are single, chainable methods, and return the collection acted upon.

+
$(".btn.danger").button("toggle").addClass("fat")
+

All methods should accept an optional options object, a string which targets a particular method, or nothing (which initiates a plugin with default behavior):

-   $(".btn.danger").button("toggle").addClass("fat")
+ $("#myModal").modal()                       // initialized with defaults
+ $("#myModal").modal({ keyboard: false })   // initialized with no keyboard
+ $("#myModal").modal('show')                // initializes and invokes show immediately

+

Each plugin also exposes it's raw constructor on a `Constructor` property: $.fn.popover.Constructor. If you'd like to get a particular plugin instance, retrieve it directly from an element: $('[rel=popover]').data('popover').

-

All methods should accept an optional options object, a string which targets a particular method, or nothing (which initiates a plugin with default behavior):

- +

Events

+

Bootstrap provides custom events for most plugin's unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. show) is triggered at the start of an event, and it's past participle form (ex. shown) is trigger on the completion of an action.

+

All infinitive events provide preventDefault functionality. This provides the abililty to stop the execution of an action before it starts.

-   $("#myModal").modal()                       // initialized with defaults
-   $("#myModal").modal({ keyboard: false })   // initialized with no keyboard
-   $("#myModal").modal('show')                // initializes and invokes show immediately

-
- -

Each plugin also exposes it's raw constructor on a `Constructor` property: $.fn.popover.Constructor. If you'd like to get a particular plugin instance, retrieve it directly from an element: $('[rel=popover]').data('popover').

- - -

Events

-

Bootstrap provides custom events for most plugin's unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. show) is triggered at the start of an event, and it's past participle form (ex. shown) is trigger on the completion of an action.

- -

All infinitive events provide preventDefault functionality. This provides the abililty to stop the execution of an action before it starts.

- -
-   $('#myModal').on('show', function (e) {
-       if (!data) return e.preventDefault() // stops modal from being shown
-   })
+ $('#myModal').on('show', function (e) {
+     if (!data) return e.preventDefault() // stops modal from being shown
+ })
  
+
-
+ +
+ +

About transitions

+

For simple transition effects, include bootstrap-transition.js once alongside the other JS files. If you're using the compiled (or minified) bootstrap.js, there is no need to include this—it's already there.

+

Use cases

+

A few examples of the transition plugin:

+
    +
  • Sliding or fading in modals
  • +
  • Fading out tabs
  • +
  • Fading out alerts
  • +
  • Sliding carousel panes
  • +
- -
- -

About transitions

-

For simple transition effects, include bootstrap-transition.js once alongside the other JS files. If you're using the compiled (or minified) bootstrap.js, there is no need to include this—it's already there.

-

Use cases

-

A few examples of the transition plugin:

-
    -
  • Sliding or fading in modals
  • -
  • Fading out tabs
  • -
  • Fading out alerts
  • -
  • Sliding carousel panes
  • -
+
-
+ +
+ - -
- +

Examples

+

Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.

-

Examples

-

Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.

- -

Static example

-

A rendered modal with header, body, and set of actions in the footer.

-
-
  <div class="modal hide fade">
    <div class="modal-header">
diff --cc docs/templates/pages/javascript.mustache
index 906fbc4c6c,dc1e0293bc..771b7d9acc
--- a/docs/templates/pages/javascript.mustache
+++ b/docs/templates/pages/javascript.mustache
@@@ -7,142 -7,126 +7,126 @@@
    
-
- - - -
- -
- - - - -
- - -

{{_i}}Individual or compiled{{/i}}

-

{{_i}}If you have downloaded the latest version of Bootstrap, both bootstrap.js and bootstrap.min.js contain all of the plugins listed on this page.{{/i}}

+
-

{{_i}}Data attributes{{/i}}

-

{{_i}}You can use all Bootstrap plugins purely through the markup API without writing a single line of JavaScript. This is Bootstrap's first class API and should be your first consideration when using a plugin.{{/i}}

+
-

{{_i}}That said, in some situations it may be desirable to turn this functionality off. Therefore, we also provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this:{{/i}} + +

+ +
-
-   $('body').off('.data-api')
- 
-

{{_i}}Alternatively, to target a specific plugin, just include the plugins name as a namespace along with the data-api namespace like this:{{/i}}

+ +
+ -
-   $('body').off('.alert.data-api')
- 
+

{{_i}}Individual or compiled{{/i}}

+

{{_i}}If you have downloaded the latest version of Bootstrap, both bootstrap.js and bootstrap.min.js contain all of the plugins listed on this page.{{/i}}

-

{{_i}}Programmatic API{{/i}}

-

{{_i}}We also believe you should be able to use all Bootstrap plugins purely through the JavaScript API. All public APIs are single, chainable methods, and return the collection acted upon.{{/i}}

+

{{_i}}Data attributes{{/i}}

+

{{_i}}You can use all Bootstrap plugins purely through the markup API without writing a single line of JavaScript. This is Bootstrap's first class API and should be your first consideration when using a plugin.{{/i}}

-
-   $(".btn.danger").button("toggle").addClass("fat")
- 
+

{{_i}}That said, in some situations it may be desirable to turn this functionality off. Therefore, we also provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this:{{/i}} +

$('body').off('.data-api')
-

{{_i}}All methods should accept an optional options object, a string which targets a particular method, or nothing (which initiates a plugin with default behavior):{{/i}}

+

{{_i}}Alternatively, to target a specific plugin, just include the plugins name as a namespace along with the data-api namespace like this:{{/i}}

+
$('body').off('.alert.data-api')
+

{{_i}}Programmatic API{{/i}}

+

{{_i}}We also believe you should be able to use all Bootstrap plugins purely through the JavaScript API. All public APIs are single, chainable methods, and return the collection acted upon.{{/i}}

+
$(".btn.danger").button("toggle").addClass("fat")
+

{{_i}}All methods should accept an optional options object, a string which targets a particular method, or nothing (which initiates a plugin with default behavior):{{/i}}

-   $("#myModal").modal()                       // initialized with defaults
-   $("#myModal").modal({ keyboard: false })   // initialized with no keyboard
-   $("#myModal").modal('show')                // initializes and invokes show immediately

+ $("#myModal").modal() // initialized with defaults + $("#myModal").modal({ keyboard: false }) // initialized with no keyboard + $("#myModal").modal('show') // initializes and invokes show immediately

+

{{_i}}Each plugin also exposes it's raw constructor on a `Constructor` property: $.fn.popover.Constructor. If you'd like to get a particular plugin instance, retrieve it directly from an element: $('[rel=popover]').data('popover').{{/i}}

-

{{_i}}Each plugin also exposes it's raw constructor on a `Constructor` property: $.fn.popover.Constructor. If you'd like to get a particular plugin instance, retrieve it directly from an element: $('[rel=popover]').data('popover').{{/i}}

- - -

{{_i}}Events{{/i}}

-

{{_i}}Bootstrap provides custom events for most plugin's unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. show) is triggered at the start of an event, and it's past participle form (ex. shown) is trigger on the completion of an action.{{/i}}

- -

{{_i}}All infinitive events provide preventDefault functionality. This provides the abililty to stop the execution of an action before it starts.{{/i}}

- +

{{_i}}Events{{/i}}

+

{{_i}}Bootstrap provides custom events for most plugin's unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. show) is triggered at the start of an event, and it's past participle form (ex. shown) is trigger on the completion of an action.{{/i}}

+

{{_i}}All infinitive events provide preventDefault functionality. This provides the abililty to stop the execution of an action before it starts.{{/i}}

-   $('#myModal').on('show', function (e) {
-       if (!data) return e.preventDefault() // stops modal from being shown
-   })
+ $('#myModal').on('show', function (e) {
+     if (!data) return e.preventDefault() // stops modal from being shown
+ })
  
+
-
+ +
+ +

{{_i}}About transitions{{/i}}

+

{{_i}}For simple transition effects, include bootstrap-transition.js once alongside the other JS files. If you're using the compiled (or minified) bootstrap.js, there is no need to include this—it's already there.{{/i}}

+

{{_i}}Use cases{{/i}}

+

{{_i}}A few examples of the transition plugin:{{/i}}

+
    +
  • {{_i}}Sliding or fading in modals{{/i}}
  • +
  • {{_i}}Fading out tabs{{/i}}
  • +
  • {{_i}}Fading out alerts{{/i}}
  • +
  • {{_i}}Sliding carousel panes{{/i}}
  • +
- -
- -

{{_i}}About transitions{{/i}}

-

{{_i}}For simple transition effects, include bootstrap-transition.js once alongside the other JS files. If you're using the compiled (or minified) bootstrap.js, there is no need to include this—it's already there.{{/i}}

-

{{_i}}Use cases{{/i}}

-

{{_i}}A few examples of the transition plugin:{{/i}}

-
    -
  • {{_i}}Sliding or fading in modals{{/i}}
  • -
  • {{_i}}Fading out tabs{{/i}}
  • -
  • {{_i}}Fading out alerts{{/i}}
  • -
  • {{_i}}Sliding carousel panes{{/i}}
  • -
+ {{! Ideas: include docs for .fade.in, .slide.in, etc }} +
- {{! Ideas: include docs for .fade.in, .slide.in, etc }} -
+ +
+ - -
- +

{{_i}}Examples{{/i}}

+

{{_i}}Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.{{/i}}

-

{{_i}}Examples{{/i}}

-

{{_i}}Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.{{/i}}

- -

{{_i}}Static example{{/i}}

-

{{_i}}A rendered modal with header, body, and set of actions in the footer.{{/i}}

-
- -
{{! /example }} +

{{_i}}Static example{{/i}}

+

{{_i}}A rendered modal with header, body, and set of actions in the footer.{{/i}}

+
+ +
{{! /example }}
  <div class="modal hide fade">
    <div class="modal-header">