Sha256: 2682bc175d69d3a2aa206b83b6759991adf826776c6702a150098ef0f73d66a1
Contents?: true
Size: 621 Bytes
Versions: 10
Compression:
Stored size: 621 Bytes
Contents
pageflow.selectableView = { initialize: function() { this.listenTo(this.options.selection, 'change:' + this.model.modelName, function(selection, selectedModel) { this.$el.toggleClass('active', selectedModel === this.model); }); this.$el.toggleClass('active', this.options.selection.get(this.model.modelName) === this.model); }, select: function() { this.options.selection.set(this.model.modelName, this.model); }, onClose: function() { if (this.options.selection.get(this.model.modelName) === this.model) { this.options.selection.set(this.model.modelName, null); } } };
Version data entries
10 entries across 10 versions & 1 rubygems