r2521 - spinner: fixed up demos - added incremental demo and updated donation demo to demo intern...

r2521 - spinner: fixed up demos - added incremental demo and updated donation demo to demo intern...

Author: pazu2k@gmail.com
Date: Mon May 11 12:00:46 2009
New Revision: 2521
Added:
branches/dev/spinner/demos/spinner/incremental.html
Removed:
branches/dev/spinner/demos/spinner/disabled.html
branches/dev/spinner/demos/spinner/mousewheel.html
Modified:
branches/dev/spinner/demos/spinner/default.html
branches/dev/spinner/demos/spinner/donation.html
branches/dev/spinner/demos/spinner/index.html
Log:
spinner: fixed up demos - added incremental demo and updated donation demo
to demo international support.
Modified: branches/dev/spinner/demos/spinner/default.html
==============================================================================
--- branches/dev/spinner/demos/spinner/default.html    (original)
+++ branches/dev/spinner/demos/spinner/default.html    Mon May 11 12:00:46 2009
@@ -9,7 +9,14 @@
    <link type="text/css" href="../demos.css" rel="stylesheet" />
    <script type="text/javascript">
    $(function() {
-        $("#value").spinner();
+        $("#s1").spinner();
+        
+        $("button").click(function(event){
+            var ns = $(this).attr('id').match(/(s\d)\-(\w+)$/);
+            if (ns != null)
+                $('#'+ns[1]).spinner( ns[2] );
+        });
+
    });
    </script>
</head>
@@ -17,8 +24,14 @@
<div class="demo">
-<label for="value">Select a value:</label>
-<input id="value" name="value" />
+

<label for="s1">Select a value:</label>
+<input id="s1" name="value" />


+
+


+<button id="s1-disable">disable</button>
+<button id="s1-enable">enable</button>
+<button id="s1-destroy">destroy</button>
+




</div><!-- End demo -->
Modified: branches/dev/spinner/demos/spinner/donation.html
==============================================================================
--- branches/dev/spinner/demos/spinner/donation.html    (original)
+++ branches/dev/spinner/demos/spinner/donation.html    Mon May 11 12:00:46
2009
@@ -9,15 +9,33 @@
    <link type="text/css" href="../demos.css" rel="stylesheet" />
    <script type="text/javascript">
    $(function() {
+
+        var opts = {
+            's1': { currency: '$' },
+            's2': { currency: '€' },
+            's3': { currency: '¥' },
+            's4': { currency: '$', group: ' ', point: '.' },
+            's5': { currency: 'Fr ', group: "'", point: '.' },
+            's6': { currency: 'RUB', group: ".", point: ',' }
+        };
+        
        var currency = $("#currency").change(function() {
-            $("#amount").spinner("option", "currency", $(this).val()).blur();
+            var val = $(this).val();
+            $("#amount")
+                .spinner("option", "currency", opts[val].currency)
+                .spinner("option", "group", opts[val].group ? opts[val].group : ',')
+                .spinner("option", "point", opts[val].point ? opts[val].point : '.')
+                .blur();
        });
        $("#amount").spinner({
-            currency: currency.val(),
+            currency: opts[currency.val()].currency,
            min: 5,
-            max: 1000,
-            stepping: 5
-        });
+            max: 2500,
+            stepping: 25,
+            start: 1000,
+            width: '10em'
+        });    
+        
    });
    </script>
</head>
@@ -28,9 +46,12 @@


    <label for="currency">Currency</label>
    <select id="currency" name="currency">
-        <option value="$">US $</option>
-        <option value="€">EUR €</option>
-        <option value="¥">YEN ¥</option>
+        <option value="s1">US $</option>
+        <option value="s2">EUR €</option>
+        <option value="s3">YEN ¥</option>
+        <option value="s4">Australian $</option>
+        <option value="s5">Swiss Franc Fr</option>
+        <option value="s6">Russian Ruble RUB</option>
    </select>    















Added: branches/dev/spinner/demos/spinner/incremental.html
==============================================================================
--- (empty file)
+++ branches/dev/spinner/demos/spinner/incremental.html    Mon May 11 12:00:46
2009
@@ -0,0 +1,32 @@
+<!doctype html>
+<html lang="en">
+<head>
+    <title>jQuery UI Spinner - Incremental</title>
+    <link type="text/css" href="../../themes/base/ui.all.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.spinner.js"></script>
+    <link type="text/css" href="../demos.css" rel="stylesheet" />
+    <script type="text/javascript">
+    $(function() {
+        $("#value").spinner({incremental:true});
+    });
+    </script>
+</head>
+<body>
+
+<div class="demo">
+
+<label for="value">Select a value:</label>
+<input id="value" name="value" />
+
+</div><!-- End demo -->
+
+<div class="demo-description">
+


+Spinner with incremental swithed on.
+


+</div><!-- End demo-description -->
+
+</body>
+</html>
Modified: branches/dev/spinner/demos/spinner/index.html
==============================================================================
--- branches/dev/spinner/demos/spinner/index.html    (original)
+++ branches/dev/spinner/demos/spinner/index.html    Mon May 11 12:00:46 2009
@@ -12,8 +12,7 @@
            <li><a href="donation.html">Donation</a></li>
            <li><a href="latlong.html">Map</a></li>
            <li><a href="list.html">List</a></li>
-            <li><a href="disabled.html">Disabled</a></li>
-            <li><a href="mousewheel.html">Mousewheel</a></li>
+            <li><a href="incremental.html">Incremental</a></li>
        </ul>
    </div>
</body>