Sha256: c4cbe34d64682d97e4aa77a9805b3596426b5b0860a1715f0b403a89c62d78f4
Contents?: true
Size: 1.06 KB
Versions: 16
Compression:
Stored size: 1.06 KB
Contents
pageflow.EditPageLinkView = Backbone.Marionette.Layout.extend({ template: 'pageflow/editor/templates/edit_page_link', regions: { formContainer: '.form_container' }, ui: { backButton: 'a.back' }, events: { 'click a.back': 'goBack', 'click a.destroy': 'destroy' }, onRender: function() { var pageType = this.options.api.pageTypes.findByPage(this.options.page); var configurationEditor = pageType.createPageLinkConfigurationEditorView({ model: this.model, page: this.options.page }); this.formContainer.show(configurationEditor); this.highlight(); }, highlight: function() { this.model.highlight(); this.listenTo(this, 'close', function() { this.model.resetHighlight(); }); }, destroy: function() { if (confirm(I18n.t('pageflow.internal_links.editor.views.edit_page_link_view.confirm_destroy'))) { this.model.remove(); this.goBack(); } }, goBack: function() { pageflow.editor.navigate('/pages/' + this.options.page.id + '/links', {trigger: true}); } });
Version data entries
16 entries across 16 versions & 1 rubygems