frontend: reorganize how we handle plugins
This commit is contained in:
parent
2740ab4a7e
commit
1d01a7ba10
4 changed files with 11 additions and 14 deletions
|
|
@ -199,8 +199,14 @@ var registerViewChannels;
|
|||
};
|
||||
|
||||
$.Topic('/plugins/__REGISTER__').subscribe(function (data) {
|
||||
// enable chat controller
|
||||
if (window.CHANNELSTREAM_SETTINGS && window.CHANNELSTREAM_SETTINGS.enabled) {
|
||||
connCtrlr = new ConnectionController(
|
||||
CHANNELSTREAM_SETTINGS.webapp_location,
|
||||
CHANNELSTREAM_SETTINGS.ws_location,
|
||||
CHANNELSTREAM_URLS
|
||||
);
|
||||
registerViewChannels();
|
||||
|
||||
$(document).ready(function () {
|
||||
connCtrlr.run();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -9,6 +9,3 @@ ${pyramid_render(config['template_hooks'].get('plugin_init_template'),
|
|||
{'config':config}, request=get_current_request(), package='rc_ae')|n}
|
||||
% endif
|
||||
% endfor
|
||||
<script>
|
||||
$.Topic('/plugins/__REGISTER__').prepareOrPublish({});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -111,6 +111,7 @@ c.template_context['visual']['default_renderer'] = h.get_visual_attr(c, 'default
|
|||
}
|
||||
};
|
||||
</script>
|
||||
<%include file="/base/plugins_base.html"/>
|
||||
<!--[if lt IE 9]>
|
||||
<script language="javascript" type="text/javascript" src="${h.asset('js/excanvas.min.js')}"></script>
|
||||
<![endif]-->
|
||||
|
|
@ -144,8 +145,9 @@ c.template_context['visual']['default_renderer'] = h.get_visual_attr(c, 'default
|
|||
|
||||
<%def name="head_extra()"></%def>
|
||||
${self.head_extra()}
|
||||
<%include file="/base/plugins_base.html"/>
|
||||
|
||||
<script>
|
||||
$.Topic('/plugins/__REGISTER__').prepareOrPublish({});
|
||||
</script>
|
||||
## extra stuff
|
||||
%if c.pre_code:
|
||||
${c.pre_code|n}
|
||||
|
|
|
|||
|
|
@ -13,12 +13,4 @@
|
|||
'webapp_location': ''};
|
||||
%endif
|
||||
|
||||
if (CHANNELSTREAM_SETTINGS.enabled) {
|
||||
connCtrlr = new ConnectionController(
|
||||
CHANNELSTREAM_SETTINGS.webapp_location,
|
||||
CHANNELSTREAM_SETTINGS.ws_location,
|
||||
CHANNELSTREAM_URLS
|
||||
);
|
||||
registerViewChannels();
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue