Sha256: 09af1ef9dafea6a2bb302dc87aec04085ea6cd00ff035c89020f1cfdf3732faa
Contents?: true
Size: 1.44 KB
Versions: 13
Compression:
Stored size: 1.44 KB
Contents
pageflow.linkmapPage.AreasListView = Backbone.Marionette.View.extend({ className: 'linkmap_page_areas_list', render: function() { this.model.linkmapAreas().resetSelection(); this.subview(new pageflow.linkmapPage.EditableAreasModeView({ model: this.model.page })); this.appendSubview(new pageflow.ListView({ label: I18n.t('pageflow.linkmap_page.editor.views.areas_list.label'), collection: this.model.linkmapAreas(), highlight: true, sortable: true, onEdit: function(model) { pageflow.editor.navigate(model.editPath(), {trigger: true}); }, itemDescription: function(area) { return area.label(); }, itemTypeName: function(area) { return { 'audio_file': 'audio', 'page': 'internal_links_list', 'external_site': 'external_links', 'text_only': 'text_only' }[area.get('target_type')]; }, itemTypeDescription: function(area) { return I18n.t('pageflow.linkmap_page.editor.area_types.' + area.get('target_type')); }, itemIsInvalid: function(area) { return !area.target() && area.get('target_type') !== 'text_only'; }, })); this.appendSubview(new pageflow.DropDownButtonView({ sortable: true, label: I18n.t('pageflow.linkmap_page.editor.views.areas_list.add'), items: pageflow.linkmapPage.areaTypesFor(this.model) })); return this; } });
Version data entries
13 entries across 13 versions & 1 rubygems