Sha256: 1bc00c26f025a6a35d1113999b2f7d6288099a87aab80ebeb2c6bef325d1ca85
Contents?: true
Size: 1.14 KB
Versions: 64
Compression:
Stored size: 1.14 KB
Contents
pageflow.EditChapterView = Backbone.Marionette.Layout.extend({ template: 'templates/edit_chapter', className: 'edit_chapter', mixins: [pageflow.failureIndicatingView], regions: { formContainer: '.form_container' }, events: { 'click a.back': 'goBack', 'click a.destroy': 'destroy' }, onRender: function() { var configurationEditor = new pageflow.ConfigurationEditorView({ model: this.model.configuration }); this.configure(configurationEditor); this.formContainer.show(configurationEditor); }, configure: function(configurationEditor) { var view = this; configurationEditor.tab('general', function() { this.input('title', pageflow.TextInputView, { model: view.model }); if (pageflow.features.isEnabled('chapter_hierachy')) { this.input('display_parent_page_button', pageflow.CheckBoxInputView); } }); }, destroy: function() { if (confirm(I18n.t('pageflow.editor.views.edit_chapter_view.confirm_destroy'))) { this.model.destroy(); this.goBack(); } }, goBack: function() { editor.navigate('/', {trigger: true}); } });
Version data entries
64 entries across 64 versions & 1 rubygems