diff options
author | Chi Cheng <cloudream@gmail.com> | 2008-08-25 05:47:48 +0000 |
---|---|---|
committer | Chi Cheng <cloudream@gmail.com> | 2008-08-25 05:47:48 +0000 |
commit | 75bfb681b99dbf2f96bd5ceff5ba927ec398fcbb (patch) | |
tree | 3a6dbdcdea3a39672d284abb69244e6857deb843 | |
parent | 5d261bf7b1cb347bae8d439ba997f4bade0ad18f (diff) | |
download | jquery-ui-75bfb681b99dbf2f96bd5ceff5ba927ec398fcbb.tar.gz jquery-ui-75bfb681b99dbf2f96bd5ceff5ba927ec398fcbb.zip |
Progressbar: hidden instance in ui(), options._interval->this._interval
Update spinner/progressbar demos
-rw-r--r-- | demos/functional/templates/ui.progressbar.html | 9 | ||||
-rw-r--r-- | demos/functional/templates/ui.spinner.html | 5 | ||||
-rw-r--r-- | ui/ui.progressbar.js | 7 |
3 files changed, 9 insertions, 12 deletions
diff --git a/demos/functional/templates/ui.progressbar.html b/demos/functional/templates/ui.progressbar.html index 00aa2f9de..cb99c33a9 100644 --- a/demos/functional/templates/ui.progressbar.html +++ b/demos/functional/templates/ui.progressbar.html @@ -15,12 +15,11 @@ destroy: '$("#progressbar").progressbar("destroy");',
options: [
{ desc: 'Start a progressbar', source: '$("#progressbar").progressbar({interval:2000}); $("#progressbar").progressbar("start");' },
- { desc: 'With different increment', source: '$("#progressbar").progressbar({interval:2000, increment:100}); $("#progressbar").progressbar("start");' },
- { desc: 'Set progress to 50%', source: '$("#progressbar").progressbar("progress", 50);' },
- { desc: 'Loop', source: '$("#progressbar").progressbar({interval:2000}).progressbar("start");' },
+ { desc: 'With different increment', source: '$("#progressbar").progressbar({interval:2000, increment:100}).progressbar("start");' },
+ { desc: 'Set progress to 50%', source: '$("#progressbar").progressbar().progressbar("progress", 50);' },
{ desc: 'Callback when finish', source: '$("#progressbar").progressbar({interval: 1000, stop:function(){alert("Finished");}}).progressbar("start");' },
- { desc: 'Enable the progressbar', source: '$("#progressbar").progressbar("enable");' },
- { desc: 'Disable the progressbar', source: '$("#progressbar").progressbar("disable");' }
+ { desc: 'Enable the progressbar', source: '$("#progressbar").progressbar().progressbar("enable");' },
+ { desc: 'Disable the progressbar', source: '$("#progressbar").progressbar().progressbar("disable");' }
]
}
diff --git a/demos/functional/templates/ui.spinner.html b/demos/functional/templates/ui.spinner.html index 4ec12cc94..727fb8d44 100644 --- a/demos/functional/templates/ui.spinner.html +++ b/demos/functional/templates/ui.spinner.html @@ -17,9 +17,10 @@ { desc: 'Make a spinner', source: '$("#spinner").spinner();' },
{ desc: 'A spinner with min and max value', source: '$("#spinner").spinner({min:-100, max:150});' },
{ desc: 'Big stepping', source: '$("#spinner").spinner({stepping:100});' },
+ { desc: 'Currency option', source: '$("#spinner").spinner({currency:"$"});' },
{ desc: 'Disable incremental option', source: '$("#spinner").spinner({incremental:false});' },
- { desc: 'Enable the spinner', source: '$("#spinner").spinner().attr("disabled","");' },
- { desc: 'Disable the spinner', source: '$("#spinner").spinner().attr("disabled","disabled");' }
+ { desc: 'Enable the spinner', source: '$("#spinner").spinner().spinner("disable");' },
+ { desc: 'Disable the spinner', source: '$("#spinner").spinner().spinner("enable");' }
]
}
diff --git a/ui/ui.progressbar.js b/ui/ui.progressbar.js index 755cbe40a..abbf174d0 100644 --- a/ui/ui.progressbar.js +++ b/ui/ui.progressbar.js @@ -15,9 +15,7 @@ $.widget("ui.progressbar", {
_init: function() {
- $.extend(this.options, {
- _interval: this.options.interval
- });
+ this._interval = this.options.interval;
var self = this,
options = this.options,
@@ -59,7 +57,6 @@ $.widget("ui.progressbar", { plugins: {},
ui: function(e) {
return {
- instance: this,
identifier: this.identifier,
options: this.options,
element: this.bar,
@@ -151,7 +148,7 @@ $.widget("ui.progressbar", { this.bar.width(0);
this.textElement.width(0);
this.bar.addClass('ui-hidden');
- this.options.interval = this.options._interval;
+ this.options.interval = this._interval;
this._propagate('stop', this.ui());
},
progress: function(percentState) {
|