Sha256: 44eefdd011b32920b8f424634abcc2b266c631596a1d24023defe827ff11e767
Contents?: true
Size: 1.17 KB
Versions: 16
Compression:
Stored size: 1.17 KB
Contents
I"£(function() { Rev.registerMixin('BackboneProps', { componentWillMount: function() { return this.backbonify(this.props); }, componentWillReceiveProps: function(nextProps) { return this.backbonify(nextProps); }, backbonify: function(props) { var data, klass, name, _results; this.__bb = []; _results = []; for (name in this.backboneMap) { data = props[name]; if ((data != null) && (data != null) && !(data instanceof Backbone.Model || data instanceof Backbone.Collection)) { klass = this.backboneMap[name]; props[name] = new klass(data); } _results.push(this.__bb.push(props[name])); } return _results; }, componentDidMount: function() { return _.each(this.__bb, (function(_this) { return function(model) { return model.on('all', _this.forceUpdate.bind(_this, null), _this); }; })(this)); }, componentWillUnmount: function() { return _.each(this.__bb, (function(_this) { return function(model) { return model.off(null, null, _this); }; })(this)); } }); }).call(this); :ET
Version data entries
16 entries across 16 versions & 1 rubygems