Sha256: 750b35f88512a0495942b86c197b2bad8b5fd1c370952b7b6f908cacc7628d0f

Contents?: true

Size: 770 Bytes

Versions: 12

Compression:

Stored size: 770 Bytes

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() {
    this.formContainer.show(new pageflow.TextInputView({
      model: this.model,
      propertyName: 'title'
    }));
  },

  destroy: function() {
    if (confirm("Kapitel einschließlich ALLER enthaltener Seiten wirklich löschen?\n\nDieser Schritt kann nicht rückgängig gemacht werden.")) {
      this.model.destroy();
      this.goBack();
    }
  },

  goBack: function() {
    editor.navigate('/', {trigger: true});
  }
});

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pageflow-0.6.0 app/assets/javascripts/pageflow/editor/views/edit_chapter_view.js
pageflow-0.5.0 app/assets/javascripts/pageflow/editor/views/edit_chapter_view.js
pageflow-0.4.0 app/assets/javascripts/pageflow/editor/views/edit_chapter_view.js
pageflow-0.3.0 app/assets/javascripts/pageflow/editor/views/edit_chapter_view.js
pageflow-0.2.1 app/assets/javascripts/pageflow/editor/views/edit_chapter_view.js
pageflow-0.2.0 app/assets/javascripts/pageflow/editor/views/edit_chapter_view.js
pageflow-0.1.0 app/assets/javascripts/pageflow/editor/views/edit_chapter_view.js
pageflow-0.0.5 app/assets/javascripts/pageflow/editor/views/edit_chapter_view.js
pageflow-0.0.4 app/assets/javascripts/pageflow/editor/views/edit_chapter_view.js
pageflow-0.0.3 app/assets/javascripts/pageflow/editor/views/edit_chapter_view.js
pageflow-0.0.2 app/assets/javascripts/pageflow/editor/views/edit_chapter_view.js
pageflow-0.0.1 app/assets/javascripts/pageflow/editor/views/edit_chapter_view.js