this is instead of the ‘plugin’ class that was used previously, and that relied on the
DOM building helpers and conventions that we have in place for ‘real’ plugins
However we want to be able to deal with plugins that piggyback on existing DOM elts
that do not necessarily have .plugin
As a side effect the topmenu buttons do not need to have .plugin to work with validatebutton
$.each(channels, function(i, channel) {
if (value === undefined) {
if (manifold.publish_result_debug) messages.debug("triggering [no value] on channel="+channel+" and event_type="+event_type);
$.each(channels, function(i, channel) {
if (value === undefined) {
if (manifold.publish_result_debug) messages.debug("triggering [no value] on channel="+channel+" and event_type="+event_type);
- $('.plugin').trigger(channel, [event_type]);
+ $('.pubsub').trigger(channel, [event_type]);
} else {
if (manifold.publish_result_debug) messages.debug("triggering [value="+value+"] on channel="+channel+" and event_type="+event_type);
} else {
if (manifold.publish_result_debug) messages.debug("triggering [value="+value+"] on channel="+channel+" and event_type="+event_type);
- $('.plugin').trigger(channel, [event_type, value]);
+ $('.pubsub').trigger(channel, [event_type, value]);
// reference and a normal reference
this.element = element;
this.$element = $(element);
// reference and a normal reference
this.element = element;
this.$element = $(element);
+ // programmatically add specific class for publishing events
+ // used in manifold.js for triggering API events
+ if ( ! this.$element.hasClass('pubsub')) this.$element.addClass('pubsub');
// return this so we can chain/use the bridge with less code.
return this;
// return this so we can chain/use the bridge with less code.
return this;
- <li class='{% if d.is_active %}active{% else %}other{% endif %} plugin{% if d.disabled %} disabled{%endif%}'
+ <li class='{% if d.is_active %}active{% else %}other{% endif %}{% if d.disabled %} disabled{%endif%}'
{% if d.domid %} id='{{d.domid}}'{% endif %}>
<a href="{{ d.href }}"> {{ d.label }} </a> </li>
{% endif %}
{% if d.domid %} id='{{d.domid}}'{% endif %}>
<a href="{{ d.href }}"> {{ d.label }} </a> </li>
{% endif %}