mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 04:26:41 -04:00
74 lines
No EOL
1.4 KiB
JavaScript
74 lines
No EOL
1.4 KiB
JavaScript
var thumbnailProperty = {
|
|
propertyName: 'thumbnailUrl',
|
|
propertySchema: {
|
|
type: String,
|
|
optional: true,
|
|
autoform: {
|
|
editable: true,
|
|
type: 'bootstrap-postthumbnail'
|
|
}
|
|
}
|
|
}
|
|
addToPostSchema.push(thumbnailProperty);
|
|
|
|
var mediaProperty = {
|
|
propertyName: 'media',
|
|
propertySchema: {
|
|
type: Object,
|
|
optional: true,
|
|
blackbox: true,
|
|
hidden: true,
|
|
autoform: {
|
|
omit: true
|
|
}
|
|
}
|
|
}
|
|
addToPostSchema.push(mediaProperty);
|
|
|
|
postThumbnail.push({
|
|
template: 'postThumbnail',
|
|
order: 15
|
|
});
|
|
|
|
var embedlyKeyProperty = {
|
|
propertyName: 'embedlyKey',
|
|
propertySchema: {
|
|
type: String,
|
|
optional: true,
|
|
autoform: {
|
|
group: 'embedly',
|
|
private: true
|
|
}
|
|
}
|
|
}
|
|
addToSettingsSchema.push(embedlyKeyProperty);
|
|
|
|
var thumbnailWidthProperty = {
|
|
propertyName: 'thumbnailWidth',
|
|
propertySchema: {
|
|
type: Number,
|
|
optional: true,
|
|
autoform: {
|
|
group: 'embedly'
|
|
}
|
|
}
|
|
}
|
|
addToSettingsSchema.push(thumbnailWidthProperty);
|
|
|
|
var thumbnailHeightProperty = {
|
|
propertyName: 'thumbnailHeight',
|
|
propertySchema: {
|
|
type: Number,
|
|
optional: true,
|
|
autoform: {
|
|
group: 'embedly'
|
|
}
|
|
}
|
|
}
|
|
addToSettingsSchema.push(thumbnailHeightProperty);
|
|
|
|
// add callback that adds "has-thumbnail" or "no-thumbnail" CSS classes
|
|
postClassCallbacks.push(function (post, postClass){
|
|
var thumbnailClass = !!post.thumbnailUrl ? "has-thumbnail" : "no-thumbnail";
|
|
return postClass + " " + thumbnailClass;
|
|
}); |