r3520 committed - Update slider for new widget factory.
Revision: 3520
Author: scott.gonzalez
Date: Tue Dec 22 20:04:33 2009
Log: Update slider for new widget factory.
http://code.google.com/p/jquery-ui/source/detail?r=3520
Modified:
/branches/dev/tests/unit/slider/slider.html
/branches/dev/ui/jquery.ui.slider.js
=======================================
--- /branches/dev/tests/unit/slider/slider.html Wed Dec 16 17:36:20 2009
+++ /branches/dev/tests/unit/slider/slider.html Tue Dec 22 20:04:33 2009
@@ -6,6 +6,7 @@
<script type="text/javascript" src="../../../jquery-1.3.2.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.mouse.js"></script>
<script type="text/javascript"
src="../../../ui/jquery.ui.slider.js"></script>
<link type="text/css" href="../testsuite.css" rel="stylesheet" />
=======================================
--- /branches/dev/ui/jquery.ui.slider.js Tue Dec 22 13:11:49 2009
+++ /branches/dev/ui/jquery.ui.slider.js Tue Dec 22 20:04:33 2009
@@ -19,8 +19,18 @@
// (how many times can you page up/down to go through the whole range)
var numPages = 5;
-$.widget("ui.slider", $.extend({}, $.ui.mouse, {
-
+$.widget("ui.slider", $.ui.mouse, {
+ options: {
+ animate: false,
+ distance: 0,
+ max: 100,
+ min: 0,
+ orientation: 'horizontal',
+ range: false,
+ step: 1,
+ value: 0,
+ values: null
+ },
_init: function() {
var self = this, o = this.options;
@@ -462,9 +472,9 @@
},
- _setData: function(key, value) {
-
- $.widget.prototype._setData.apply(this, arguments);
+ _setOption: function(key, value) {
+
+ $.widget.prototype._setOption.apply(this, arguments);
switch (key) {
case 'disabled':
@@ -594,22 +604,11 @@
}
-}));
+});
$.extend($.ui.slider, {
version: "@VERSION",
- eventPrefix: "slide",
- defaults: $.extend({}, $.ui.mouse.defaults, {
- animate: false,
- distance: 0,
- max: 100,
- min: 0,
- orientation: 'horizontal',
- range: false,
- step: 1,
- value: 0,
- values: null
- })
+ eventPrefix: "slide"
});
})(jQuery);
--