pageflow.PageConfigurationFileSelectionHandler = function(options) {
  var page = pageflow.pages.get(options.id);

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

  this.getReferer = function() {
    return '/pages/' + page.id + '/files';
  };
};

pageflow.editor.registerFileSelectionHandler('pageConfiguration', pageflow.PageConfigurationFileSelectionHandler);

pageflow.PageConfigurationFileSelectionHandler = function(options) {
  var page = pageflow.pages.get(options.id);

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

  this.getReferer = function() {
    return '/pages/' + page.id + '/' + (options.returnToTab || 'files');
  };
};

pageflow.editor.registerFileSelectionHandler('pageConfiguration', pageflow.PageConfigurationFileSelectionHandler);

Add returnToTab option to PageConfigurationFileSelectionHandler
Add returnToTab option to PageConfigurationFileSelectionHandler

By default one returns to the files tab after selecting a file to be
used in a page. This option allows to specify a different tab to
return to.
