diff --git a/docs/assets/js/bootstrap-fileupload.js b/docs/assets/js/bootstrap-fileupload.js index af29a7a7..17cbc3ca 100644 --- a/docs/assets/js/bootstrap-fileupload.js +++ b/docs/assets/js/bootstrap-fileupload.js @@ -1,5 +1,5 @@ /* =========================================================== - * bootstrap-fileupload.js j1 + * bootstrap-fileupload.js j1a * http://jasny.github.com/bootstrap/javascript.html#fileupload * =========================================================== * Copyright 2012 Jasny BV, Netherlands. @@ -56,7 +56,7 @@ }, change: function(e, invoked) { - var file = e.target.files[0] + var file = e.target.files !== undefined ? e.target.files[0] : { name: e.target.value.replace(/^.+\\/, '') } if (!file || invoked === 'clear') return this.$hidden.val('') @@ -75,7 +75,7 @@ reader.readAsDataURL(file) } else { - this.$preview.html(window.escape(file.name)) + this.$preview.text(file.name) this.$element.addClass('fileupload-exists').removeClass('fileupload-new') } }, @@ -118,6 +118,8 @@ var $this = $(this) if ($this.data('fileupload')) return $this.fileupload($this.data()) + + if ($(e.target).data('dismiss') == 'fileupload') $(e.target).trigger('click.fileupload') }) }) diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index 320dce10..cf2559ad 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -2254,7 +2254,7 @@ }(window.jQuery) /* =========================================================== - * bootstrap-fileupload.js j1 + * bootstrap-fileupload.js j1a * http://jasny.github.com/bootstrap/javascript.html#fileupload * =========================================================== * Copyright 2012 Jasny BV, Netherlands. @@ -2311,7 +2311,7 @@ }, change: function(e, invoked) { - var file = e.target.files[0] + var file = e.target.files !== undefined ? e.target.files[0] : { name: e.target.value.replace(/^.+\\/, '') } if (!file || invoked === 'clear') return this.$hidden.val('') @@ -2330,7 +2330,7 @@ reader.readAsDataURL(file) } else { - this.$preview.html(window.escape(file.name)) + this.$preview.text(file.name) this.$element.addClass('fileupload-exists').removeClass('fileupload-new') } }, @@ -2373,6 +2373,8 @@ var $this = $(this) if ($this.data('fileupload')) return $this.fileupload($this.data()) + + if ($(e.target).data('dismiss') == 'fileupload') $(e.target).trigger('click.fileupload') }) }) diff --git a/docs/assets/js/bootstrap.min.js b/docs/assets/js/bootstrap.min.js index 5be69a5e..e190c265 100644 --- a/docs/assets/js/bootstrap.min.js +++ b/docs/assets/js/bootstrap.min.js @@ -3,4 +3,4 @@ * Copyright 2012 Twitter, Inc. * http://www.apache.org/licenses/LICENSE-2.0.txt */ -!function(e){e(function(){"use strict";e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()},e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e(function(){e("body").on("click.alert.data-api",t,n.prototype.close)})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.parent('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")},e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e(function(){e("body").on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=n,this.options.slide&&this.slide(this.options.slide),this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},to:function(t){var n=this.$element.find(".active"),r=n.parent().children(),i=r.index(n),s=this;if(t>r.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){s.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",e(r[t]))},pause:function(e){return e||(this.paused=!0),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f=e.Event("slide");this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u]();if(i.hasClass("active"))return;if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}},e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n);i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):typeof n=="string"||(n=s.slide)?i[n]():s.interval&&i.cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e(function(){e("body").on("click.carousel.data-api","[data-slide]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=!i.data("modal")&&e.extend({},i.data(),n.data());i.carousel(s),t.preventDefault()})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning)return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning)return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=typeof n=="object"&&n;i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e(function(){e("body").on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();e(i).collapse(s)})})}(window.jQuery),!function(e){"use strict";function r(){e(t).parent().removeClass("open")}var t='[data-toggle="dropdown"]',n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),i,s,o;if(n.is(".disabled, :disabled"))return;return s=n.attr("data-target"),s||(s=n.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,"")),i=e(s),i.length||(i=n.parent()),o=i.hasClass("open"),r(),o||i.toggleClass("open"),!1}},e.fn.dropdown=function(t){return this.each(function(){var r=e(this),i=r.data("dropdown");i||r.data("dropdown",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.dropdown.Constructor=n,e(function(){e("html").on("click.dropdown.data-api",r),e("body").on("click.dropdown",".dropdown form",function(e){e.stopPropagation()}).on("click.dropdown.data-api",t,n.prototype.toggle)})}(window.jQuery),!function(e){"use strict";function n(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),r.call(t)},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),r.call(t)})}function r(e){this.$element.hide().trigger("hidden"),i.call(this)}function i(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('
-

Iconic icons

+

Iconic icons

The iconic font set adds 170 new icons to Bootstrap. These icons can be used with buttons, menus, links, etc.

Because these icons are a font, they can be styled just like text.

diff --git a/docs/javascript.html b/docs/javascript.html index 0055cea4..54e9fa2d 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -1448,6 +1448,7 @@ $('.carousel').carousel({

About

This plugin turns a table row into a clickable link.

Download file +

* Requires the Jasny extended CSS to be included.

Example

@@ -1590,13 +1591,14 @@ $('.carousel').carousel({ ================================================== -->

About

Input masks can be used to force the user to enter data conform a specific format.

Unlike validation, the user can't enter any other key than the ones specified by the mask.

+ Download file

Example

@@ -1670,6 +1672,7 @@ $('.carousel').carousel({

About

The file upload plugin allows you to create a visually appealing file or image upload widgets.

Download file +

* Requires the Jasny extended CSS to be included.

diff --git a/docs/templates/pages/index.mustache b/docs/templates/pages/index.mustache index 956eb536..f71ba111 100644 --- a/docs/templates/pages/index.mustache +++ b/docs/templates/pages/index.mustache @@ -9,8 +9,8 @@

Simple and flexible HTML, CSS, and Javascript for popular user interface components and interactions.

{{_i}}View project on GitHub{{/i}} - {{_i}}Download Bootstrap (v2.0.4-j1)
Includes all Jasny extensions{{/i}}
- {{_i}}Extend Bootstrap (j1)
Download extensions only{{/i}}
+ {{_i}}Download Bootstrap (v2.0.4-j1a)
Includes all Jasny extensions{{/i}}
+ {{_i}}Extend Bootstrap (j1a)
Download extensions only{{/i}}

@@ -74,7 +74,7 @@
-

{{_i}}Iconic icons{{/i}}

+

{{_i}}Iconic icons{{/i}}

{{_i}}The iconic font set adds 170 new icons to Bootstrap. These icons can be used with buttons, menus, links, etc.{{/i}}

{{_i}}Because these icons are a font, they can be styled just like text.{{/i}}

diff --git a/docs/templates/pages/javascript.mustache b/docs/templates/pages/javascript.mustache index 0fa6837c..7af42a65 100644 --- a/docs/templates/pages/javascript.mustache +++ b/docs/templates/pages/javascript.mustache @@ -1373,6 +1373,7 @@ $('.carousel').carousel({

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

{{_i}}This plugin turns a table row into a clickable link.{{/i}}

{{_i}}Download file{{/i}} +

* {{_i}}Requires the Jasny extended CSS to be included.{{/i}}

{{_i}}Example{{/i}}

@@ -1515,13 +1516,14 @@ $('.carousel').carousel({ ================================================== -->

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

{{_i}}Input masks can be used to force the user to enter data conform a specific format.{{/i}}

{{_i}}Unlike validation, the user can't enter any other key than the ones specified by the mask.{{/i}}

+ {{_i}}Download file{{/i}}

{{_i}}Example{{/i}}

@@ -1595,6 +1597,7 @@ $('.carousel').carousel({

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

{{_i}}The file upload plugin allows you to create a visually appealing file or image upload widgets.{{/i}}

{{_i}}Download file{{/i}} +

* {{_i}}Requires the Jasny extended CSS to be included.{{/i}}

diff --git a/js/bootstrap-fileupload.js b/js/bootstrap-fileupload.js index af29a7a7..17cbc3ca 100644 --- a/js/bootstrap-fileupload.js +++ b/js/bootstrap-fileupload.js @@ -1,5 +1,5 @@ /* =========================================================== - * bootstrap-fileupload.js j1 + * bootstrap-fileupload.js j1a * http://jasny.github.com/bootstrap/javascript.html#fileupload * =========================================================== * Copyright 2012 Jasny BV, Netherlands. @@ -56,7 +56,7 @@ }, change: function(e, invoked) { - var file = e.target.files[0] + var file = e.target.files !== undefined ? e.target.files[0] : { name: e.target.value.replace(/^.+\\/, '') } if (!file || invoked === 'clear') return this.$hidden.val('') @@ -75,7 +75,7 @@ reader.readAsDataURL(file) } else { - this.$preview.html(window.escape(file.name)) + this.$preview.text(file.name) this.$element.addClass('fileupload-exists').removeClass('fileupload-new') } }, @@ -118,6 +118,8 @@ var $this = $(this) if ($this.data('fileupload')) return $this.fileupload($this.data()) + + if ($(e.target).data('dismiss') == 'fileupload') $(e.target).trigger('click.fileupload') }) })