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