Sha256: aec6f7044b37337e565152df1361cb88e4deb015e8072cb946c97784d11a5487

Contents?: true

Size: 1.08 KB

Versions: 64

Compression:

Stored size: 1.08 KB

Contents

pageflow.StorylineOutlineView = Backbone.Marionette.Layout.extend({
  template: 'templates/storyline_outline',
  className: 'storyline_outline',

  ui: {
    chapters: 'ul.storyline_outline_chapters'
  },

  events: {
    'click a.add_chapter': function() {
      this.model.scaffoldChapter();
    }
  },

  onRender: function() {
    this.ui.chapters.toggleClass('outline navigatable', !!this.options.navigatable);

    var collectionView = this.options.sortable ? pageflow.SortableCollectionView : pageflow.CollectionView;

    new collectionView({
      el: this.ui.chapters,
      collection: this.model.chapters,
      itemViewConstructor: this.options.navigatable ? pageflow.NavigatableChapterItemView : pageflow.ChapterItemView,
      itemViewOptions: {
        sortable: this.options.sortable,
        pageItemView: this.options.navigatable ? pageflow.NavigatablePageItemView : pageflow.PageItemView,
        pageItemViewOptions: _.extend({
          displayInNavigationHint: this.options.displayInNavigationHint
        }, this.options.pageItemViewOptions || {})
      }
    }).render();
  }
});

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
pageflow-14.0.0.rc1 app/assets/javascripts/pageflow/editor/views/storyline_outline_view.js
pageflow-14.0.0.beta3 app/assets/javascripts/pageflow/editor/views/storyline_outline_view.js
pageflow-14.0.0.beta2 app/assets/javascripts/pageflow/editor/views/storyline_outline_view.js
pageflow-14.0.0.beta1 app/assets/javascripts/pageflow/editor/views/storyline_outline_view.js
pageflow-13.6.0 app/assets/javascripts/pageflow/editor/views/storyline_outline_view.js
pageflow-13.5.0 app/assets/javascripts/pageflow/editor/views/storyline_outline_view.js
pageflow-13.4.0 app/assets/javascripts/pageflow/editor/views/storyline_outline_view.js
pageflow-13.3.0 app/assets/javascripts/pageflow/editor/views/storyline_outline_view.js
pageflow-13.2.0 app/assets/javascripts/pageflow/editor/views/storyline_outline_view.js
pageflow-12.6.0 app/assets/javascripts/pageflow/editor/views/storyline_outline_view.js
pageflow-13.1.0 app/assets/javascripts/pageflow/editor/views/storyline_outline_view.js
pageflow-12.5.0 app/assets/javascripts/pageflow/editor/views/storyline_outline_view.js
pageflow-12.4.1 app/assets/javascripts/pageflow/editor/views/storyline_outline_view.js
pageflow-13.0.0 app/assets/javascripts/pageflow/editor/views/storyline_outline_view.js
pageflow-13.0.0.rc1 app/assets/javascripts/pageflow/editor/views/storyline_outline_view.js
pageflow-12.4.0 app/assets/javascripts/pageflow/editor/views/storyline_outline_view.js
pageflow-12.3.0 app/assets/javascripts/pageflow/editor/views/storyline_outline_view.js
pageflow-13.0.0.beta7 app/assets/javascripts/pageflow/editor/views/storyline_outline_view.js
pageflow-13.0.0.beta6 app/assets/javascripts/pageflow/editor/views/storyline_outline_view.js
pageflow-13.0.0.beta5 app/assets/javascripts/pageflow/editor/views/storyline_outline_view.js