interval-braining-ui-asset-pack 0.0.1 → 0.1.0
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 +4 -4
- data/lib/asset_pack/engine.rb +5 -2
- data/lib/asset_pack/version.rb +1 -1
- data/vendor/assets/bower_components/angular/angular.js +23377 -0
- data/vendor/assets/bower_components/angular-animate/angular-animate.js +1729 -0
- data/vendor/assets/bower_components/angular-growl-notifications/dist/growl-notifications.js +241 -0
- data/vendor/assets/bower_components/angular-input-match/dist/angular-input-match.js +39 -0
- data/vendor/assets/bower_components/angular-messages/angular-messages.js +400 -0
- data/vendor/assets/bower_components/angular-mocks/angular-mocks.js +2228 -0
- data/vendor/assets/bower_components/angular-resource/angular-resource.js +660 -0
- data/vendor/assets/bower_components/angular-sanitize/angular-sanitize.js +640 -0
- data/vendor/assets/bower_components/angular-ui-router/release/angular-ui-router.js +3223 -0
- data/vendor/assets/bower_components/angular-ui-router-breadcrumbs/dist/angular-ui-router-breadcrumbs.js +82 -0
- data/vendor/assets/bower_components/angular-ui-router-helpers/dist/angular-ui-router-helpers.js +52 -0
- data/vendor/assets/bower_components/angular-ui-router-hooks-before-state/dist/angular-ui-router-hooks-before-state.js +56 -0
- data/vendor/assets/bower_components/angular-validate-in-set/dist/angular-validate-in-set.js +77 -0
- data/vendor/assets/bower_components/animate.css/animate.css +3125 -0
- data/vendor/assets/bower_components/bootstrap/dist/css/bootstrap.css +5785 -0
- data/vendor/assets/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.eot +0 -0
- data/vendor/assets/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.svg +229 -0
- data/vendor/assets/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/vendor/assets/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff +0 -0
- data/vendor/assets/bower_components/bootstrap/dist/js/bootstrap.js +1951 -0
- data/vendor/assets/bower_components/cardigan/dist/cardigan.css +37 -0
- data/vendor/assets/bower_components/cardigan/dist/cardigan.js +239 -0
- data/vendor/assets/bower_components/font-awesome-bower/css/font-awesome.css +1338 -0
- data/vendor/assets/bower_components/font-awesome-bower/fonts/FontAwesome.otf +0 -0
- data/vendor/assets/bower_components/font-awesome-bower/fonts/fontawesome-webfont.eot +0 -0
- data/vendor/assets/bower_components/font-awesome-bower/fonts/fontawesome-webfont.svg +414 -0
- data/vendor/assets/bower_components/font-awesome-bower/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/bower_components/font-awesome-bower/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/bower_components/jquery/dist/jquery.js +9190 -0
- data/vendor/assets/bower_components/webfont-OpenSans-Light/dist/OpenSans-Light.css +10 -0
- data/vendor/assets/bower_components/webfont-OpenSans-Light/dist/OpenSans-Light.eot +0 -0
- data/vendor/assets/bower_components/webfont-OpenSans-Light/dist/OpenSans-Light.svg +1831 -0
- data/vendor/assets/bower_components/webfont-OpenSans-Light/dist/OpenSans-Light.ttf +0 -0
- data/vendor/assets/bower_components/webfont-OpenSans-Light/dist/OpenSans-Light.woff +0 -0
- metadata +36 -2
@@ -0,0 +1,37 @@
|
|
1
|
+
card,
|
2
|
+
[card],
|
3
|
+
.card {
|
4
|
+
background-color: #fff;
|
5
|
+
-moz-box-shadow: 0 0.12em 0.25em 0 rgba(63, 63, 63, 0.3);
|
6
|
+
-webkit-box-shadow: 0 0.12em 0.25em 0 rgba(63, 63, 63, 0.3);
|
7
|
+
box-shadow: 0 0.12em 0.25em 0 rgba(63, 63, 63, 0.3);
|
8
|
+
padding: 1em 2em;
|
9
|
+
position: relative;
|
10
|
+
}
|
11
|
+
|
12
|
+
card-dismiss,
|
13
|
+
[card-dismiss],
|
14
|
+
.card-dismiss {
|
15
|
+
cursor: pointer;
|
16
|
+
height: 1em;
|
17
|
+
position: absolute;
|
18
|
+
right: .5em;
|
19
|
+
top: .5em;
|
20
|
+
width: 1em;
|
21
|
+
}
|
22
|
+
|
23
|
+
card-dismiss:after,
|
24
|
+
[card-dismiss]:after,
|
25
|
+
.card-dismiss:after {
|
26
|
+
color: #777;
|
27
|
+
content: "\00d7";
|
28
|
+
display: block;
|
29
|
+
font: 1em monospace, sans-serif;
|
30
|
+
text-align: center;
|
31
|
+
}
|
32
|
+
|
33
|
+
card-dismiss:hover:after,
|
34
|
+
[card-dismiss]:hover:after,
|
35
|
+
.card-dismiss:hover:after {
|
36
|
+
color: #444;
|
37
|
+
}
|
@@ -0,0 +1,239 @@
|
|
1
|
+
/**
|
2
|
+
* Card based web UI using AngularJS
|
3
|
+
* @version v0.0.1-dev-2014-04-20
|
4
|
+
* @link https://github.com/interval-braining/cardigan
|
5
|
+
* @license MIT License, http://www.opensource.org/licenses/MIT
|
6
|
+
*/
|
7
|
+
|
8
|
+
if (typeof module !== "undefined" && typeof exports !== "undefined" && module.exports === exports){
|
9
|
+
module.exports = 'cardigan';
|
10
|
+
}
|
11
|
+
|
12
|
+
(function (window, angular, undefined) {
|
13
|
+
"use strict";
|
14
|
+
// Source: src/cardigan.js
|
15
|
+
/* exported cardigan */
|
16
|
+
/* jshint unused: false */
|
17
|
+
var cardigan = angular.module('cardigan', ['ng']);
|
18
|
+
|
19
|
+
// Source: src/controllers/card.js
|
20
|
+
function CardController($attrs, $element) {
|
21
|
+
Object.defineProperties(this, {
|
22
|
+
$attrs: {
|
23
|
+
configurable: false,
|
24
|
+
enumerable: true,
|
25
|
+
value: $attrs,
|
26
|
+
writable: false,
|
27
|
+
},
|
28
|
+
$element: {
|
29
|
+
configurable: false,
|
30
|
+
enumerable: true,
|
31
|
+
value: $element,
|
32
|
+
writable: false,
|
33
|
+
}
|
34
|
+
});
|
35
|
+
}
|
36
|
+
|
37
|
+
CardController.unboundConstructor = function($attrs, $element) {
|
38
|
+
return new CardController($attrs, $element);
|
39
|
+
};
|
40
|
+
|
41
|
+
// Source: src/controllers/card_container.js
|
42
|
+
function CardContainerController($attrs, $element) {
|
43
|
+
Object.defineProperties(this, {
|
44
|
+
$attrs: {
|
45
|
+
configurable: false,
|
46
|
+
enumerable: true,
|
47
|
+
value: $attrs,
|
48
|
+
writable: false,
|
49
|
+
},
|
50
|
+
$element: {
|
51
|
+
configurable: false,
|
52
|
+
enumerable: true,
|
53
|
+
value: $element,
|
54
|
+
writable: false,
|
55
|
+
}
|
56
|
+
});
|
57
|
+
}
|
58
|
+
|
59
|
+
CardContainerController.unboundConstructor = function($attrs, $element) {
|
60
|
+
return new CardContainerController($attrs, $element);
|
61
|
+
};
|
62
|
+
|
63
|
+
// Source: src/controllers/card_multi_view.js
|
64
|
+
function CardMultiViewController(currentViewIndex) {
|
65
|
+
Object.defineProperties(this, {
|
66
|
+
views: {
|
67
|
+
configurable: false,
|
68
|
+
enumerable: true,
|
69
|
+
get: CardMultiViewController.prototype.views
|
70
|
+
},
|
71
|
+
$viewIndex: {
|
72
|
+
configurable: false,
|
73
|
+
enumerable: false,
|
74
|
+
value: currentViewIndex || 0,
|
75
|
+
writable: true
|
76
|
+
}
|
77
|
+
});
|
78
|
+
}
|
79
|
+
|
80
|
+
CardMultiViewController.prototype.nextView = function nextView() {
|
81
|
+
return this.setViewDelta(1);
|
82
|
+
};
|
83
|
+
|
84
|
+
CardMultiViewController.prototype.prevView = function prevView() {
|
85
|
+
return this.setViewDelta(-1);
|
86
|
+
};
|
87
|
+
|
88
|
+
CardMultiViewController.prototype.setView = function setView(index) {
|
89
|
+
var views = this.views,
|
90
|
+
newView = views.eq(index);
|
91
|
+
|
92
|
+
// Short circuit if same index and element visible
|
93
|
+
if(!newView || this.$viewIndex === index && !newView.hasClass('ng-hide')) { return this; }
|
94
|
+
views.eq(this.$viewIndex).addClass('ng-hide');
|
95
|
+
newView.removeClass('ng-hide');
|
96
|
+
this.$viewIndex = index;
|
97
|
+
return this;
|
98
|
+
};
|
99
|
+
|
100
|
+
CardMultiViewController.prototype.views = function views() {
|
101
|
+
return angular.element(this.$element[0].querySelectorAll('[card-view], .card-view'));
|
102
|
+
};
|
103
|
+
|
104
|
+
|
105
|
+
CardMultiViewController.prototype.setViewDelta = function setViewDelta(delta) {
|
106
|
+
var newIndex = this.$viewIndex + delta,
|
107
|
+
viewCount;
|
108
|
+
if(newIndex < 0) {
|
109
|
+
newIndex = 0;
|
110
|
+
} else if(newIndex >= (viewCount = this.views.length)) {
|
111
|
+
newIndex = viewCount - 1;
|
112
|
+
}
|
113
|
+
return this.setView(newIndex);
|
114
|
+
};
|
115
|
+
|
116
|
+
// Source: src/directives/card.js
|
117
|
+
/* global CardController */
|
118
|
+
|
119
|
+
cardigan.directive('card', [
|
120
|
+
function() {
|
121
|
+
return {
|
122
|
+
controller: [
|
123
|
+
'$attrs',
|
124
|
+
'$element',
|
125
|
+
CardController.unboundConstructor
|
126
|
+
],
|
127
|
+
link: function link(scope, element, attrs, controllers) {
|
128
|
+
var card = controllers[0],
|
129
|
+
cardContainer = controllers[1];
|
130
|
+
scope.card = card;
|
131
|
+
if(cardContainer) {
|
132
|
+
cardContainer.card = card;
|
133
|
+
card.container = cardContainer;
|
134
|
+
}
|
135
|
+
},
|
136
|
+
priority: 5000,
|
137
|
+
require: ['card', '?^cardContainer'],
|
138
|
+
restrict: 'AC',
|
139
|
+
scope: true
|
140
|
+
};
|
141
|
+
}
|
142
|
+
]);
|
143
|
+
|
144
|
+
// Source: src/directives/card_container.js
|
145
|
+
/* global CardContainerController */
|
146
|
+
|
147
|
+
cardigan.directive('cardContainer', [
|
148
|
+
function() {
|
149
|
+
function link(scope, element, attrs, controller) {
|
150
|
+
if(!controller.card) {
|
151
|
+
throw new Error('Unable to find CardController required by cardContainer directive');
|
152
|
+
}
|
153
|
+
|
154
|
+
scope.card = controller.card;
|
155
|
+
}
|
156
|
+
|
157
|
+
return {
|
158
|
+
controller: [
|
159
|
+
'$attrs',
|
160
|
+
'$element',
|
161
|
+
CardContainerController.unboundConstructor
|
162
|
+
],
|
163
|
+
link: link,
|
164
|
+
restrict: 'AC',
|
165
|
+
scope: true
|
166
|
+
};
|
167
|
+
}
|
168
|
+
]);
|
169
|
+
|
170
|
+
// Source: src/directives/card_dismiss.js
|
171
|
+
cardigan.directive('cardDismiss', [
|
172
|
+
function() {
|
173
|
+
function link(scope, element, attrs, card) {
|
174
|
+
card.dismiss = function cardDismiss() {
|
175
|
+
if(this.container) {
|
176
|
+
this.container.$element.remove();
|
177
|
+
} else {
|
178
|
+
this.$element.remove();
|
179
|
+
}
|
180
|
+
};
|
181
|
+
|
182
|
+
element.on('click', function() { card.dismiss(); });
|
183
|
+
}
|
184
|
+
|
185
|
+
return {
|
186
|
+
link: link,
|
187
|
+
require: '^card',
|
188
|
+
restrict: 'AC'
|
189
|
+
};
|
190
|
+
}
|
191
|
+
]);
|
192
|
+
|
193
|
+
// Source: src/directives/card_multi_view.js
|
194
|
+
/* global CardMultiViewController */
|
195
|
+
|
196
|
+
cardigan.directive('cardMultiView', [
|
197
|
+
'$injector',
|
198
|
+
function($injector) {
|
199
|
+
var PRIORITY = 0, hasSwipe;
|
200
|
+
|
201
|
+
if($injector.has('$swipe')) {
|
202
|
+
PRIORITY = 1 + Math.max.apply(null, [
|
203
|
+
$injector.get('ngSwipeLeftDirective')[0].priority,
|
204
|
+
$injector.get('ngSwipeRightDirective')[0].priority
|
205
|
+
]);
|
206
|
+
hasSwipe = true;
|
207
|
+
}
|
208
|
+
|
209
|
+
function link(scope, element, attrs, card) {
|
210
|
+
angular.extend(card, CardMultiViewController.prototype);
|
211
|
+
CardMultiViewController.apply(card);
|
212
|
+
card.views.addClass('ng-hide');
|
213
|
+
card.setView(Number(attrs['cardMultiView']));
|
214
|
+
}
|
215
|
+
|
216
|
+
return {
|
217
|
+
compile: function(tElement, attrs) {
|
218
|
+
if(hasSwipe) {
|
219
|
+
attrs.$set('ng-swipe-left', 'card.nextView()');
|
220
|
+
attrs.$set('ng-swipe-right', 'card.prevView()');
|
221
|
+
}
|
222
|
+
|
223
|
+
return {
|
224
|
+
post: function(scope, element, attrs, card) {
|
225
|
+
/* jshint unused: vars */
|
226
|
+
link.apply(this, arguments);
|
227
|
+
// Need to recompile if swipe directives have been added
|
228
|
+
if(hasSwipe) { $injector.get('$compile')(element, undefined, PRIORITY)(scope); }
|
229
|
+
}
|
230
|
+
};
|
231
|
+
},
|
232
|
+
priority: PRIORITY,
|
233
|
+
require: 'card',
|
234
|
+
restrict: 'AC',
|
235
|
+
terminal: true
|
236
|
+
};
|
237
|
+
}
|
238
|
+
]);
|
239
|
+
})(window, window.angular);
|