-
Notifications
You must be signed in to change notification settings - Fork 1
/
card.js
51 lines (42 loc) · 1.43 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/jquery-sortable.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';
import RemoteEmberObjectConsumer from 'app/consumers/remote_ember_object';
RemoteEmberObjectConsumer.controllers = ['cardMetadata'];
var card = Conductor.card({
App: null,
consumers: {
'test': TestConsumer,
'adminStorage': Conductor.Oasis.Consumer,
'remoteEmberObject': Conductor.Oasis.Consumer.extend(RemoteEmberObjectConsumer),
'authenticatedGithubApi': Conductor.Oasis.Consumer,
'unauthenticatedGithubApi': Conductor.Oasis.Consumer
},
render: function (intent, dimensions) {
if (!document.getElementById('card')) {
document.body.innerHTML = "<div id=\"card\"></div>";
}
return this.App.render(intent, dimensions);
},
activate: function(data) {
var Application = require('app/application');
window.App = this.App = Application.create();
App.deferReadiness();
App.register('card:main', this, { instantiate: false });
},
metadata: {
document: function() {
return {
title: "Github People"
};
}
}
});
export default card;