Skip to content

Commit

Permalink
Merge b10543a into bebc086
Browse files Browse the repository at this point in the history
  • Loading branch information
tf committed Feb 7, 2017
2 parents bebc086 + b10543a commit 9b51fd9
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
pageflow.ConfigurationEditorTabView.groups.define('background', function(options) {
options = options || {};

var prefix = options.propertyNamePrefix ? options.propertyNamePrefix + '_' : '';
var backgroundTypeProperty = prefix + 'background_type';

this.input(backgroundTypeProperty, pageflow.SelectInputView, {
values: ['image', 'video'],
ensureValueDefined: true
});
this.input(prefix + 'background_image_id', pageflow.FileInputView, {
collection: pageflow.imageFiles,
visibleBinding: backgroundTypeProperty,
visibleBindingValue: 'image',
fileSelectionHandlerOptions: options
});
this.input(prefix + 'video_file_id', pageflow.FileInputView, {
collection: pageflow.videoFiles,
visibleBinding: backgroundTypeProperty,
visibleBindingValue: 'video',
fileSelectionHandlerOptions: options
});
this.input(prefix + 'poster_image_id', pageflow.FileInputView, {
collection: pageflow.imageFiles,
visibleBinding: backgroundTypeProperty,
visibleBindingValue: 'video',
fileSelectionHandlerOptions: options
});
this.input(prefix + 'mobile_poster_image_id', pageflow.FileInputView, {
collection: pageflow.imageFiles,
visibleBinding: backgroundTypeProperty,
visibleBindingValue: 'video',
fileSelectionHandlerOptions: options
});
});
8 changes: 8 additions & 0 deletions config/locales/new/background_types.de.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
de:
pageflow:
common_page_attributes:
background_type:
label: Hintergrund-Typ
values:
image: Hintergrund-Bild
video: Hintergrund-Video

0 comments on commit 9b51fd9

Please sign in to comment.