mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-07 13:07:13 +02:00
Including EXIF JS library in the modules dependencies to fix orientation when uploading images
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# v1.8.4
|
||||
## mm/dd/2018
|
||||
|
||||
1. [](#improved)
|
||||
* Including EXIF JS library in the modules dependencies to fix orientation when uploading images
|
||||
1. [](#bugfix)
|
||||
* Force a `null` order when empty in the post request
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import Dropzone from 'dropzone';
|
||||
import EXIF from 'exif-js';
|
||||
import request from '../../utils/request';
|
||||
import { config, translations } from 'grav-config';
|
||||
|
||||
@@ -70,6 +71,8 @@ const DropzoneMediaConfig = {
|
||||
</div>`.trim()
|
||||
};
|
||||
|
||||
global.EXIF = EXIF;
|
||||
|
||||
const ACCEPT_FUNC = function(file, done, settings) {
|
||||
const resolution = settings.resolution;
|
||||
if (!resolution) return done();
|
||||
|
||||
@@ -20,7 +20,7 @@ export default class SelectizeField {
|
||||
let field = (isInput ? element : element.find('input, select'));
|
||||
|
||||
if (!field.length || field.get(0).selectize) { return; }
|
||||
const plugins = $.merge(data.plugins ? data.plugins: [], ['required-fix']);
|
||||
const plugins = $.merge(data.plugins ? data.plugins : [], ['required-fix']);
|
||||
field.selectize($.extend({}, data, { plugins }));
|
||||
|
||||
this.elements.push(field.data('selectize'));
|
||||
|
||||
30
themes/grav/js/admin.min.js
vendored
30
themes/grav/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -22,6 +22,7 @@
|
||||
"eonasdan-bootstrap-datetimepicker": "^4.17.47",
|
||||
"es6-map": "^0.1.5",
|
||||
"es6-promise": "^4.1.1",
|
||||
"exif-js": "^2.3.0",
|
||||
"gemini-scrollbar": "^1.5.2",
|
||||
"immutable": "^3.8.1",
|
||||
"immutablediff": "^0.4.4",
|
||||
|
||||
@@ -1744,6 +1744,10 @@ events@^1.0.0:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924"
|
||||
|
||||
exif-js@^2.3.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/exif-js/-/exif-js-2.3.0.tgz#9d10819bf571f873813e7640241255ab9ce1a814"
|
||||
|
||||
expand-brackets@^0.1.4:
|
||||
version "0.1.5"
|
||||
resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
|
||||
|
||||
Reference in New Issue
Block a user