-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
45 lines (37 loc) · 1.02 KB
/
app.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
(function($) {
"use strict";
if (Echo.App.isDefined("Echo.Apps.StreamPlus")) return;
var stream = Echo.App.manifest("Echo.Apps.StreamPlus");
stream.config = {
"targetURL": undefined,
"dependencies": {
"Janrain": {"appId": undefined},
"StreamServer": {"appkey": undefined}
},
"advanced": {}
};
stream.dependencies = [{
"url": "//cdn.echoenabled.com/apps/echo/conversations/v1.3/app.js",
"app": "Echo.Apps.Conversations"
}, {
"url": "{config:cdnBaseURL.sdk}/streamserver.pack.js",
"app": "Echo.StreamServer.Controls.Stream"
}];
stream.templates.main =
'<div class="{class:container}">' +
'<div class="{class:content}"></div>' +
'</div>';
stream.renderers.content = function(element) {
this.initComponent({
"id": "Conversations",
"component": "Echo.Apps.Conversations",
"config": $.extend(true, {}, this.config.get("advanced"), {
"target": element,
"targetURL": this.config.get("targetURL"),
"dependencies": this.config.get("dependencies")
})
});
return element;
};
Echo.App.create(stream);
})(Echo.jQuery);