Sha256: d288e02100af26f3e7e6f5f0ab3d528eb233e36e6d0fa2c941ebb785072a6285

Contents?: true

Size: 533 Bytes

Versions: 7

Compression:

Stored size: 533 Bytes

Contents

pageflow.internalLinks.PageLinkFileSelectionHandler = function(options) {
  var page = pageflow.pages.get(options.id);
  var pageLink = page.pageLinks().get(options.pageLinkId);

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

  this.getReferer = function() {
    return '/internal_links_pages/' + options.id + '/page_links/' + options.pageLinkId;
  };
};

pageflow.editor.registerFileSelectionHandler(
  'internalLinks.pageLink',
  pageflow.internalLinks.PageLinkFileSelectionHandler
);

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pageflow-internal-links-1.6.0 app/assets/javascripts/pageflow/internal_links/editor/models/page_link_file_selection_handler.js
pageflow-internal-links-1.5.0 app/assets/javascripts/pageflow/internal_links/editor/models/page_link_file_selection_handler.js
pageflow-internal-links-1.4.0 app/assets/javascripts/pageflow/internal_links/editor/models/page_link_file_selection_handler.js
pageflow-internal-links-1.3.0 app/assets/javascripts/pageflow/internal_links/editor/models/page_link_file_selection_handler.js
pageflow-internal-links-1.2.0 app/assets/javascripts/pageflow/internal_links/editor/models/page_link_file_selection_handler.js
pageflow-internal-links-1.1.0 app/assets/javascripts/pageflow/internal_links/editor/models/page_link_file_selection_handler.js
pageflow-internal-links-1.0.0 app/assets/javascripts/pageflow/internal_links/editor/models/page_link_file_selection_handler.js