r2224 - in branches/dev/spinner: demos/spinner ui

r2224 - in branches/dev/spinner: demos/spinner ui


Author: joern.zaefferer
Date: Sun Mar 8 16:43:55 2009
New Revision: 2224
Added:
branches/dev/spinner/demos/spinner/latlong.html (contents, props
changed)
Modified:
branches/dev/spinner/demos/spinner/default.html
branches/dev/spinner/demos/spinner/donation.html
branches/dev/spinner/demos/spinner/index.html
branches/dev/spinner/demos/spinner/list.html
branches/dev/spinner/ui/ui.spinner.js
Log:
updating dev/spinner: improved demos, added latlong/google maps integration
demo
Modified: branches/dev/spinner/demos/spinner/default.html
==============================================================================
--- branches/dev/spinner/demos/spinner/default.html    (original)
+++ branches/dev/spinner/demos/spinner/default.html    Sun Mar 8 16:43:55 2009
@@ -1,7 +1,7 @@
<!doctype html>
<html lang="en">
<head>
-    <title>jQuery UI Autocomplete - Default functionality</title>
+    <title>jQuery UI Spinner - Default functionality</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>
Modified: branches/dev/spinner/demos/spinner/donation.html
==============================================================================
--- branches/dev/spinner/demos/spinner/donation.html    (original)
+++ branches/dev/spinner/demos/spinner/donation.html    Sun Mar 8 16:43:55
2009
@@ -1,7 +1,7 @@
<!doctype html>
<html lang="en">
<head>
-    <title>jQuery UI Autocomplete - Default functionality</title>
+    <title>jQuery UI Spinner - Default functionality</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>
@@ -39,7 +39,7 @@
<div class="demo-description">


-Default spinner.
+Example of a donation form, with currency selection and amout spinner.




</div><!-- End demo-description -->
Modified: branches/dev/spinner/demos/spinner/index.html
==============================================================================
--- branches/dev/spinner/demos/spinner/index.html    (original)
+++ branches/dev/spinner/demos/spinner/index.html    Sun Mar 8 16:43:55 2009
@@ -1,7 +1,7 @@
<!doctype html>
<html lang="en">
<head>
-    <title>jQuery UI Accordion Demos</title>
+    <title>jQuery UI Spinner Demos</title>
    <link type="text/css" href="../demos.css" rel="stylesheet" />
</head>
<body>
@@ -10,6 +10,7 @@
        <ul>
            <li class="demo-config-on"><a href="default.html">Default
functionality</a></li>
            <li><a href="donation.html">Donation</a></li>
+            <li><a href="latlong.html">Map</a></li>
            <li><a href="list.html">List</a></li>
        </ul>
    </div>
Added: branches/dev/spinner/demos/spinner/latlong.html
==============================================================================
--- (empty file)
+++ branches/dev/spinner/demos/spinner/latlong.html    Sun Mar 8 16:43:55 2009
@@ -0,0 +1,51 @@
+<!doctype html>
+<html lang="en">
+<head>
+    <title>jQuery UI Spinner - Map</title>
+    <link type="text/css" href="../../themes/base/ui.all.css"
rel="stylesheet" />
+    <script type="text/javascript"
src="http://maps.google.com/maps?file=googleapi&key=ABQIAAAAAa19jseotS72_P3A265gdBTO9vRieRmS-pChUW0eJujAStXDoBRSjITl6o19EuvtTyvzFRS9TMN3fQ&v=2.x"></script>
+    <script type="text/javascript"
src="http://maps.google.com/intl/en_ALL/mapfiles/148e/maps2.api/main.js"></script>
+    <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() {
+        function position() {
+            map.setCenter(new GLatLng($("#lat").val(),$("#lng").val()), 8);
+        }
+        $("#lat, #lng").spinner({
+            decimals: 6,
+            change: position
+        });
+        
+        var map = new GMap2(document.getElementById('map'));
+        position();
+    });
+    </script>
+    <style>
+        #map { width:500px; height:500px; }
+    </style>
+</head>
+<body>
+
+<div class="demo">
+
+<label for="lat">Latitude</label>
+<input id="lat" name="lat" value="44.797916" />
+<br/>
+<label for="lng">Longitude</label>
+<input id="lng" name="lng" value="-93.278046" />
+
+<div id="map"></div>
+
+</div><!-- End demo -->
+
+<div class="demo-description">
+


