Sha256: 29cbfe9df04dd1139074693c8c620ad74c9c2331a43233463fd32676a68dc861

Contents?: true

Size: 808 Bytes

Versions: 3

Compression:

Stored size: 808 Bytes

Contents

pageflow.externalLinks.SiteReferenceInputView = Backbone.Marionette.ItemView.extend({
  mixins: [pageflow.inputView],

  template: 'pageflow/external_links/editor/templates/inputs/site_reference',
  className: 'external_links_site_reference_input',

  ui: {
    sites: 'ul.sites'
  },

  events: {
    'click .add_reference': function() {
      pageflow.editor.navigate(
        '/external_links/sites?page=' + this.model.page.id,
        {trigger: true}
      );
      return false;
    }
  },

  onRender: function() {
    this.subview(new pageflow.SortableCollectionView({
      el: this.ui.sites,
      collection: this.model.externalSiteReferences(),
      itemViewConstructor: pageflow.externalLinks.SiteReferenceItemView,
      itemViewOptions: {
        page: this.model.page
      }
    }));
  }
});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pageflow-external-links-0.2.0 app/assets/javascripts/pageflow/external_links/editor/views/inputs/site_reference_input_view.js
pageflow-external-links-0.1.0 app/assets/javascript/pageflow/external_links/editor/views/inputs/site_reference_input_view.js
pageflow-external-links-0.0.1 app/assets/javascript/pageflow/external_links/editor/views/inputs/site_reference_input_view.js