Sha256: 91dcda0651ff88e751f70932e781da3230759e4b46a85635b7005db9d8a2556d
Contents?: true
Size: 446 Bytes
Versions: 154
Compression:
Stored size: 446 Bytes
Contents
Spree.Views.Cart.AddLineItemButton = Backbone.View.extend({ initialize: function() { this.listenTo(this.collection, 'update', this.render); this.render(); }, events: { "click": "onClick" }, onClick: function() { this.collection.push({}); }, render: function() { var isNew = function(item) { return item.isNew() }; this.$el.prop("disabled", !this.collection.length || this.collection.some(isNew)); } });
Version data entries
154 entries across 154 versions & 2 rubygems