Sha256: d56b2fe3a81976cfaf26c9298e049dad7a1ada250cd411cc8d045a24804ec0ad

Contents?: true

Size: 1.21 KB

Versions: 3

Compression:

Stored size: 1.21 KB

Contents

pageflow.PageConfigurationFileSelectionHandler = function(options) {
  pageflow.ConfigurationEditorView.register('audio_loop', {
    configure: function() {
      this.tab('general', function() {
        this.group('general');

        this.input('additional_title', pageflow.TextInputView);
        this.input('additional_description', pageflow.TextAreaInputView, {size: 'short'});
      });

      this.tab('files', function() {
        this.input('audio_file_id', pageflow.FileInputView, {collection: pageflow.audioFiles});
        this.input('background_image_id', pageflow.FileInputView, {collection: pageflow.imageFiles});
        this.input('thumbnail_image_id', pageflow.FileInputView, {
          collection: pageflow.imageFiles,
          imagePositioning: false
        });
      });

      this.tab('options', function() {
        this.group('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);

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pageflow-0.5.0 app/assets/javascripts/pageflow/editor/models/page_configuration_file_selection_handler.js
pageflow-0.4.0 app/assets/javascripts/pageflow/editor/models/page_configuration_file_selection_handler.js
pageflow-0.3.0 app/assets/javascripts/pageflow/editor/models/page_configuration_file_selection_handler.js