+Google Maps integration, using spinners to change latidude and longitude.
+


+</div><!-- End demo-description -->
+
+</body>
+</html>
Modified: branches/dev/spinner/demos/spinner/list.html
==============================================================================
--- branches/dev/spinner/demos/spinner/list.html    (original)
+++ branches/dev/spinner/demos/spinner/list.html    Sun Mar 8 16:43:55 2009
@@ -1,7 +1,7 @@
<!doctype html>
<html lang="en">
<head>
-    <title>jQuery UI Autocomplete - Default functionality</title>
+    <title>jQuery UI Spinner - List</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>
Modified: branches/dev/spinner/ui/ui.spinner.js
==============================================================================
--- branches/dev/spinner/ui/ui.spinner.js    (original)
+++ branches/dev/spinner/ui/ui.spinner.js    Sun Mar 8 16:43:55 2009
@@ -72,7 +72,7 @@
                    self._mouseup(event);
                })
                .bind('keydown.spinner', function(event) {
-                    var KEYS = $.keyCode;
+                    var KEYS = $.ui.keyCode;
                    if (event.keyCode == KEYS.SPACE || event.keyCode == KEYS.ENTER) {
                        $(this).addClass('ui-spinner-pressed');
                        if (!self.counter) {
@@ -88,7 +88,7 @@
                .bind('keyup.spinner', function(event) {
                    $(this).removeClass('ui-spinner-pressed');
                    self.counter = 0;
-                    self._propagate('change', event);
+                    self._trigger('change', event);
                })
            .end()
            .append('<button class="ui-spinner-down"
type="button">&#9660;</button>')
@@ -120,7 +120,7 @@
                    self._mouseup(event);
                })
                .bind('keydown.spinner', function(event) {
-                    var KEYS = $.keyCode;
+                    var KEYS = $.ui.keyCode;
                    if (event.keyCode == KEYS.SPACE || event.keyCode == KEYS.ENTER) {
                        $(this).addClass('ui-spinner-pressed');
                        if (!self.counter) {
@@ -134,7 +134,7 @@
                .bind('keyup.spinner', function(event) {
                    $(this).removeClass('ui-spinner-pressed');
                    self.counter = 0;
-                    self._propagate('change', event);
+                    self._trigger('change', event);
                })
            .end();
@@ -176,7 +176,7 @@
        })
        .bind('keyup.spinner', function(event) {
            self.counter = 0;
-            self._propagate('change', event);
+            self._trigger('change', event);
        })
        .bind('blur.spinner', function(event) {
            self._cleanUp();
@@ -215,15 +215,15 @@
        if (this.counter) {
            this.counter++;
        }
-        this._propagate('spin', event);
+        this._trigger('spin', event);
    },
    _down: function(event) {
        this._spin('down', event);
-        this._propagate('down', event);
+        this._trigger('down', event);
    },
    _up: function(event) {
        this._spin('up', event);
-        this._propagate('up', event);
+        this._trigger('up', event);
    },
    _mousedown: function(i, d, event) {
        var self = this;
@@ -246,10 +246,10 @@
            this.timer = 0;
        }
        this.element[0].focus();
-        this._propagate('change', event);
+        this._trigger('change', event);
    },
    _keydown: function(event) {
-        var KEYS = $.keyCode;
+        var KEYS = $.ui.keyCode;
        if (event.keyCode == KEYS.UP) {
            this._up(event);
@@ -279,7 +279,7 @@
            window.clearTimeout(self.timeout);
            self.timeout = 0;
        }
-        self.timeout = window.setTimeout(function(){self._propagate('change',
event);}, 400);
+        self.timeout = window.setTimeout(function(){self._trigger('change',
event);}, 400);
        event.preventDefault();
    },
    _getValue: function() {