codevise/pageflow

View on GitHub
entry_types/scrolled/package/src/editor/models/ContentElementFileSelectionHandler.js

Summary

Maintainability
A
3 hrs
Test Coverage
export const ContentElementFileSelectionHandler = function(options) {
  const contentElement = options.entry.contentElements.get(options.id);

  this.call = function(file) {
    contentElement.configuration.setReference(options.attributeName, file);
  };

  this.getReferer = function() {
    return '/scrolled/content_elements/' + contentElement.id;
  };
};