-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcard.js
52 lines (40 loc) · 1.28 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 Conductor 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 RemoteEmberObjectConsumer from 'app/consumers/remote_ember_object';
RemoteEmberObjectConsumer.controllers = [ 'cardMetadata' ];
var card = Conductor.card({
App: null,
consumers: {
'remoteEmberObject': Conductor.Oasis.Consumer.extend(RemoteEmberObjectConsumer),
'adminStorage': 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() {
window.App = this.App = require('app/application').create();
this.App.Router.map(function() {
//this.route('unconnected');
this.route('edit');
});
this.App.deferReadiness();
this.App.register('card:main', this, { instantiate: false });
},
metadata: {
document: function() {
return {
title: "Markdown Editor"
};
}
}
});
export default card;