Sha256: 093c825046fc577a0b3f78f988fa1dbe70c59880ff20862627da4a4b0731fb2a

Contents?: true

Size: 565 Bytes

Versions: 2

Compression:

Stored size: 565 Bytes

Contents

pageflow.externalLinks.Site = Backbone.Model.extend({
  modelName: 'site',
  paramRoot: 'site',
  i18nKey: 'site',

  mixins: [pageflow.failureTracking, pageflow.transientReferences],

  defaults: {
    'open_in_new_tab': true
  },

  initialize: function(attributes, options) {
    this.listenTo(this, 'change', function() {
      this.save();
    });
  },

  urlRoot: function() {
    return this.isNew() ? this.collection.url() : '/external_links/sites';
  },

  getThumbnail: function() {
    return this.getReference('thumbnail', pageflow.imageFiles);
  }
});

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pageflow-external-links-0.1.0 app/assets/javascript/pageflow/external_links/editor/models/site.js
pageflow-external-links-0.0.1 app/assets/javascript/pageflow/external_links/editor/models/site.js