killbill-assets-ui 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +28 -0
- data/Rakefile +5 -0
- data/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.svg +288 -0
- data/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/app/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/app/assets/javascripts/application.js +13 -0
- data/app/assets/javascripts/assets/bootstrap.js +2377 -0
- data/app/assets/javascripts/assets/common.js +10 -0
- data/app/assets/javascripts/assets/jquery-ui.min.js +6 -0
- data/app/assets/javascripts/assets/jquery.spin.js +76 -0
- data/app/assets/javascripts/assets/jquery_datatables.js +15711 -0
- data/app/assets/javascripts/assets/spin.js +76 -0
- data/app/assets/stylesheets/application.css +15 -0
- data/app/assets/stylesheets/assets/bootstrap.css +6757 -0
- data/app/assets/stylesheets/assets/bootstrap_and_overrides.css +9 -0
- data/app/assets/stylesheets/assets/common.css +8 -0
- data/app/assets/stylesheets/assets/datatable.css +71 -0
- data/app/assets/stylesheets/assets/element.css +548 -0
- data/app/assets/stylesheets/assets/jquery-ui.min.css +7 -0
- data/app/assets/stylesheets/assets/jquery_datatables.css +658 -0
- data/lib/assets/engine.rb +10 -0
- data/lib/assets/version.rb +5 -0
- data/lib/killbill-assets-ui.rb +4 -0
- data/lib/tasks/killbill/assets/ui_tasks.rake +5 -0
- metadata +126 -0
@@ -0,0 +1,76 @@
|
|
1
|
+
// Generated by CoffeeScript 1.6.3
|
2
|
+
/*
|
3
|
+
jQuery Spin
|
4
|
+
Copyright 2014 Kevin Sylvestre
|
5
|
+
1.1.6
|
6
|
+
*/
|
7
|
+
|
8
|
+
|
9
|
+
(function() {
|
10
|
+
"use strict";
|
11
|
+
var $, Spinner;
|
12
|
+
|
13
|
+
$ = jQuery;
|
14
|
+
|
15
|
+
Spinner = (function() {
|
16
|
+
Spinner.prototype.defaults = {
|
17
|
+
petals: 9
|
18
|
+
};
|
19
|
+
|
20
|
+
function Spinner($element, options) {
|
21
|
+
this.$element = $element;
|
22
|
+
this.options = $.extend({}, this.defaults, options);
|
23
|
+
this.configure();
|
24
|
+
}
|
25
|
+
|
26
|
+
Spinner.prototype.show = function() {
|
27
|
+
return this.$element.animate({
|
28
|
+
opacity: 1.0
|
29
|
+
});
|
30
|
+
};
|
31
|
+
|
32
|
+
Spinner.prototype.hide = function() {
|
33
|
+
return this.$element.animate({
|
34
|
+
opacity: 0.0
|
35
|
+
});
|
36
|
+
};
|
37
|
+
|
38
|
+
Spinner.prototype.destroy = function() {
|
39
|
+
this.$element.empty();
|
40
|
+
return this.$element.data('spin', void 0);
|
41
|
+
};
|
42
|
+
|
43
|
+
Spinner.prototype.configure = function() {
|
44
|
+
var $petal, i, _i, _ref, _results;
|
45
|
+
this.$element.empty();
|
46
|
+
_results = [];
|
47
|
+
for (i = _i = 0, _ref = this.options.petals; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
|
48
|
+
$petal = $("<div />");
|
49
|
+
_results.push(this.$element.append($petal));
|
50
|
+
}
|
51
|
+
return _results;
|
52
|
+
};
|
53
|
+
|
54
|
+
return Spinner;
|
55
|
+
|
56
|
+
})();
|
57
|
+
|
58
|
+
$.fn.spin = function(options) {
|
59
|
+
return $(this).each(function() {
|
60
|
+
var $this, spinner;
|
61
|
+
$this = $(this);
|
62
|
+
spinner = $this.data('spinner');
|
63
|
+
if (spinner == null) {
|
64
|
+
$this.data('spinner', spinner = new Spinner($this, options));
|
65
|
+
}
|
66
|
+
if (typeof options === 'string') {
|
67
|
+
return spinner[options]();
|
68
|
+
}
|
69
|
+
});
|
70
|
+
};
|
71
|
+
|
72
|
+
$(function() {
|
73
|
+
return $('[data-spin]').spin();
|
74
|
+
});
|
75
|
+
|
76
|
+
}).call(this);
|