{:uriI"file:///Users/joel/src/revelry_core/app/assets/javascripts/revelry/examples/ModelHasManyInput.js.cjsx?type=application/javascript&pipeline=self&id=68d6cd448a1ffea2342e16b474199d0fb726c7d6318255b561e0dbf02b9c65c2:ET:load_pathI"8/Users/joel/src/revelry_core/app/assets/javascripts;F: filenameI"c/Users/joel/src/revelry_core/app/assets/javascripts/revelry/examples/ModelHasManyInput.js.cjsx;T: nameI"'revelry/examples/ModelHasManyInput;T:logical_pathI"/revelry/examples/ModelHasManyInput.self.js;T:content_typeI"application/javascript;T: sourceI"(function() { var EchoModel, ExampleControls, ExampleRow, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; Rev.pullInto('this')('ModelForm'); ExampleRow = React.createClass({ render: function() { return React.createElement("div", null, React.createElement(Rev.Components.ModelInput, { "model": this.props.model, "field": "name" })); } }); ExampleControls = React.createClass({ render: function() { return React.createElement("button", { "onClick": this.addOne }, "+"); }, addOne: function(e) { e.preventDefault(); return this.props.items.add({}); } }); EchoModel = (function(superClass) { extend(EchoModel, superClass); function EchoModel() { return EchoModel.__super__.constructor.apply(this, arguments); } EchoModel.prototype.urlRoot = '/echo'; EchoModel.prototype.sync = function() { return this.trigger('sync'); }; return EchoModel; })(Backbone.Model); Rev.registerExample('ModelHasManyInput', { mixins: [Backbone.Events], getInitialState: function() { return { model: new EchoModel() }; }, render: function() { return React.createElement(ModelForm, { "model": this.state.model }, "Model JSON: ", JSON.stringify(this.state.model.attributes), React.createElement(Rev.Components.ModelHasManyInput, { "model": this.state.model, "field": "rows", "rowComponentClass": ExampleRow, "controlComponentClass": ExampleControls }), React.createElement("button", null, "Submit")); }, componentDidMount: function() { return this.listenTo(this.state.model, 'all', (function(_this) { return function() { return _this.forceUpdate(); }; })(this)); }, componentWillUnmount: function() { return this.stopListening(); } }); }).call(this); ;T: metadata{ :dependencieso:Set: @hash{ I"environment-version;TTI"environment-paths;TTI"hprocessors:type=application/javascript&file_type=application/javascript&engines=.cjsx&pipeline=self;TTI"qfile-digest:///Users/joel/src/revelry_core/app/assets/javascripts/revelry/examples/ModelHasManyInput.js.cjsx;TT: requiredo;;{: stubbedo;;{: linkso;;{: charsetI" utf-8;F: digest"%jy(SYV#}&: lengthi:integrityI"Xni:///sha-256;ahXmGHm-FY4oU1kUViO_th6n_hgf7p2KyheIGYR9Jus?ct=application/javascript;T:dependencies_digest"%-׌ Be˞/pg@j:idI"E68d6cd448a1ffea2342e16b474199d0fb726c7d6318255b561e0dbf02b9c65c2;F: mtimel+1U