diff --git a/Makefile b/Makefile index 0aea234c..b20b7067 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ build: @cp -r fonts docs/assets/ @cp js/tests/vendor/jquery.js docs/assets/js/ @echo "Compiling documentation... ${CHECK} Done" - @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 > docs/assets/js/bootstrap.js + @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 js/bootstrap-inputmask.js > docs/assets/js/bootstrap.js @uglifyjs -nc docs/assets/js/bootstrap.js > docs/assets/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*/" > docs/assets/js/copyright.js @cat docs/assets/js/copyright.js docs/assets/js/bootstrap.min.tmp.js > docs/assets/js/bootstrap.min.js @@ -69,7 +69,7 @@ bootstrap: recess --compress ${BOOTSTRAP_LESS} ${JASNY_BOOTSTRAP_LESS} > bootstrap/css/bootstrap.min.css recess --compile ${BOOTSTRAP_RESPONSIVE_LESS} ${JASNY_BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.css recess --compress ${BOOTSTRAP_RESPONSIVE_LESS} ${JASNY_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 + 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 js/bootstrap-inputmask.js > bootstrap/js/bootstrap.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 @@ -84,12 +84,13 @@ jasny-bootstrap: mkdir -p jasny-bootstrap/css mkdir -p jasny-bootstrap/js mkdir -p jasny-bootstrap/fonts + cp js/bootstrap-inputmask.js jasny-bootstrap/js cp fonts/* jasny-bootstrap/fonts/ recess --compile ${JASNY_BOOTSTRAP_LESS} > jasny-bootstrap/css/jasny-bootstrap.css recess --compress ${JASNY_BOOTSTRAP_LESS} > jasny-bootstrap/css/jasny-bootstrap.min.css recess --compile ${JASNY_BOOTSTRAP_RESPONSIVE_LESS} > jasny-bootstrap/css/jasny-bootstrap-responsive.css recess --compress ${JASNY_BOOTSTRAP_RESPONSIVE_LESS} > jasny-bootstrap/css/jasny-bootstrap-responsive.min.css - cat /dev/null > jasny-bootstrap/js/jasny-bootstrap.js + cat js/bootstrap-inputmask.js > jasny-bootstrap/js/jasny-bootstrap.js uglifyjs -nc jasny-bootstrap/js/jasny-bootstrap.js > jasny-bootstrap/js/jasny-bootstrap.min.tmp.js echo "/*!\n* Jasny-Bootstrap.js by @ArnoldDaniels\n* Copyright 2012 Jasny BV.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > jasny-bootstrap/js/copyright.js cat jasny-bootstrap/js/copyright.js jasny-bootstrap/js/jasny-bootstrap.min.tmp.js > jasny-bootstrap/js/jasny-bootstrap.min.js diff --git a/docs/templates/layout.mustache b/docs/templates/layout.mustache index 011870ba..90e3ad49 100644 --- a/docs/templates/layout.mustache +++ b/docs/templates/layout.mustache @@ -121,6 +121,7 @@ + diff --git a/docs/templates/pages/index.mustache b/docs/templates/pages/index.mustache index 158ba2b6..eaddcf54 100644 --- a/docs/templates/pages/index.mustache +++ b/docs/templates/pages/index.mustache @@ -56,6 +56,11 @@

{{_i}}Sometimes a button will pull to much attention to an action. In those cases, you can use action links instead.{{/i}}

{{_i}}Action links look distinctly different than normal links.{{/i}}

+
+

{{_i}}Input mask{{/i}}

+

{{_i}}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}}

+
diff --git a/docs/templates/pages/javascript.mustache b/docs/templates/pages/javascript.mustache index 6f7e11c3..eb686d7d 100644 --- a/docs/templates/pages/javascript.mustache +++ b/docs/templates/pages/javascript.mustache @@ -2,7 +2,7 @@ ================================================== -->

{{_i}}Javascript for Bootstrap{{/i}}

-

{{_i}}Bring Bootstrap's components to life—now with 12 custom jQuery plugins.{{/i}} +

{{_i}}Bring Bootstrap's components to life—now with 13 custom jQuery plugins.{{/i}}

-
+

{{_i}}Collapse{{/i}}

{{_i}}Get base styles and flexible support for collapsible components like accordions and navigation.{{/i}}

@@ -93,6 +94,12 @@

Typeahead

{{_i}}A basic, easily extended plugin for quickly creating elegant typeaheads with any form text input.{{/i}}

+
+

{{_i}}Input mask{{/i}}

+

{{_i}}Make sure the user types in the data that you want, by using an input mask.{{/i}}

+
+
+

{{_i}}Transitions{{/i}} *

{{_i}}For simple transition effects, include bootstrap-transition.js once to slide in modals or fade out alerts.{{/i}}

@@ -1417,4 +1424,76 @@ $('.carousel').carousel({

{{_i}}Initializes an input with a typeahead.{{/i}}

+ + + + + +
+ +
+
+

{{_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}}Example{{/i}}

+
+ +
+
+ +

{{_i}}Using bootstrap-inputmask.js{{/i}}

+

{{_i}}Call the input mask via javascript:{{/i}}

+
$('.inputmask').inputmask()
+

{{_i}}Options{{/i}}

+ + + + + + + + + + + + + + + + + + + + + + + +
{{_i}}Name{{/i}}{{_i}}type{{/i}}{{_i}}default{{/i}}{{_i}}description{{/i}}
{{_i}}mask{{/i}}{{_i}}string{{/i}}''{{_i}}A string of formatting and literal characters, defining the input mask (see below).{{/i}}
{{_i}}placeholder{{/i}}{{_i}}string{{/i}}'_'{{_i}}The character that is displayed where something needs to be typed.{{/i}}
+ +

{{_i}}Format{{/i}}

+ + + + + + +
{{_i}}Character{{/i}}{{_i}}Description{{/i}}
9{{_i}}Number{{/i}}
a{{_i}}Letter{{/i}}
?{{_i}}Alphanumeric{{/i}}
*{{_i}}Any character{{/i}}
+ +

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

+

{{_i}}Add data attributes to register an element with an input mask.{{/i}}

+
+<input type="text" data-mask="999-99-999-9999-9">
+
+ +

{{_i}}Methods{{/i}}

+

.inputmask({{_i}}options{{/i}})

+

{{_i}}Initializes an input with an input mask.{{/i}}

+
+
\ No newline at end of file diff --git a/js/bootstrap-inputmask.js b/js/bootstrap-inputmask.js index fff06336..438074b6 100644 --- a/js/bootstrap-inputmask.js +++ b/js/bootstrap-inputmask.js @@ -3,7 +3,7 @@ * http://twitter.github.com/bootstrap/javascript.html#tooltips * Based on Masked Input plugin by Josh Bush (digitalbush.com) * =========================================================== - * Copyright 2012 Twitter, Inc. + * Copyright 2012 Jasny BV, Netherlands. * * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License.