Sha256: e551a62b6b13e96b7c6360cdc6240fd3833189ac8ede5d4c5a0fdc75b5f79ccb
Contents?: true
Size: 851 Bytes
Versions: 3
Compression:
Stored size: 851 Bytes
Contents
// Create a composer for a given field on the model. // // Example: // // {{#composer field="ingredients"}} // <input type="text" // name="name" // placeholder="Name (e.g. Cheese)..." // value="{{name}}"> // <input type="text" // name="amount" // placeholder="Amount (e.g. 10kg)..." // value="{{amount}}"> // {{/composer}} // Handlebars.registerHelper('composer', function(options) { var view = new slices.ComposerView({ id : slices.fieldId(this, options.hash.field), value : this[options.hash.field], min : options.hash.min, max : options.hash.max, fields : options.fn, addLabel : options.hash.addLabel, autoAttach : true }); return new Handlebars.SafeString(view.placeholder()); });
Version data entries
3 entries across 3 versions & 1 rubygems