r2606 - Merged r2458 to 1.7.2 (fixes #4427 - progressbar('value') returns a reference to this ins...
Author: rdworth
Date: Tue May 26 03:56:36 2009
New Revision: 2606
Modified:
branches/1.7.2/ (props changed)
branches/1.7.2/tests/unit/progressbar/progressbar_methods.js
branches/1.7.2/tests/visual/accordion/ (props changed)
branches/1.7.2/tests/visual/datepicker/ (props changed)
branches/1.7.2/tests/visual/resizable/ (props changed)
branches/1.7.2/tests/visual/selectable/ (props changed)
branches/1.7.2/tests/visual/slider/ (props changed)
branches/1.7.2/ui/i18n/ui.datepicker-ro.js (props changed)
branches/1.7.2/ui/i18n/ui.datepicker-sq.js (props changed)
branches/1.7.2/ui/i18n/ui.datepicker-uk.js (props changed)
branches/1.7.2/ui/ui.accordion.js (props changed)
branches/1.7.2/ui/ui.datepicker.js (props changed)
branches/1.7.2/ui/ui.droppable.js (props changed)
branches/1.7.2/ui/ui.progressbar.js
branches/1.7.2/ui/ui.resizable.js (props changed)
branches/1.7.2/ui/ui.selectable.js (props changed)
branches/1.7.2/ui/ui.slider.js (props changed)
Log:
Merged r2458 to 1.7.2 (fixes #4427 - progressbar('value') returns a
reference to this instead of the value)
Modified: branches/1.7.2/tests/unit/progressbar/progressbar_methods.js
==============================================================================
--- branches/1.7.2/tests/unit/progressbar/progressbar_methods.js (original)
+++ branches/1.7.2/tests/unit/progressbar/progressbar_methods.js Tue May 26
03:56:36 2009
@@ -21,4 +21,13 @@
});
+test('value', function() {
+ expect(3);
+
+ var el = $('<div></div>').progressbar({ value: 20 });
+ equals(el.progressbar('value'), 20, 'correct value as getter');
+ equals(el.progressbar('value', 30), el, 'chainable as setter');
+ equals(el.progressbar('option', 'value'), 30, 'correct value after
setter');
+});
+
})(jQuery);
Modified: branches/1.7.2/ui/ui.progressbar.js
==============================================================================
--- branches/1.7.2/ui/ui.progressbar.js (original)
+++ branches/1.7.2/ui/ui.progressbar.js Tue May 26 03:56:36 2009
@@ -55,8 +55,12 @@
},
value: function(newValue) {
- arguments.length && this._setData("value", newValue);
- return this._value();
+ if (newValue === undefined) {
+ return this._value();
+ }
+
+ this._setData('value', newValue);
+ return this;
},
_setData: function(key, value) {