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.
@@ -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);
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any styles
10
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
+ * file per style scope.
12
+ *
13
+ *= require_self
14
+ *= require assets/common
15
+ */