mirror of
https://github.com/jasny/bootstrap.git
synced 2026-04-24 03:00:49 -04:00
Documented inputmask javascript plugin
Added bootstrap-inputmask.js to Makefile
This commit is contained in:
1
docs/templates/layout.mustache
vendored
1
docs/templates/layout.mustache
vendored
@@ -124,6 +124,7 @@
|
||||
<script src="assets/js/bootstrap-carousel.js"></script>
|
||||
<script src="assets/js/bootstrap-typeahead.js"></script>
|
||||
<script src="assets/js/bootstrap-affix.js"></script>
|
||||
<script src="assets/js/bootstrap-inputmask.js"></script>
|
||||
<script src="assets/js/application.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
5
docs/templates/pages/index.mustache
vendored
5
docs/templates/pages/index.mustache
vendored
@@ -48,6 +48,11 @@
|
||||
<p>{{_i}}Sometimes a button will pull to much attention to an action. In those cases, you can use action links instead.{{/i}}</p>
|
||||
<p>{{_i}}Action links look distinctly different than normal links.{{/i}}</p>
|
||||
</div>
|
||||
<div class="span3">
|
||||
<h3><a href="./javascript.html#inputmask">{{_i}}Input mask{{/i}}</a></h3>
|
||||
<p>{{_i}}Force the user to enter data conform a specific format.{{/i}}</p>
|
||||
<p>{{_i}}Unlike validation, the user can't enter any other key than the ones specified by the mask.{{/i}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="span3">
|
||||
|
||||
77
docs/templates/pages/javascript.mustache
vendored
77
docs/templates/pages/javascript.mustache
vendored
@@ -28,6 +28,7 @@
|
||||
<li><a href="#collapse"><i class="icon-chevron-right"></i> {{_i}}Collapse{{/i}}</a></li>
|
||||
<li><a href="#carousel"><i class="icon-chevron-right"></i> {{_i}}Carousel{{/i}}</a></li>
|
||||
<li><a href="#typeahead"><i class="icon-chevron-right"></i> {{_i}}Typeahead{{/i}}</a></li>
|
||||
<li><a href="#inputmask"><i class="icon-chevron-right"></i> {{_i}}Input mask{{/i}}</a></li>
|
||||
<li><a href="#affix"><i class="icon-chevron-right"></i> {{_i}}Affix{{/i}}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -1520,6 +1521,82 @@ $('.carousel').carousel({
|
||||
|
||||
|
||||
|
||||
<!-- Input mask
|
||||
================================================== -->
|
||||
<section id="inputmask">
|
||||
<div class="page-header">
|
||||
<h1>{{_i}}Input mask{{/i}} <small>bootstrap-inputmask.js</small></h1>
|
||||
</div>
|
||||
|
||||
<h2>{{_i}}Example{{/i}}</h2>
|
||||
<p>{{_i}}Input masks can be used to force the user to enter data conform a specific format.{{/i}}</p>
|
||||
<p>{{_i}}Unlike validation, the user can't enter any other key than the ones specified by the mask.{{/i}}</p>
|
||||
<div class="bs-docs-example">
|
||||
<label>ISBN <input type="text" class="span2" data-mask="999-99-999-9999-9"></label>
|
||||
</div>
|
||||
<pre class="prettyprint linenums">
|
||||
<input type="text" data-mask="999-99-999-9999-9">
|
||||
</pre>
|
||||
|
||||
|
||||
<hr class="bs-docs-separator">
|
||||
|
||||
|
||||
<h2>{{_i}}Usage{{/i}}</h2>
|
||||
|
||||
<h3>{{_i}}Via data attributes{{/i}}</h3>
|
||||
<p>{{_i}}Add data attributes to register an element with inputmask functionality as shown in the example above.{{/i}}</p>
|
||||
|
||||
<h3>{{_i}}Via JavaScript{{/i}}</h3>
|
||||
<p>{{_i}}Call the input mask via javascript:{{/i}}</p>
|
||||
<pre class="prettyprint linenums">$('.inputmask').inputmask()</pre>
|
||||
|
||||
<h3>{{_i}}Options{{/i}}</h3>
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 100px;">{{_i}}Name{{/i}}</th>
|
||||
<th style="width: 50px;">{{_i}}type{{/i}}</th>
|
||||
<th style="width: 100px;">{{_i}}default{{/i}}</th>
|
||||
<th>{{_i}}description{{/i}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{_i}}mask{{/i}}</td>
|
||||
<td>{{_i}}string{{/i}}</td>
|
||||
<td>''</td>
|
||||
<td>{{_i}}A string of formatting and literal characters, defining the input mask (see below).{{/i}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{_i}}placeholder{{/i}}</td>
|
||||
<td>{{_i}}string{{/i}}</td>
|
||||
<td>'_'</td>
|
||||
<td>{{_i}}The character that is displayed where something needs to be typed.{{/i}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3>{{_i}}Format{{/i}}</h3>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr><th>{{_i}}Character{{/i}}</th><th>{{_i}}Description{{/i}}</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td>9</td><td>{{_i}}Number{{/i}}</td></tr>
|
||||
<tr><td>a</td><td>{{_i}}Letter{{/i}}</td></tr>
|
||||
<tr><td>?</td><td>{{_i}}Alphanumeric{{/i}}</td></tr>
|
||||
<tr><td>*</td><td>{{_i}}Any character{{/i}}</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3>{{_i}}Methods{{/i}}</h3>
|
||||
<h4>.inputmask({{_i}}options{{/i}})</h4>
|
||||
<p>{{_i}}Initializes an input with an input mask.{{/i}}</p>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<!-- Affix
|
||||
================================================== -->
|
||||
<section id="affix">
|
||||
|
||||
Reference in New Issue
Block a user