in xf/src/xf.collection.js [32:67]
constructor: function(models, options) {
this._initProperties();
this._bindListeners();
if (!options) {
options = {};
}
if (options.component) {
this.component = options.component;
}
_.omit(options, 'component');
this.url = this.url ||
XF.settings.property('dataUrlPrefix').replace(/(\/$)/g, '') + '/' + (_.has(this, 'component') && this.component !== null && _.has(this.component, 'name') ? this.component.name + '/' : '');
if (_.has(this, 'component') && this.component !== null && this.component.options.updateOnShow) {
Dom(this.component.selector()).bind('show', _.bind(this.refresh, this));
}
this.ajaxSettings = this.ajaxSettings || _.defaults({}, XF.settings.property('ajaxSettings'));
if (_.has(this.ajaxSettings, 'success') && _.isFunction(this.ajaxSettings.success)) {
var onDataLoaded = _.bind(this._onDataLoaded, this),
onSuccess = this.ajaxSettings.success;
this.ajaxSettings.success = function() {
onDataLoaded();
onSuccess();
};
} else {
this.ajaxSettings.success = _.bind(this._onDataLoaded, this);
}
BB.Collection.apply(this, arguments);
},