Sha256: eb333d05349c9212bc7eca58b988337b5f8741280ea9000b667fd301b50eb7a7
Contents?: true
Size: 986 Bytes
Versions: 75
Compression:
Stored size: 986 Bytes
Contents
pageflow.ExplorerFileItemView = Backbone.Marionette.ItemView.extend({ tagName: 'li', template: 'templates/explorer_file_item', mixins: [pageflow.loadable, pageflow.selectableView], selectionAttribute: 'file', ui: { fileName: '.file_name', thumbnail: '.file_thumbnail' }, events: { 'click': function() { if (!this.$el.hasClass('disabled')) { this.select(); } } }, modelEvents: { 'change': 'update' }, onRender: function() { this.update(); this.subview(new pageflow.FileThumbnailView({ el: this.ui.thumbnail, model: this.model })); }, update: function() { if (this.isDisabled()) { this.$el.addClass('disabled'); } this.$el.attr('data-id', this.model.id); this.ui.fileName.text(this.model.get('file_name') || '(Unbekannt)'); }, isDisabled: function() { return (this.options.disabledIds && _.contains(this.options.disabledIds, this.model.get('id'))); } });
Version data entries
75 entries across 75 versions & 1 rubygems