[view/DE,bugfix][xs]: use (rather than overwrite!) passed in config options.

This commit is contained in:
Rufus Pollock 2012-01-26 23:01:51 +00:00
parent fbacd700c7
commit 91c578d7b9

View File

@ -76,11 +76,11 @@ my.DataExplorer = Backbone.View.extend({
initialize: function(options) {
var self = this;
this.el = $(this.el);
this.config = options.config || {};
_.extend(this.config, {
displayCount: 10
, readOnly: false
});
this.config = _.extend({
displayCount: 10
, readOnly: false
},
options.config);
if (this.config.readOnly) {
this.setReadOnly();
}