From 92566171e845f8a701b24769509a207da910e9f8 Mon Sep 17 00:00:00 2001 From: rolux Date: Tue, 29 Oct 2013 14:35:00 +0100 Subject: [PATCH] Ox.Progressbar: allow for setting progress to indeterminate --- source/Ox.UI/js/Bar/Progressbar.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/Ox.UI/js/Bar/Progressbar.js b/source/Ox.UI/js/Bar/Progressbar.js index 2db32f01..74b3b905 100644 --- a/source/Ox.UI/js/Bar/Progressbar.js +++ b/source/Ox.UI/js/Bar/Progressbar.js @@ -43,7 +43,10 @@ Ox.Progressbar = function(options, self) { cancelled: toggleCancelled, paused: togglePaused, progress: function() { - self.options.progress = Ox.limit(self.options.progress, 0, 1); + self.indeterminate = self.options.progress == -1; + if (self.options.progress != -1) { + self.options.progress = Ox.limit(self.options.progress, 0, 1); + } !self.options.paused && !self.options.cancelled && setProgress(true); } })