Sha256: cef7c8d5f47be5797fee4202c016f37557a954252f272e306dd375bc9a732bc1
Contents?: true
Size: 1.14 KB
Versions: 12
Compression:
Stored size: 1.14 KB
Contents
pageflow.EditPageView = Backbone.Marionette.Layout.extend({ template: 'templates/edit_page', className: 'edit_page', mixins: [pageflow.failureIndicatingView], regions: { pageTypeContainer: '.page_type', configurationContainer: '.configuration_container' }, events: { 'click a.back': 'goBack', 'click a.destroy': 'destroy' }, modelEvents: { 'change:template': 'load' }, onRender: function() { this.pageTypeContainer.show(new pageflow.SelectInputView({ model: this.model, propertyName: 'template', collection: pageflow.Page.types, valueProperty: 'name', translationKeyProperty: 'translation_key', })); this.load(); this.model.trigger('edit', this.model); }, load: function() { this.configurationContainer.show(pageflow.ConfigurationEditorView.create(this.model.get('template'), { model: this.model.configuration, tab: this.options.tab })); }, destroy: function() { if (confirm("Seite wirklich löschen?")) { this.model.destroy(); this.goBack(); } }, goBack: function() { editor.navigate('/', {trigger: true}); } });
Version data entries
12 entries across 12 versions & 1 rubygems