Page media and File field images thumbnail are now properly proportionate and 150x100

This commit is contained in:
Djamil Legato
2016-10-11 11:24:21 -07:00
parent 0b90065826
commit d8e3e20be8
7 changed files with 22 additions and 19 deletions

View File

@@ -7,6 +7,7 @@
* Add an `onAdminData` event to allow plugins to add additional blueprints data
1. [](#improved)
* Handle errors when a resource fails to install
* Page media and File field images thumbnail are now properly proportionate and 150x100
1. [](#bugfix)
* Fix [#1034](https://github.com/getgrav/grav/issues/1034) redirect of page creation procedure when system.home.hide_in_urls is enabled
* Media (Page): Do not extend parent metehod for sending files since Safari and IE API for FormData dont implement `delete` ([#772](https://github.com/getgrav/grav-plugin-admin/issues/772))

View File

@@ -69,7 +69,7 @@ export default class FilePickerField {
let renderOption = function renderOption(item, escape) {
let image = '';
if (imagesPreview && folder && item.status == 'available' && item.name.match(/\.(jpg|jpeg|png|gif)$/i)) {
if (imagesPreview && folder && item.status === 'available' && item.name.match(/\.(jpg|jpeg|png|gif)$/i)) {
image = `
<img class="filepicker-field-image"
src="${config.base_url_relative}/../${folder}/${item.name}"/>`;

View File

@@ -46,7 +46,9 @@ Dropzone.confirm = (question, accepted, rejected) => {
};
const DropzoneMediaConfig = {
createImageThumbnails: { thumbnailWidth: 150 },
createImageThumbnails: { },
thumbnailWidth: 150,
thumbnailHeight: 100,
addRemoveLinks: false,
dictDefaultMessage: translations.PLUGIN_ADMIN.DROP_FILES_HERE_TO_UPLOAD,
dictRemoveFileConfirmation: '[placeholder]',

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
/* The MIT License */
$preview-width: 150px;
$preview-height: 150px;
$preview-height: 100px;
.dropzone {
position: relative;