-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap-progressbar.js
More file actions
37 lines (32 loc) · 1.05 KB
/
Copy pathbootstrap-progressbar.js
File metadata and controls
37 lines (32 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*!
* bootstrap-progressbar v0.9.0 by @minddust
* Copyright (c) 2012-2015 Stephan Groß
*
* http://www.minddust.com/project/bootstrap-progressbar/
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
*/
(function($) {
'use strict';
// PROGRESSBAR CLASS DEFINITION
// ============================
var Progressbar = function(element, options) {
this.$element = $(element);
this.options = $.extend({}, Progressbar.defaults, options);
};
Progressbar.defaults = {
transition_delay: 300,
refresh_speed: 50,
display_text: 'none',
use_percentage: true,
percent_format: function(percent) { return percent + '%'; },
amount_format: function(amount_part, amount_max, amount_min) { return amount_part + ' / ' + amount_max; },
update: $.noop,
done: $.noop,
fail: $.noop
};
Progressbar.prototype.transition = function() {
var $this = this.$element;
var $parent = $this.parent();
var $back_text = this.$back_text;