From c8c4d5b3925b033723a3f589db9c579b37ca5ceb Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Mon, 6 Feb 2012 00:17:31 -0800 Subject: fix alert tests + add show option back to modals --- docs/assets/bootstrap.zip | Bin 52355 -> 52400 bytes docs/assets/js/bootstrap-modal.js | 7 ++++--- docs/javascript.html | 6 ++++++ docs/templates/pages/javascript.mustache | 6 ++++++ 4 files changed, 16 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/assets/bootstrap.zip b/docs/assets/bootstrap.zip index 57c5130347..e5a1d8b427 100644 Binary files a/docs/assets/bootstrap.zip and b/docs/assets/bootstrap.zip differ diff --git a/docs/assets/js/bootstrap-modal.js b/docs/assets/js/bootstrap-modal.js index ba64368b2d..180f0b64d9 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 2cfe2b9b76..7960a29e39 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -273,6 +273,12 @@ true Closes the modal when escape key is pressed + + show + boolean + true + Shows the modal when initialized. +

Markup

diff --git a/docs/templates/pages/javascript.mustache b/docs/templates/pages/javascript.mustache index 111de2350c..57cb4eac42 100644 --- a/docs/templates/pages/javascript.mustache +++ b/docs/templates/pages/javascript.mustache @@ -197,6 +197,12 @@ {{_i}}true{{/i}} {{_i}}Closes the modal when escape key is pressed{{/i}} + + {{_i}}show{{/i}} + {{_i}}boolean{{/i}} + {{_i}}true{{/i}} + {{_i}}Shows the modal when initialized.{{/i}} +

{{_i}}Markup{{/i}}

-- cgit v1.2.3