Commit Graph

25 Commits

Author SHA1 Message Date
Djamil Legato
25e91cff23 Implemented js logic to handle new elements field 2022-01-07 21:49:32 -08:00
Djamil Legato
e16f1243cc Added refresh action button for Folder to ease the regeneration of the slug based on the title. Available also as API entry Grav.default.Forms.Fields.FolderField.Regenerate() (#1738) 2021-04-20 15:45:56 -07:00
Djamil Legato
c45e9bd45e Fixed and enhanced Range field to be Lists compatible (fixes #2062) 2021-03-22 17:59:13 -07:00
Djamil Legato
5cc2216185 Upgraded node dependencies to latest version. Improved speed of JS compilation. 2020-11-18 13:36:30 -08:00
Djamil Legato
3765f10b71 Added logic to handle parents in permissions field 2020-01-31 12:56:56 -08:00
Djamil Legato
35913e72c8 (CRUDP): Initial page permissions crudp field 2020-01-27 13:05:06 -08:00
Djamil Legato
b018795218 (field: page_access —> acl_picker): made field reusable. Added basic logic to handle different data sources 2020-01-22 14:25:47 -08:00
Djamil Legato
d3a9d98308 Added custom field logic for Page Access 2020-01-17 16:24:55 -08:00
Djamil Legato
dc8ad80c84 More parent field improvements 2019-06-01 20:23:22 -07:00
Djamil Legato
09f5dbbcc0 Inizial rework and implementation of parent field as finder 2019-06-01 00:32:36 -07:00
Andy Miller
c66619dd21 respect size with append/prepend + added copy-to-clipboard JS 2019-05-03 12:15:01 -06:00
Andy Miller
22fd8f49ac Feature/scheduler (#1512)
* Initial commit

* basic cronstatus

* updaetd cronstatus field

* jquery-cron js

* More compact custom list

* Added placeholder for new cron field

* ui tweaks

* New custom cron field. Implemented lang for field. Fixed  typos

* minor alignment stuff
2018-09-06 12:24:48 -06:00
Andy Miller
63275849ac Initial commit 2017-07-11 15:59:39 -06:00
Flavio Copes
ffb3097721 Add multilevel form field (#1135)
Example definition in blueprint:

```yaml
    content:
        type: multilevel
        label: Multi Level
        style: vertical
        validate:
          type: array
```
2017-06-27 13:39:09 +02:00
Flavio Copes
f700837e92 Introduce the mediapicker field (#1125)
Added a new `mediapicker` form field which allows to select a media from any page
+ 
Provided an option to control how parent select field displays
2017-06-02 16:28:52 +02:00
Djamil Legato
9bfb9e27d5 Added logic to uniquely select values with selectunique 2017-05-23 18:30:56 -07:00
Flavio Copes
8a39b36603 Filepicker form field (#750)
# What this PR introduces
This PR introduces a `filepicker` field which is a replacement for the `pagemediaselect` field. 

This field loads the files list via AJAX each time it's triggered. This means you can now upload a file via FTP or via Admin and the new file is immediately available to be selected.

Previously, `pagemediaselect` required a page reload to see the newly added files.
--

### Options

#### `accept`

`accept` allows file extensions. For example, to only allow `yaml` and `json` files:

```yaml
accept:
  - .yaml
  - .json
```

By default, any file is listed.

#### `folder`
```yaml
folder: 'user/plugins/testing`
```

folder has been enhanced to allow `self@` as well as `page@:` and `theme@:` prefixes.
Example of usage, assuming we have a blog item at the route `/blog/ajax-upload` (physical location being `user/pages/02.blog/ajax-upload`), with the `page@:` prefix the folder would be:

```yaml
folder: 'page@:/blog/ajax-upload'
```

#### `preview_images`
```yaml
preview_images: true
```

If enabled, shows a preview for the images file types

> ### NOTE: `self@` is not allowed outside of the Pages scope, an error will be thrown. 


## Example usage


```
            header.a_file:
              type: filepicker
              folder: 'user/plugins/admin'
              label: Select a file
```
2016-09-02 18:29:47 +02:00
Djamil Legato
6b34336599 [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
Andy Miller
8cd0279b01 Feature/upload improvements (#617)
* various improvements.. needs cleanup

* more progress - supports deeply nested + pages

* Getting close now!

* more progress!

* some cleanup

* use data[_json] to store page-based upload

* Smarter logic to get nested form fields

* some refactoring/cleanup

* Fixed issue with removing multiple files in pages

* Refactor and support `destination: page@:/images` and `destination: self@` syntax for file fields

* Prettifying the upload field

* Handling Files API to better represent the selected files in the input field

* Better plurarl string

* Fixed harcoded height for input field

* revamped CSS!!!

* `fancy: false` turns off fancy styling

* Create folder if not exists

* Add support for @theme/theme@ destination

* Fixed create directory functionality to take into account resolved paths

* Don't allow @self on page to be uploaded to if not created

* added field languages

* css tweaks

* language integration
2016-05-26 14:49:45 -06:00
Djamil Legato
9dff88e37e Implemented ColorPicker field and Colors utility 2016-03-14 15:37:12 -07:00
Flavio Copes
2b34b02bf4 Drop colorpicker loading 2016-03-11 18:52:54 +01:00
Djamil Legato
9462c47f69 Auto refresh the content scrollbar every 150ms 2016-03-09 14:12:37 -08:00
Djamil Legato
bac120bfeb Initial rework for the editor 2016-02-26 15:54:06 -08:00
Djamil Legato
6271eeddff Added new DateTime field 2016-02-05 23:49:39 -08:00
Djamil Legato
35fa588438 Reworked Admin JS with ES6 2016-02-01 11:27:34 -08:00