Sha256: de757e78d2dd59fa181edca5abb4d91410c590d270fe5a6b5a769b5c9d6ffab4
Contents?: true
Size: 1.03 KB
Versions: 58
Compression:
Stored size: 1.03 KB
Contents
/** @api private */ pageflow.DropDownButtonItemView = Backbone.Marionette.ItemView.extend({ template: 'pageflow/editor/templates/drop_down_button_item', tagName: 'li', className: 'drop_down_button_item', ui: { link: '> a', label: '> .label' }, events: { 'click > a': function() { if (!this.model.get('disabled')) { this.model.selected(); } return false; } }, modelEvents: { change: 'update' }, onRender: function() { this.update(); if (this.model.get('items')) { this.appendSubview(new pageflow.DropDownButtonItemListView({ items: this.model.get('items') })); } }, update: function() { this.ui.link.text(this.model.get('label')); this.ui.label.text(this.model.get('label')); this.$el.toggleClass('is_selectable', !!this.model.selected); this.$el.toggleClass('is_disabled', !!this.model.get('disabled')); this.$el.toggleClass('is_checked', !!this.model.get('checked')); this.$el.data('name', this.model.get('name')); } });
Version data entries
58 entries across 58 versions & 1 rubygems