r2369 - /branches/dev/mask: updated to demos index and demos mask index to match demos format
Author: rdworth
Date: Mon Mar 23 16:14:37 2009
New Revision: 2369
Added:
branches/dev/mask/demos/mask/index.html (contents, props changed)
Modified:
branches/dev/mask/demos/mask/default.html (contents, props changed)
branches/dev/mask/demos/mask/digitalbush.html (contents, props changed)
branches/dev/mask/demos/mask/jquery.maskedinput.js (contents, props
changed)
Log:
/branches/dev/mask: updated to demos index and demos mask index to match
demos format
Modified: branches/dev/mask/demos/mask/default.html
==============================================================================
--- branches/dev/mask/demos/mask/default.html (original)
+++ branches/dev/mask/demos/mask/default.html Mon Mar 23 16:14:37 2009
@@ -1,117 +1,117 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
- <title>jQuery UI Mask Plugin Demo</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-
- <link type="text/css" href="../../themes/base/ui.all.css"
rel="stylesheet" />
- <link type="text/css" href="../demos.css" rel="stylesheet" />
-
- <script type="text/javascript" src="../../jquery-1.3.2.js"></script>
- <script type="text/javascript" src="../../ui/ui.core.js"></script>
- <script type="text/javascript" src="../../ui/ui.mask.js"></script>
-
- <script type="text/javascript">
-
- $(document).ready(function(){
-
- $.ui.mask.definitions['~'] = "[+-]";
- //$.ui.mask.defaults.allowPartials = true; //used to allowPartials on
all instances of mask() on the page.
-
- $("#date")
- .mask({mask: "##/##/####"})
- .change(function() { alert("changed!")}); ;
- $("#phone").mask({mask: "(###) ###-####"});
- $("#phoneExt").mask({mask: "(###) ###-#### x#####"});
- $("#iphone").mask({mask: "+33 ### ### ###"});
- $("#tin").mask({mask: "##-#######"});
- $("#ssn").mask({mask: "###-##-####", allowPartials: true});
- $("#product").mask({mask: "a*-###-a###", placeholder: " " });
- $("#eyescript").mask({mask: "~#.## ~#.## ###"});
- $("#po").mask({mask: "PO: aaa-###-***"});
- $("#pct").mask({mask: "##%"});
-
- $("input")
- .bind('blur.mask', function() { $("#info").html("Unmasked value: " +
$(this).mask('value') + '<br/>' + "Masked Value: " +
$(this).mask('formatted')); })
- .bind('dblclick.mask', function() { $(this).mask('value'); });
-
- $("#phone").mask('destroy');
-
- $('#_ButtonChange').click(function(){
- $("#ssn").val('123456').mask('apply');
- });
-
- $('#_ViewTest').mask({mask: '(###) ###-####'});
-
- });
-
- </script>
-
- <style type="text/css">
- div.test { background: #7994AB; color:#FFFFFF; padding: 10px; }
- </style>
-
-</head>
-<body>
- <table>
- <tr>
- <td>Date</td>
- <td><input id="date" value="1231" type="text" tabindex="1" /></td>
- <td>##/##/####</td>
- </tr>
- <tr>
- <td>Phone</td>
- <td><input id="phone" type="text" tabindex="2"/></td>
- <td>(###) ###-####</td>
- </tr>
- <tr>
- <td>Phone + Ext</td>
- <td><input id="phoneExt" type="text" tabindex="2"/></td>
- <td>(###) ###-#### x#####</td>
- </tr>
- <tr>
- <td>Int'l Phone</td>
- <td><input id="iphone" type="text" tabindex="2"/></td>
- <td>+33 (###) ###-####</td>
- </tr>
- <tr>
- <td>Tax ID</td>
- <td><input id="tin" type="text" tabindex="3"/></td>
- <td>##-#######</td>
- </tr>
- <tr>
- <td>SSN<br/>( Allows partial Input ) </td>
- <td><input id="ssn" type="text" tabindex="4"/></td>
- <td>###-##-####</td>
- <td><button type="button" id="_ButtonChange">Change Ssn
Value</button></td>
- </tr>
- <tr>
- <td>Product Key</td>
- <td><input id="product" type="text" tabindex="5"/></td>
- <td>a*-###-a###</td></tr>
- <tr>
- <td>Eye Script</td>
- <td><input id="eyescript" type="text" tabindex="6"/></td>
- <td>~#.## ~#.## ###</td>
- </tr>
- <tr>
- <td>Purchase Order</td>
- <td><input id="po" type="text" tabindex="6"/></td>
- <td>PO: aaa-###-***</td>
- </tr>
- <tr><td>Percent</td>
- <td><input id="pct" type="text" tabindex="6"/></td>
- <td>##%</td>
- </tr>
- <tr>
- <td>Non-Input Element</td>
- <td colspan="3">
- <div class="test" id="_ViewTest">2485551212</div>
- </td>
- </tr>
- </table>
- <div id="info"></div>
-
-
-</body>
-</html>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>jQuery UI Mask Plugin Demo</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+
+ <link type="text/css" href="../../themes/base/ui.all.css"
rel="stylesheet" />
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+
+ <script type="text/javascript" src="../../jquery-1.3.2.js"></script>
+ <script type="text/javascript" src="../../ui/ui.core.js"></script>
+ <script type="text/javascript" src="../../ui/ui.mask.js"></script>
+
+ <script type="text/javascript">
+
+ $(document).ready(function(){
+
+ $.ui.mask.definitions['~'] = "[+-]";
+ //$.ui.mask.defaults.allowPartials = true; //used to allowPartials on
all instances of mask() on the page.
+
+ $("#date")
+ .mask({mask: "##/##/####"})
+ .change(function() { alert("changed!")}); ;
+ $("#phone").mask({mask: "(###) ###-####"});
+ $("#phoneExt").mask({mask: "(###) ###-#### x#####"});
+ $("#iphone").mask({mask: "+33 ### ### ###"});
+ $("#tin").mask({mask: "##-#######"});
+ $("#ssn").mask({mask: "###-##-####", allowPartials: true});
+ $("#product").mask({mask: "a*-###-a###", placeholder: " " });
+ $("#eyescript").mask({mask: "~#.## ~#.## ###"});
+ $("#po").mask({mask: "PO: aaa-###-***"});
+ $("#pct").mask({mask: "##%"});
+
+ $("input")
+ .bind('blur.mask', function() { $("#info").html("Unmasked value: " +
$(this).mask('value') + '<br/>' + "Masked Value: " +
$(this).mask('formatted')); })
+ .bind('dblclick.mask', function() { $(this).mask('value'); });
+
+ $("#phone").mask('destroy');
+
+ $('#_ButtonChange').click(function(){
+ $("#ssn").val('123456').mask('apply');
+ });
+
+ $('#_ViewTest').mask({mask: '(###) ###-####'});
+
+ });
+
+ </script>
+
+ <style type="text/css">
+ div.test { background: #7994AB; color:#FFFFFF; padding: 10px; }
+ </style>
+
+</head>
+<body>
+ <table>
+ <tr>
+ <td>Date</td>
+ <td><input id="date" value="1231" type="text" tabindex="1" /></td>
+ <td>##/##/####</td>
+ </tr>
+ <tr>
+ <td>Phone</td>
+ <td><input id="phone" type="text" tabindex="2"/></td>
+ <td>(###) ###-####</td>
+ </tr>
+ <tr>
+ <td>Phone + Ext</td>
+ <td><input id="phoneExt" type="text" tabindex="2"/></td>
+ <td>(###) ###-#### x#####</td>
+ </tr>
+ <tr>
+ <td>Int'l Phone</td>
+ <td><input id="iphone" type="text" tabindex="2"/></td>
+ <td>+33 (###) ###-####</td>
+ </tr>
+ <tr>
+ <td>Tax ID</td>
+ <td><input id="tin" type="text" tabindex="3"/></td>
+ <td>##-#######</td>
+ </tr>
+ <tr>
+ <td>SSN<br/>( Allows partial Input ) </td>
+ <td><input id="ssn" type="text" tabindex="4"/></td>
+ <td>###-##-####</td>
+ <td><button type="button" id="_ButtonChange">Change Ssn
Value</button></td>
+ </tr>
+ <tr>
+ <td>Product Key</td>
+ <td><input id="product" type="text" tabindex="5"/></td>
+ <td>a*-###-a###</td></tr>
+ <tr>
+ <td>Eye Script</td>
+ <td><input id="eyescript" type="text" tabindex="6"/></td>
+ <td>~#.## ~#.## ###</td>
+ </tr>
+ <tr>
+ <td>Purchase Order</td>
+ <td><input id="po" type="text" tabindex="6"/></td>
+ <td>PO: aaa-###-***</td>
+ </tr>
+ <tr><td>Percent</td>
+ <td><input id="pct" type="text" tabindex="6"/></td>
+ <td>##%</td>
+ </tr>
+ <tr>
+ <td>Non-Input Element</td>
+ <td colspan="3">
+ <div class="test" id="_ViewTest">2485551212</div>
+ </td>
+ </tr>
+ </table>
+ <div id="info"></div>
+
+
+</body>
+</html>
Modified: branches/dev/mask/demos/mask/digitalbush.html
==============================================================================
--- branches/dev/mask/demos/mask/digitalbush.html (original)
+++ branches/dev/mask/demos/mask/digitalbush.html Mon Mar 23 16:14:37 2009
@@ -1,44 +1,44 @@
-<html>
-<head>
-<title> jQuery Mask Test </title>
-<script type="text/javascript" src="../../jquery-1.3.2.js"></script>
-<script src="jquery.maskedinput.js" type="text/javascript"></script>
-<script type="text/javascript">
- $(function() {
- $.mask.definitions['~'] = "[+-]";
- $("#date").mask("99/99/9999").change(function() {
alert("changed!")}); ;
- $("#phone").mask("(999) 999-9999");
- $("#phoneExt").mask("(999) 999-9999? x99999");
- $("#iphone").mask("+33 999 999 999");
- $("#tin").mask("99-9999999");
- $("#ssn").mask("999-99-9999");
- $("#product").mask("a*-999-a999", { position: " " });
- $("#eyescript").mask("~9.99 ~9.99 999");
- $("#po").mask("PO: aaa-999-***");
- $("#pct").mask("99%");
-
- $("input").blur(function() {
- $("#info").html("Unmasked value: " + $(this).mask());
- }).dblclick(function() {
- $(this).unmask();
- });
- });
-
-</script>
-</head>
-<body>
-<table>
- <tr><td>Date</td><td><input id="date" value="1231" type="text"
tabindex="1" /></td><td>99/99/9999</td></tr>
- <tr><td>Phone</td><td><input id="phone" type="text"
tabindex="2"/></td><td>(999) 999-9999</td></tr>
- <tr><td>Phone + Ext</td><td><input id="phoneExt" type="text"
tabindex="2"/></td><td>(999) 999-9999? x99999</td></tr>
- <tr><td>Int'l Phone</td><td><input id="iphone" type="text"
tabindex="2"/></td><td>+44 (999) 999-9999</td></tr>
- <tr><td>Tax ID</td><td><input id="tin" type="text"
tabindex="3"/></td><td>99-9999999</td></tr>
- <tr><td>SSN</td><td><input id="ssn" type="text"
tabindex="4"/></td><td>999-99-9999</td></tr>
- <tr><td>Product Key</td><td><input id="product" type="text"
tabindex="5"/></td><td>a*-999-a999</td></tr>
- <tr><td>Eye Script</td><td><input id="eyescript" type="text"
tabindex="6"/></td><td>~9.99 ~9.99 999</td></tr>
- <tr><td>Purchase Order</td><td><input id="po" type="text"
tabindex="6"/></td><td>aaa-999-***</td></tr>
- <tr><td>Percent</td><td><input id="pct" type="text"
tabindex="6"/></td><td>99%</td></tr>
-</table>
-<div id="info"></div>
-</body>
-</html>
+<html>
+<head>
+<title> jQuery Mask Test </title>
+<script type="text/javascript" src="../../jquery-1.3.2.js"></script>
+<script src="jquery.maskedinput.js" type="text/javascript"></script>
+<script type="text/javascript">
+ $(function() {
+ $.mask.definitions['~'] = "[+-]";
+ $("#date").mask("99/99/9999").change(function() {
alert("changed!")}); ;
+ $("#phone").mask("(999) 999-9999");
+ $("#phoneExt").mask("(999) 999-9999? x99999");
+ $("#iphone").mask("+33 999 999 999");
+ $("#tin").mask("99-9999999");
+ $("#ssn").mask("999-99-9999");
+ $("#product").mask("a*-999-a999", { position: " " });
+ $("#eyescript").mask("~9.99 ~9.99 999");
+ $("#po").mask("PO: aaa-999-***");
+ $("#pct").mask("99%");
+
+ $("input").blur(function() {
+ $("#info").html("Unmasked value: " + $(this).mask());
+ }).dblclick(function() {
+ $(this).unmask();
+ });
+ });
+
+</script>
+</head>
+<body>
+<table>
+ <tr><td>Date</td><td><input id="date" value="1231" type="text"
tabindex="1" /></td><td>99/99/9999</td></tr>
+ <tr><td>Phone</td><td><input id="phone" type="text"
tabindex="2"/></td><td>(999) 999-9999</td></tr>
+ <tr><td>Phone + Ext</td><td><input id="phoneExt" type="text"
tabindex="2"/></td><td>(999) 999-9999? x99999</td></tr>
+ <tr><td>Int'l Phone</td><td><input id="iphone" type="text"
tabindex="2"/></td><td>+44 (999) 999-9999</td></tr>
+ <tr><td>Tax ID</td><td><input id="tin" type="text"
tabindex="3"/></td><td>99-9999999</td></tr>
+ <tr><td>SSN</td><td><input id="ssn" type="text"
tabindex="4"/></td><td>999-99-9999</td></tr>
+ <tr><td>Product Key</td><td><input id="product" type="text"
tabindex="5"/></td><td>a*-999-a999</td></tr>
+ <tr><td>Eye Script</td><td><input id="eyescript" type="text"
tabindex="6"/></td><td>~9.99 ~9.99 999</td></tr>
+ <tr><td>Purchase Order</td><td><input id="po" type="text"
tabindex="6"/></td><td>aaa-999-***</td></tr>
+ <tr><td>Percent</td><td><input id="pct" type="text"
tabindex="6"/></td><td>99%</td></tr>
+</table>
+<div id="info"></div>
+</body>
+</html>
Added: branches/dev/mask/demos/mask/index.html
==============================================================================
--- (empty file)
+++ branches/dev/mask/demos/mask/index.html Mon Mar 23 16:14:37 2009
@@ -0,0 +1,15 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>jQuery UI Mask Demos</title>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+</head>
+<body>
+ <div class="demos-nav">
+ <h4>Examples</h4>
+ <ul>
+ <li class="demo-config-on"><a href="default.html">Default
functionality</a></li>
+ </ul>
+ </div>
+</body>
+</html>
Modified: branches/dev/mask/demos/mask/jquery.maskedinput.js
==============================================================================
--- branches/dev/mask/demos/mask/jquery.maskedinput.js (original)
+++ branches/dev/mask/demos/mask/jquery.maskedinput.js Mon Mar 23 16:14:37
2009
@@ -1,252 +1,252 @@
-/// <reference path="../../../lib/jquery-1.2.6.js" />
-/*
- Masked Input plugin for jQuery
- Copyright (c) 2007-@year Josh Bush (digitalbush.com)
- Licensed under the MIT license
(http://digitalbush.com/projects/masked-input-plugin/#license)
- Version: @version
-*/
-(function($) {
- var pasteEventName = ($.browser.msie ? 'paste' : 'input') + ".mask";
- var iPhone = (window.orientation != undefined);
-
- $.mask = {
- //Predefined character definitions
- definitions: {
- '9': "[0-9]",
- 'a': "[A-Za-z]",
- '*': "[A-Za-z0-9]"
- }
- };
-
- $.fn.extend({
- //Helper Function for Caret positioning
- caret: function(begin, end) {
- if (this.length == 0) return;
- if (typeof begin == 'number') {
- end = (typeof end == 'number') ? end : begin;
- return this.each(function() {
- if (this.setSelectionRange) {
- this.focus();
- this.setSelectionRange(begin, end);
- } else if (this.createTextRange) {
- var range = this.createTextRange();
- range.collapse(true);
- range.moveEnd('character', end);
- range.moveStart('character', begin);
- range.select();
- }
- });
- } else {
- if (this[0].setSelectionRange) {
- begin = this[0].selectionStart;
- end = this[0].selectionEnd;
- } else if (document.selection && document.selection.createRange) {
- var range = document.selection.createRange();
- begin = 0 - range.duplicate().moveStart('character', -100000);
- end = begin + range.text.length;
- }
- return { begin: begin, end: end };
- }
- },
- unmask: func