Files
Grav-Admin-Plugin/themes/grav/app/forms/fields/index.js

84 lines
2.6 KiB
JavaScript
Raw Normal View History

import FilepickerField, { Instance as FilepickerFieldInstance } from './filepicker';
2016-02-01 11:27:34 -08:00
import SelectizeField, { Instance as SelectizeFieldInstance } from './selectize';
import ArrayField, { Instance as ArrayFieldInstance } from './array';
import CollectionsField, { Instance as CollectionsFieldInstance } from './collections';
2016-02-05 23:49:39 -08:00
import DateTimeField, { Instance as DateTimeFieldInstance } from './datetime';
2016-02-26 15:54:06 -08:00
import EditorField, { Instance as EditorFieldInstance } from './editor';
import ColorpickerField, { Instance as ColorpickerFieldInstance } from './colorpicker';
[WIP] Ajax Files Upload (#748) * Reworked the `file` field. All files get uploaded via Ajax and are stored upon Save This improves the Save task tremendously as now there is no longer the need of waiting for the files to finish uploading. Fully backward compatible, `file` field now includes also a `limit` and `filesize` option in the blueprints. The former determines how many files are allowed to be uploaded when in combination with `multiple: true` (default: 10), the latter determines the file size limit (in MB) allowed for each file (default: 5MB) * Added support for `accept: [‘*’]` to allow any file type * Minor tweaks in the comments and messages * Delete any orphan file when discarding the uploaded files session * Minor optimization * Fixed issue with `_json` elements where nested fields merging would get stored in an unexpected way * Potential fix for wrong order of value in Datetime * Fixed nested fields for files * Fixed tmp streams * Minor cleanup * Update JSON data when removing a file. Implemented task to remove files that haven’t been saved yet, from the flash object session * Ensure temporary files are deleted when removing un-saved files from the flash object session * Fixed wrong reference of HTML file field when clicking on the drop zone area to pick a file * Added JSON template for pages * fix a CSS issue in page order * More CSS fixes * Trigger file field mutation when adding or removing a file * Recompiled JS * Removed twig templates that are no longer needed * Fixed issue with nested header fields in a page, not properly merging data * [internal] Fixed issue with collections not capable of handling both param and dot notations at the same time * Reorganized FileField structure to be more consistent with the other fields * Added support for dynamically created file fields (ie, autoinitialization on new lists items) * Added translationable strings for file uploads errors * Added translasions for all Dropzone available strings * Changed default values
2016-08-29 11:12:09 -07:00
import FilesField, { Instance as FilesFieldInstance } from './files';
import MediapickerField, { Instance as MediapickerInstance } from './mediapicker';
import MultilevelField, { Instance as MultilevelInstance } from './multilevel';
import SelectUniqueField, { Instance as SelectUniqueInstance } from './selectunique';
2017-07-11 15:59:39 -06:00
import IconpickerField, { Instance as IconpickerInstance } from './iconpicker';
import CronField, { Instance as CronFieldInstance } from './cron';
import TextField, { Instance as TextFieldInstance } from './text';
import ParentsField, { Instance as ParentsFieldInstance } from './parents';
2016-02-01 11:27:34 -08:00
import './acl-picker';
import './permissions';
import './indeterminate';
2016-02-01 11:27:34 -08:00
export default {
FilepickerField: {
FilepickerField,
Instance: FilepickerFieldInstance
},
2016-02-01 11:27:34 -08:00
SelectizeField: {
SelectizeField,
Instance: SelectizeFieldInstance
},
ArrayField: {
ArrayField,
Instance: ArrayFieldInstance
},
CollectionsField: {
CollectionsField,
Instance: CollectionsFieldInstance
2016-02-05 23:49:39 -08:00
},
DateTimeField: {
DateTimeField,
Instance: DateTimeFieldInstance
2016-02-26 15:54:06 -08:00
},
EditorField: {
EditorField,
Instance: EditorFieldInstance
},
ColorpickerField: {
ColorpickerField,
Instance: ColorpickerFieldInstance
[WIP] Ajax Files Upload (#748) * Reworked the `file` field. All files get uploaded via Ajax and are stored upon Save This improves the Save task tremendously as now there is no longer the need of waiting for the files to finish uploading. Fully backward compatible, `file` field now includes also a `limit` and `filesize` option in the blueprints. The former determines how many files are allowed to be uploaded when in combination with `multiple: true` (default: 10), the latter determines the file size limit (in MB) allowed for each file (default: 5MB) * Added support for `accept: [‘*’]` to allow any file type * Minor tweaks in the comments and messages * Delete any orphan file when discarding the uploaded files session * Minor optimization * Fixed issue with `_json` elements where nested fields merging would get stored in an unexpected way * Potential fix for wrong order of value in Datetime * Fixed nested fields for files * Fixed tmp streams * Minor cleanup * Update JSON data when removing a file. Implemented task to remove files that haven’t been saved yet, from the flash object session * Ensure temporary files are deleted when removing un-saved files from the flash object session * Fixed wrong reference of HTML file field when clicking on the drop zone area to pick a file * Added JSON template for pages * fix a CSS issue in page order * More CSS fixes * Trigger file field mutation when adding or removing a file * Recompiled JS * Removed twig templates that are no longer needed * Fixed issue with nested header fields in a page, not properly merging data * [internal] Fixed issue with collections not capable of handling both param and dot notations at the same time * Reorganized FileField structure to be more consistent with the other fields * Added support for dynamically created file fields (ie, autoinitialization on new lists items) * Added translationable strings for file uploads errors * Added translasions for all Dropzone available strings * Changed default values
2016-08-29 11:12:09 -07:00
},
FilesField: {
FilesField,
Instance: FilesFieldInstance
},
SelectUniqueField: {
SelectUniqueField,
Instance: SelectUniqueInstance
},
MediapickerField: {
MediapickerField,
Instance: MediapickerInstance
},
MultilevelField: {
MultilevelField,
Instance: MultilevelInstance
2017-07-11 15:59:39 -06:00
},
IconpickerField: {
IconpickerField,
Instance: IconpickerInstance
},
2019-06-01 20:23:22 -07:00
CronField: {
CronField,
Instance: CronFieldInstance
},
2019-06-01 20:23:22 -07:00
TextField: {
TextField,
Instance: TextFieldInstance
},
ParentsField: {
ParentsField,
Instance: ParentsFieldInstance
2016-02-01 11:27:34 -08:00
}
};