-
Notifications
You must be signed in to change notification settings - Fork 2
/
card.js
51 lines (42 loc) · 1.21 KB
/
card.js
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import Consumer from 'conductor';
Conductor.require('/vendor/jquery.js');
Conductor.require('/vendor/handlebars.js');
Conductor.require('/vendor/ember-latest.js');
Conductor.require('/vendor/ember_card_bridge.js');
Conductor.require('/vendor/resolver.js');
Conductor.requireCSS('/css/glazier_card.css');
Conductor.requireCSS('card.css');
import TestConsumer from 'app/consumers/test';
var card = Conductor.card({
consumers: {
'test': TestConsumer,
'authenticatedGithubApi': Conductor.Oasis.Consumer,
'unauthenticatedGithubApi': Conductor.Oasis.Consumer,
'intent': Conductor.Oasis.Consumer
},
App: null,
render: function (intent, dimensions) {
if (!document.getElementById('card')){
document.body.innerHTML = "<div id=\"card\"></div>";
}
return this.App.render(intent, dimensions);
},
activate: function() {
oasis.configure('eventCallback', Ember.run);
this.App = require('app/application');
this.App.register('card:main', this, { instantiate: false });
},
metadata: {
document: function() {
return {
title: "Github Issues"
};
},
card: function() {
return {
isEditable: false
};
}
}
});
export default card;