diff --git a/Makefile b/Makefile index 923c0ced34..92afa1578e 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,10 @@ bootstrap: lessc ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.css lessc --compress ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.min.css cat js/bootstrap-transition.js js/bootstrap-alert.js js/bootstrap-button.js js/bootstrap-carousel.js js/bootstrap-collapse.js js/bootstrap-dropdown.js js/bootstrap-modal.js js/bootstrap-tooltip.js js/bootstrap-popover.js js/bootstrap-scrollspy.js js/bootstrap-tab.js js/bootstrap-typeahead.js > bootstrap/js/bootstrap.js - uglifyjs -nc bootstrap/js/bootstrap.js > bootstrap/js/bootstrap.min.js + uglifyjs -nc bootstrap/js/bootstrap.js > bootstrap/js/bootstrap.min.tmp.js + echo "/**\n* Bootstrap.js by @fat & @mdo\n* Copyright 2012 Twitter, Inc.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > bootstrap/js/copyright.js + cat bootstrap/js/copyright.js bootstrap/js/bootstrap.min.tmp.js > bootstrap/js/bootstrap.min.js + rm bootstrap/js/copyright.js bootstrap/js/bootstrap.min.tmp.js # # MAKE FOR GH-PAGES 4 FAT & MDO ONLY (O_O ) @@ -56,4 +59,4 @@ watch: watchr -e "watch('less/.*\.less') { system 'make' }" -.PHONY: dist docs watch gh-pages \ No newline at end of file +.PHONY: docs watch gh-pages \ No newline at end of file diff --git a/docs/assets/bootstrap.zip b/docs/assets/bootstrap.zip index b317f29364..b87f619929 100644 Binary files a/docs/assets/bootstrap.zip and b/docs/assets/bootstrap.zip differ diff --git a/docs/assets/js/bootstrap-typeahead.js b/docs/assets/js/bootstrap-typeahead.js index 5031559507..99f84f7961 100644 --- a/docs/assets/js/bootstrap-typeahead.js +++ b/docs/assets/js/bootstrap-typeahead.js @@ -40,6 +40,7 @@ , select: function () { var val = this.$menu.find('.active').attr('data-value') this.$element.val(val) + this.$element.change(); return this.hide() } @@ -165,9 +166,6 @@ } , keyup: function (e) { - e.stopPropagation() - e.preventDefault() - switch(e.keyCode) { case 40: // down arrow case 38: // up arrow @@ -180,6 +178,7 @@ break case 27: // escape + if (!this.shown) return this.hide() break @@ -187,10 +186,11 @@ this.lookup() } + e.stopPropagation() + e.preventDefault() } , keypress: function (e) { - e.stopPropagation() if (!this.shown) return switch(e.keyCode) { @@ -210,12 +210,12 @@ this.next() break } + + e.stopPropagation() } , blur: function (e) { var that = this - e.stopPropagation() - e.preventDefault() setTimeout(function () { that.hide() }, 150) } diff --git a/docs/base-css.html b/docs/base-css.html index 0f720d2cf4..7274324360 100644 --- a/docs/base-css.html +++ b/docs/base-css.html @@ -2,7 +2,7 @@ - Bootstrap, from Twitter + Base · Bootstrap diff --git a/docs/build/index.js b/docs/build/index.js index 5321fa7504..1a9cb387c7 100644 --- a/docs/build/index.js +++ b/docs/build/index.js @@ -2,6 +2,7 @@ var hogan = require('hogan.js') , fs = require('fs') , prod = process.argv[2] == 'production' + , title = 'Bootstrap' var layout, pages @@ -23,6 +24,16 @@ pages.forEach(function (name) { context[name.replace(/\.mustache$/, '')] = 'active' context._i = true context.production = prod + context.title = name + .replace(/\.mustache/, '') + .replace(/\-.*/, '') + .replace(/(.)/, function ($1) { return $1.toUpperCase() }) + + if (context.title == 'Index') { + context.title = title + } else { + context.title += ' · ' + title + } page = hogan.compile(page, { sectionTags: [{o:'_i', c:'i'}] }) page = layout.render(context, { diff --git a/docs/components.html b/docs/components.html index b4071a5a72..a3a389c98f 100644 --- a/docs/components.html +++ b/docs/components.html @@ -2,7 +2,7 @@ - Bootstrap, from Twitter + Components · Bootstrap diff --git a/docs/download.html b/docs/download.html index 04b1e6bb6c..209123cfef 100644 --- a/docs/download.html +++ b/docs/download.html @@ -2,7 +2,7 @@ - Bootstrap, from Twitter + Download · Bootstrap diff --git a/docs/examples.html b/docs/examples.html index 76eb4b59a9..faab19ef6c 100644 --- a/docs/examples.html +++ b/docs/examples.html @@ -2,7 +2,7 @@ - Bootstrap, from Twitter + Examples · Bootstrap @@ -95,7 +95,7 @@

