Skip to content
Permalink
Browse files

Merge remote branch 'origin/spinner'

  • Loading branch information
jzaefferer committed Dec 22, 2010
2 parents 727d00d + 26bc701 commit 2c89e9587eb0c0cc92ceca690bcbc8b3f0d907ca
@@ -23,6 +23,7 @@
<script src="../ui/jquery.ui.selectable.js"></script>
<script src="../ui/jquery.ui.slider.js"></script>
<script src="../ui/jquery.ui.sortable.js"></script>
<script src="../ui/jquery.ui.spinner.js"></script>
<script src="../ui/jquery.ui.tabs.js"></script>
<script src="../ui/jquery.effects.core.js"></script>
<script src="../ui/jquery.effects.blind.js"></script>
@@ -269,6 +270,7 @@
<dd><a href="dialog/index.html">Dialog</a></dd>
<dd><a href="progressbar/index.html">Progressbar</a></dd>
<dd><a href="slider/index.html">Slider</a></dd>
<dd><a href="spinner/index.html">Spinner</a></dd>
<dd><a href="tabs/index.html">Tabs</a></dd>
<dt>Effects</dt>
<dd><a href="animate/index.html">Color Animation</a></dd>
@@ -0,0 +1,61 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Spinner - Default functionality</title>
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="../../jquery-1.4.3.js"></script>
<script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>
<script type="text/javascript" src="../../external/glob.js"></script>
<script type="text/javascript" src="../../external/glob.de-DE.js"></script>
<script type="text/javascript" src="../../external/glob.ja-JP.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
$("#currency").change(function() {
var current = $("#spinner").spinner("value");
Globalization.preferCulture($(this).val());
$("#spinner").spinner("value", current);
})
$("#spinner").spinner({
min: 5,
max: 2500,
step: 25,
start: 1000,
numberformat: "C"
});
});
</script>
</head>
<body>

<div class="demo">

<p>
<label for="currency">Currency to donate</label>
<select id="currency" name="currency">
<option value="en-US">US $</option>
<option value="de-DE">EUR €</option>
<option value="ja-JP">YEN ¥</option>
</select>
</p>
<p>
<label for="spinner">Amount to donate:</label>
<input id="spinner" name="spinner" value="5" />
</p>
</div>

<div class="demo-description">
<p>
Example of a donation form, with currency selection and amout spinner.
</p>
</div>

</body>
</html>
@@ -0,0 +1,59 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Spinner - decimal</title>
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="../../jquery-1.4.3.js"></script>
<script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>
<script type="text/javascript" src="../../external/glob.js"></script>
<script type="text/javascript" src="../../external/glob.de-DE.js"></script>
<script type="text/javascript" src="../../external/glob.ja-JP.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
$("#spinner").spinner({
step: 0.01,
numberformat: "n"
});
$("#culture").change(function() {
var current = $("#spinner").spinner("value");
Globalization.preferCulture($(this).val());
$("#spinner").spinner("value", current);
})
});
</script>
</head>
<body>

<div class="demo">
<p>
<label for="spinner">Decimal spinner:</label>
<input id="spinner" name="spinner" value="5.06" />
</p>
<p>
<label for="culture">Select a culture to use for formatting:</label>
<select id="culture">
<option value="en-EN" selected="selected">English</option>
<option value="de-DE">German</option>
<option value="ja-JP">Japanese</option>
</select>
</p>
</div>

<div class="demo-description">
<p>
Example of a decimal spinner. Step is set to 0.01.
<br/>The code handling the culture change reads the current spinner value,
then changes the culture, then sets the value again, resulting in an updated
formatting, based on the new culture.
</p>
</div>

</body>
</html>
@@ -0,0 +1,65 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Spinner - Default functionality</title>
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="../../jquery-1.4.3.js"></script>
<script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
$("#spinner").spinner();
$("#disable").toggle(function() {
$("#spinner").spinner("disable");
}, function() {
$("#spinner").spinner("enable");
});
$("#destroy").toggle(function() {
$("#spinner").spinner("destroy");
}, function() {
$("#spinner").spinner();
});
$("#getvalue").click(function() {
alert($("#spinner").spinner("value"));
});
$("#setvalue").click(function() {
$("#spinner").spinner("value", 5);
});
$("button").button();
});
</script>
</head>
<body>

<div class="demo">

<p><label for="spinner">Select a value:</label>
<input id="spinner" name="value" /></p>

<p>
<button id="disable">Toggle disable/enable</button>
<button id="destroy">Toggle widget</button>
</p>

<p>
<button id="getvalue">Get value</button>
<button id="setvalue">Set value to 5</button>
</p>

</div><!-- End demo -->

<div class="demo-description">
<p>
Default spinner.
</p>
</div><!-- End demo-description -->

</body>
</html>
@@ -0,0 +1,20 @@
<!doctype html>
<html lang="en">
<head>
<title>jQuery UI Spinner 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>
<li><a href="decimal.html">Decimal</a></li>
<li><a href="currency.html">Currency</a></li>
<li><a href="latlong.html">Map</a></li>
<li><a href="time.html">Time</a></li>
<li><a href="overflow.html">Overflow</a></li>
</ul>
</div>
</body>
</html>
@@ -0,0 +1,60 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Spinner - Map</title>
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="../../jquery-1.4.3.js"></script>
<script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
function latlong() {
return new google.maps.LatLng($("#lat").val(),$("#lng").val());
}
function position() {
map.setCenter(latlong());
}
$("#lat, #lng").spinner({
precision: 6,
change: position
});
var map = new google.maps.Map($("#map")[0], {
zoom: 8,
center: latlong(),
mapTypeId: google.maps.MapTypeId.ROADMAP
});
});
</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">
<p>
Google Maps integration, using spinners to change latidude and longitude.
</p>
</div><!-- End demo-description -->

</body>
</html>
@@ -0,0 +1,47 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Spinner - Default functionality</title>
<link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="../../jquery-1.4.3.js"></script>
<script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>
<script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
$("#spinner").spinner({
spin: function(event, ui) {
if (ui.value > 10) {
$(this).spinner("value", -10);
return false;
} else if (ui.value < -10) {
$(this).spinner("value", 10);
return false;
}
}
});
});
</script>
</head>
<body>

<div class="demo">
<p>
<label for="spinner">Select a value:</label>
<input id="spinner" name="value" />
</p>
</div>

<div class="demo-description">
<p>
Overflowing spinner restricted to a range of -10 to 10.
For anything above 10, it'll overflow to -10, and the other way round.
</p>
</div>

</body>
</html>

0 comments on commit 2c89e95

Please sign in to comment.
You can’t perform that action at this time.