Accommodating backbone.js changes

Hey guys,

For assorted reasons, just now on Sugar 7.8 and am having a bit of difficulty converting a custom dashboard we built. I've spent plenty of time in this article but I'm not seeing the fix here.

Basically, we need to track the change in two dropdown lists, and those changes fire a small function using the data from each dropdown.

This is what we have now, in the init portion of the file:

this.events['change select[id=period]'] = 'loadData';
this.events['change select[id=userid]'] = 'loadData';

Maybe I'm missing an obvious fix, but the couple of things I've tried haven't worked. Some direction would be great.

  • You can use to detect change 7.8 professional ( Using "change input"  although it is "dropdown")


    initialize: function (options) {
            this._super('initialize', [options]);
    this.events["change input[name=type]"] = '_detectChange';
    },

    _renderHtml: function(ctx, options){ this._super('_renderHtml', [ctx, options]);   },

    _detectChange : function() {
            console.log('This is detected');
    },