Fluid layout

-

Uses our new responsive, fluid grid system to create seamless liquid layout.

+

Uses our new responsive, fluid grid system to create a seamless liquid layout.

  • diff --git a/docs/index.html b/docs/index.html index 4ecd5c12f3..5041b8043b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2,7 +2,7 @@ - Bootstrap, from Twitter + Bootstrap diff --git a/docs/javascript.html b/docs/javascript.html index 800f0ca7ab..49d54db885 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -2,7 +2,7 @@ - Bootstrap, from Twitter + Javascript · Bootstrap diff --git a/docs/less.html b/docs/less.html index 97847cc9d4..5b8ad6f2d8 100644 --- a/docs/less.html +++ b/docs/less.html @@ -2,7 +2,7 @@ - Bootstrap, from Twitter + Less · Bootstrap @@ -717,8 +717,8 @@
    diff --git a/docs/scaffolding.html b/docs/scaffolding.html index 07932f5493..fce44222f0 100644 --- a/docs/scaffolding.html +++ b/docs/scaffolding.html @@ -2,7 +2,7 @@ - Bootstrap, from Twitter + Scaffolding · Bootstrap diff --git a/docs/templates/layout.mustache b/docs/templates/layout.mustache index 832983e16a..1f976e4c4a 100644 --- a/docs/templates/layout.mustache +++ b/docs/templates/layout.mustache @@ -2,7 +2,7 @@ - Bootstrap, from Twitter + {{title}} diff --git a/docs/templates/pages/examples.mustache b/docs/templates/pages/examples.mustache index 485fbc5701..dee7d5651d 100644 --- a/docs/templates/pages/examples.mustache +++ b/docs/templates/pages/examples.mustache @@ -19,7 +19,7 @@

    {{_i}}Fluid layout{{/i}}

    -

    {{_i}}Uses our new responsive, fluid grid system to create seamless liquid layout.{{/i}}

    +

    {{_i}}Uses our new responsive, fluid grid system to create a seamless liquid layout.{{/i}}

  • diff --git a/docs/templates/pages/less.mustache b/docs/templates/pages/less.mustache index 742b166d27..744861dea0 100644 --- a/docs/templates/pages/less.mustache +++ b/docs/templates/pages/less.mustache @@ -641,8 +641,8 @@
    diff --git a/docs/upgrading.html b/docs/upgrading.html index f56f22545e..e96e89c404 100644 --- a/docs/upgrading.html +++ b/docs/upgrading.html @@ -2,7 +2,7 @@ - Bootstrap, from Twitter + Upgrading · Bootstrap diff --git a/js/bootstrap-typeahead.js b/js/bootstrap-typeahead.js index 5031559507..99f84f7961 100644 --- a/js/bootstrap-typeahead.js +++ b/js/bootstrap-typeahead.js @@ -40,6 +40,7 @@ , select: function () { var val = this.$menu.find('.active').attr('data-value') this.$element.val(val) + this.$element.change(); return this.hide() } @@ -165,9 +166,6 @@ } , keyup: function (e) { - e.stopPropagation() - e.preventDefault() - switch(e.keyCode) { case 40: // down arrow case 38: // up arrow @@ -180,6 +178,7 @@ break case 27: // escape + if (!this.shown) return this.hide() break @@ -187,10 +186,11 @@ this.lookup() } + e.stopPropagation() + e.preventDefault() } , keypress: function (e) { - e.stopPropagation() if (!this.shown) return switch(e.keyCode) { @@ -210,12 +210,12 @@ this.next() break } + + e.stopPropagation() } , blur: function (e) { var that = this - e.stopPropagation() - e.preventDefault() setTimeout(function () { that.hide() }, 150) } diff --git a/js/tests/unit/bootstrap-typeahead.js b/js/tests/unit/bootstrap-typeahead.js index 455ed415b7..96ea7c45fc 100644 --- a/js/tests/unit/bootstrap-typeahead.js +++ b/js/tests/unit/bootstrap-typeahead.js @@ -114,15 +114,19 @@ $(function () { source: ['aa', 'ab', 'ac'] }) , typeahead = $input.data('typeahead') + , changed = false $input.val('a') typeahead.lookup() + $input.change(function() { changed = true }); + $(typeahead.$menu.find('li')[2]).mouseover().click() equals($input.val(), 'ac', 'input value was correctly set') ok(!typeahead.$menu.is(':visible'), 'the menu was hidden') + ok(changed, 'a change event was fired') typeahead.$menu.remove() }) -}) \ No newline at end of file +})