Merge branch '2.0.2-wip' of github.com:twitter/bootstrap into 2.0.2-wip

Conflicts:
	docs/assets/bootstrap.zip
This commit is contained in:
Mark Otto 2012-03-10 11:23:47 -08:00
commit c414e57dcc
18 changed files with 49 additions and 31 deletions

View File

@ -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
.PHONY: docs watch gh-pages

Binary file not shown.

View File

@ -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)
}

View File

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<title>Base · Bootstrap</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">

11
docs/build/index.js vendored
View File

@ -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, {

View File

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<title>Components · Bootstrap</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">

View File

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<title>Download · Bootstrap</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">

View File

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<title>Examples · Bootstrap</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
@ -95,7 +95,7 @@
<img src="assets/img/examples/bootstrap-example-fluid.jpg" alt="">
</a>
<h3>Fluid layout</h3>
<p>Uses our new responsive, fluid grid system to create seamless liquid layout.</p>
<p>Uses our new responsive, fluid grid system to create a seamless liquid layout.</p>
</li>
<li class="span4">
<a class="thumbnail" href="examples/starter-template.html">

View File

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<title>Bootstrap</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">

View File

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<title>Javascript · Bootstrap</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">

View File

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<title>Less · Bootstrap</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
@ -717,8 +717,8 @@
<div class="row">
<div class="span4">
<h3>Node with makefile</h3>
<p>Install the LESS command line compiler globally with npm by running the following command:</p>
<pre>$ npm install -g less</pre>
<p>Install the LESS command line compiler and uglify-js globally with npm by running the following command:</p>
<pre>$ npm install -g less uglify-js</pre>
<p>Once installed just run <code>make</code> from the root of your bootstrap directory and you're all set.</p>
<p>Additionally, if you have <a href="https://github.com/mynyml/watchr">watchr</a> installed, you may run <code>make watch</code> to have bootstrap automatically rebuilt every time you edit a file in the bootstrap lib (this isn't required, just a convenience method).</p>
</div><!-- /span4 -->

View File

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<title>Scaffolding · Bootstrap</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">

View File

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<title>{{title}}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">

View File

@ -19,7 +19,7 @@
<img src="assets/img/examples/bootstrap-example-fluid.jpg" alt="">
</a>
<h3>{{_i}}Fluid layout{{/i}}</h3>
<p>{{_i}}Uses our new responsive, fluid grid system to create seamless liquid layout.{{/i}}</p>
<p>{{_i}}Uses our new responsive, fluid grid system to create a seamless liquid layout.{{/i}}</p>
</li>
<li class="span4">
<a class="thumbnail" href="examples/starter-template.html">

View File

@ -641,8 +641,8 @@
<div class="row">
<div class="span4">
<h3>{{_i}}Node with makefile{{/i}}</h3>
<p>{{_i}}Install the LESS command line compiler globally with npm by running the following command:{{/i}}</p>
<pre>$ npm install -g less</pre>
<p>{{_i}}Install the LESS command line compiler and uglify-js globally with npm by running the following command:{{/i}}</p>
<pre>$ npm install -g less uglify-js</pre>
<p>{{_i}}Once installed just run <code>make</code> from the root of your bootstrap directory and you're all set.{{/i}}</p>
<p>{{_i}}Additionally, if you have <a href="https://github.com/mynyml/watchr">watchr</a> installed, you may run <code>make watch</code> to have bootstrap automatically rebuilt every time you edit a file in the bootstrap lib (this isn't required, just a convenience method).{{/i}}</p>
</div><!-- /span4 -->

View File

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<title>Upgrading · Bootstrap</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">

View File

@ -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)
}

View File

@ -114,14 +114,18 @@ $(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()
})