2014-08-29 10:37:35 +09:00
|
|
|
var thumbnailProperty = {
|
|
|
|
propertyName: 'thumbnailUrl',
|
|
|
|
propertySchema: {
|
|
|
|
type: String,
|
2014-12-06 11:56:57 +09:00
|
|
|
optional: true,
|
2014-10-06 10:40:45 +09:00
|
|
|
autoform: {
|
2014-12-06 11:56:57 +09:00
|
|
|
editable: true,
|
2014-11-29 15:24:01 +09:00
|
|
|
type: 'bootstrap-postthumbnail'
|
2014-10-06 10:40:45 +09:00
|
|
|
}
|
2014-08-29 10:37:35 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
addToPostSchema.push(thumbnailProperty);
|
|
|
|
|
|
|
|
var mediaProperty = {
|
|
|
|
propertyName: 'media',
|
|
|
|
propertySchema: {
|
|
|
|
type: Object,
|
|
|
|
optional: true,
|
2014-10-05 17:20:15 +09:00
|
|
|
blackbox: true,
|
|
|
|
hidden: true,
|
|
|
|
autoform: {
|
2014-10-06 10:40:45 +09:00
|
|
|
omit: true
|
2014-10-05 17:20:15 +09:00
|
|
|
}
|
2014-08-29 10:37:35 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
addToPostSchema.push(mediaProperty);
|
|
|
|
|
2014-12-13 17:43:52 +09:00
|
|
|
postThumbnail.push({
|
2015-03-28 18:30:26 +09:00
|
|
|
template: 'postThumbnail',
|
2014-12-13 17:43:52 +09:00
|
|
|
order: 15
|
2014-08-29 10:37:35 +09:00
|
|
|
});
|
|
|
|
|
|
|
|
var embedlyKeyProperty = {
|
|
|
|
propertyName: 'embedlyKey',
|
|
|
|
propertySchema: {
|
|
|
|
type: String,
|
2014-09-28 16:31:12 +09:00
|
|
|
optional: true,
|
|
|
|
autoform: {
|
2014-12-04 13:36:06 +09:00
|
|
|
group: 'embedly',
|
|
|
|
private: true
|
2014-09-28 16:31:12 +09:00
|
|
|
}
|
2014-08-29 10:37:35 +09:00
|
|
|
}
|
|
|
|
}
|
2015-03-28 18:30:26 +09:00
|
|
|
Settings.addToSchema(embedlyKeyProperty);
|
2014-11-30 11:31:07 +09:00
|
|
|
|
|
|
|
var thumbnailWidthProperty = {
|
|
|
|
propertyName: 'thumbnailWidth',
|
|
|
|
propertySchema: {
|
|
|
|
type: Number,
|
|
|
|
optional: true,
|
|
|
|
autoform: {
|
|
|
|
group: 'embedly'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-03-28 18:30:26 +09:00
|
|
|
Settings.addToSchema(thumbnailWidthProperty);
|
2014-11-30 11:31:07 +09:00
|
|
|
|
|
|
|
var thumbnailHeightProperty = {
|
|
|
|
propertyName: 'thumbnailHeight',
|
|
|
|
propertySchema: {
|
|
|
|
type: Number,
|
|
|
|
optional: true,
|
|
|
|
autoform: {
|
|
|
|
group: 'embedly'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-03-28 18:30:26 +09:00
|
|
|
Settings.addToSchema(thumbnailHeightProperty);
|
2015-01-19 11:40:27 +09:00
|
|
|
|
|
|
|
// 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;
|
2015-03-28 18:30:26 +09:00
|
|
|
});
|