r2388 - Added button to remove mask, instead of automatically removing it.

r2388 - Added button to remove mask, instead of automatically removing it.


Author: powella
Date: Fri Mar 27 07:55:21 2009
New Revision: 2388
Modified:
branches/dev/mask/demos/mask/default.html
Log:
Added button to remove mask, instead of automatically removing it.
Added initial markup for testing inline character classes.
Modified: branches/dev/mask/demos/mask/default.html
==============================================================================
--- branches/dev/mask/demos/mask/default.html    (original)
+++ branches/dev/mask/demos/mask/default.html    Fri Mar 27 07:55:21 2009
@@ -8,7 +8,7 @@
    <script type="text/javascript" src="../../ui/ui.mask.js"></script>
    <link type="text/css" href="../demos.css" rel="stylesheet" />
    <script type="text/javascript">
-    $(function() {
+    $(document).ready(function(){
        
        $.ui.mask.definitions['~'] = "[+-]";
        //$.ui.mask.defaults.allowPartials = true; //used to allowPartials on
all instances of mask() on the page.
@@ -25,17 +25,20 @@
        $("#eyescript").mask({mask: "~#.## ~#.## ###"});
        $("#po").mask({mask: "PO: aaa-###-***"});
        $("#pct").mask({mask: "##%"});
+        $('#_TextCharacterRange').mask({mask: '[1-9]#%', enableInlineDefs: true})
        
        $("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');
        });
        
+        $('#_ButtonRemoveMask').click(function(){
+            $("#phone").mask('destroy');
+        });        
+        
        $('#_ViewTest').mask({mask: '(###) ###-####'});
            
    });
@@ -59,6 +62,7 @@
            <td>Phone</td>
            <td><input id="phone" type="text" tabindex="2"/></td>
            <td>(###) ###-####</td>
+            <td><button type="button" id="_ButtonRemoveMask">Remove Phone
Mask</button></td>
        </tr>
        <tr>
            <td>Phone + Ext</td>
@@ -95,10 +99,16 @@
            <td><input id="po" type="text" tabindex="6"/></td>
            <td>PO: aaa-###-***</td>
        </tr>
-        <tr><td>Percent</td>
+        <tr>
+            <td>Percent</td>
            <td><input id="pct" type="text" tabindex="6"/></td>
            <td>##%</td>
        </tr>
+        <tr>
+            <td>Character Ranges</td>
+            <td><input id="_TextCharacterRange" type="text" tabindex="7"/></td>
+            <td>[1-9]#%</td>
+        </tr>        
        <tr>
            <td>Non-Input Element</td>
            <td colspan="3">