aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2012-02-06 23:36:31 -0800
committerMark Otto <[email protected]>2012-02-06 23:36:31 -0800
commit4ed1b13719083fb9bb7ab7273cc9bf84482992cc (patch)
treefd67d1ffb5e9edfc549b5d21e389a9729e4f00ba /docs
parent575b82473f8d248ca3782fa86ce1c92eea03905c (diff)
parent3722bb9a88e95b37ded12cb40a67ac396ce140fd (diff)
downloadbootstrap-4ed1b13719083fb9bb7ab7273cc9bf84482992cc.tar.xz
bootstrap-4ed1b13719083fb9bb7ab7273cc9bf84482992cc.zip
Merge branch 'raphaelz-patch-1' into 2.0.1-wip
Conflicts: docs/assets/bootstrap.zip
Diffstat (limited to 'docs')
-rw-r--r--docs/assets/bootstrap.zipbin52518 -> 52563 bytes
-rw-r--r--docs/assets/js/bootstrap-modal.js7
-rw-r--r--docs/javascript.html6
-rw-r--r--docs/templates/pages/javascript.mustache6
4 files changed, 16 insertions, 3 deletions
diff --git a/docs/assets/bootstrap.zip b/docs/assets/bootstrap.zip
index c474e5f0c..04562df6f 100644
--- a/docs/assets/bootstrap.zip
+++ b/docs/assets/bootstrap.zip
Binary files differ
diff --git a/docs/assets/js/bootstrap-modal.js b/docs/assets/js/bootstrap-modal.js
index ba64368b2..180f0b64d 100644
--- a/docs/assets/js/bootstrap-modal.js
+++ b/docs/assets/js/bootstrap-modal.js
@@ -26,7 +26,7 @@
* ====================== */
var Modal = function ( content, options ) {
- this.options = $.extend({}, $.fn.modal.defaults, options)
+ this.options = options
this.$element = $(content)
.delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
}
@@ -177,16 +177,17 @@
return this.each(function () {
var $this = $(this)
, data = $this.data('modal')
- , options = typeof option == 'object' && option
+ , options = $.extend({}, $.fn.modal.defaults, typeof option == 'object' && option)
if (!data) $this.data('modal', (data = new Modal(this, options)))
if (typeof option == 'string') data[option]()
- else data.show()
+ else if (options.show) data.show()
})
}
$.fn.modal.defaults = {
backdrop: true
, keyboard: true
+ , show: true
}
$.fn.modal.Constructor = Modal
diff --git a/docs/javascript.html b/docs/javascript.html
index b6abe80ea..02467051d 100644
--- a/docs/javascript.html
+++ b/docs/javascript.html
@@ -273,6 +273,12 @@
<td>true</td>
<td>Closes the modal when escape key is pressed</td>
</tr>
+ <tr>
+ <td>show</td>
+ <td>boolean</td>
+ <td>true</td>
+ <td>Shows the modal when initialized.</td>
+ </tr>
</tbody>
</table>
<h3>Markup</h3>
diff --git a/docs/templates/pages/javascript.mustache b/docs/templates/pages/javascript.mustache
index 006461290..965819036 100644
--- a/docs/templates/pages/javascript.mustache
+++ b/docs/templates/pages/javascript.mustache
@@ -197,6 +197,12 @@
<td>{{_i}}true{{/i}}</td>
<td>{{_i}}Closes the modal when escape key is pressed{{/i}}</td>
</tr>
+ <tr>
+ <td>{{_i}}show{{/i}}</td>
+ <td>{{_i}}boolean{{/i}}</td>
+ <td>{{_i}}true{{/i}}</td>
+ <td>{{_i}}Shows the modal when initialized.{{/i}}</td>
+ </tr>
</tbody>
</table>
<h3>{{_i}}Markup{{/i}}</h3>