- /**
- * @brief
- * @param plugin_uuid
- * @param header
- * @param field
- * @param selected_str
- * @param disabled_str
- */
- this.checkbox = function(plugin_uuid, header, field, selected_str, disabled_str) {
- /* Prefix id with plugin_uuid */
- return "<input class='hazelnut-checkbox-" + plugin_uuid + "' id='hazelnut-checkbox-" + plugin_uuid + "-" + get_value(header) + "' name='" + get_value(field) + "' type='checkbox' " + selected_str + disabled_str + "autocomplete='off' value='" + get_value(header) + "'></input>";
- }
-
- this.update_table = function(rows) {
- var o = this.options;
- var object = this;
+ this.update_plugin = function(e, rows) {
+ // e.data is what we passed in second argument to subscribe
+ // so here it is the jquery object attached to the plugin <div>
+ var $plugindiv=e.data;
+ if (debug) messages.debug("entering hazelnut.update_plugin on id '" + $plugindiv.attr('id') + "'");
+ // clear the spinning wheel: look up an ancestor that has the need-spin class
+ // do this before we might return
+ $plugindiv.closest('.need-spin').spin(false);
+
+ var options = this.options;
+ var hazelnut = this;