Skip to content
Snippets Groups Projects
Commit cd6259cc authored by Kasalehlia's avatar Kasalehlia
Browse files

added infodisplay-outlet feature

parent 4568e9be
No related branches found
No related tags found
No related merge requests found
...@@ -19,8 +19,19 @@ $(function () { ...@@ -19,8 +19,19 @@ $(function () {
}); });
$('body > div').each(function () { $('body > div').each(function () {
var e = $(this); var e = $(this);
var outlets = new Set();
socket.on(e.attr('id'), function (cnt) { socket.on(e.attr('id'), function (cnt) {
e.html(cnt); e.html(cnt);
e.find('infodisplay-outlet[name]').each(function () {
var name = $(this).attr('name');
if (!outlets.has(name)) {
var outlet = $(this);
socket.on(e.attr('id')+'.'+name, function (content) {
outlet.html(content);
});
outlets.add(name);
}
});
}); });
}); });
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment