Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardisation changes #48

Open
wants to merge 67 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
c828d0d
Making the module more compatible with core SS
oilee80 Oct 7, 2019
658b11b
Add `Image::Background()` call, this allows for setting the backgroun…
oilee80 Oct 7, 2019
5928b48
Removed unnesessary JS/CSS uploads are correctly going to Cloudinary …
oilee80 Oct 7, 2019
837c4fb
Dont replace the UploadField automatically
oilee80 Oct 8, 2019
71627c6
Improve error message if the notify api endpoint is hit
oilee80 Oct 8, 2019
4422547
ThumbnailGenerator::generateThumbnailLink(): Update to add `$graceful…
oilee80 Oct 8, 2019
cd75c0e
Image Manipulation: Tranformations where carrying from one variable t…
oilee80 Oct 8, 2019
ada6775
ImageLink: Update to use directly as a DO
oilee80 Oct 8, 2019
14a8a4c
Image: Tweaks to `Image::getColorsMap()` and adds some PHPDoc
oilee80 Oct 9, 2019
1a30bdf
The *Link fields dont need to implement the filecreiever functionality
oilee80 Oct 9, 2019
f4219a7
Overrides the Image Shortcode handler so as to limit dimension size
oilee80 Oct 11, 2019
d6f1e85
Re-working the File/Image model data
oilee80 Oct 15, 2019
f6abc37
Final amends that has gotten everything working again but much slimed…
oilee80 Oct 15, 2019
c37f0f7
Re-applied Link DataObjects that falls back to the File
oilee80 Oct 16, 2019
1e8fcf1
Fix Syntax error (oops)
oilee80 Oct 16, 2019
3c95a1f
Remove `Image::Size()` call as this interferes with `File::getSize()`…
oilee80 Oct 17, 2019
47a5176
Remove Injector of old FileFormFactory
oilee80 Oct 17, 2019
bb44192
Fix `CloudinaryStorage::getAsURL()` as $filename doesnt have the publ…
oilee80 Oct 17, 2019
18de864
Fixed not putting items in the correct folder
oilee80 Oct 17, 2019
ee1b409
Moved `PublicID` from File to DBFile for saving up upload via CMS
oilee80 Oct 21, 2019
ffd2e3e
Remove a `debug` param in a write call
oilee80 Oct 22, 2019
910307c
ImageLink: Adds a `$summary_fields` with a Preview of the image
oilee80 Oct 24, 2019
4852366
FileLink: Overload the `::exists()` check so that it checks that the …
oilee80 Oct 24, 2019
dc325d9
FileLinkField: Set the Title to the File field and dont set the title…
oilee80 Oct 25, 2019
dafd413
FileLinkField::setTitle(): Update the File title when called
oilee80 Oct 29, 2019
74e01c6
ImageLink: Fix for the Gravity field not being set from the DB
oilee80 Oct 31, 2019
3522b56
ImageLink: Replaced `Gravity` with `Focus` field so as to stop issues…
oilee80 Nov 1, 2019
33f2398
Fixed the API Controller so that `notify` works again
oilee80 Nov 1, 2019
ccb7030
Sync Task: Delete from DB if assets are no longer on Cloudinary
oilee80 Nov 5, 2019
7b3f8ad
Stop returning empty array from `::getCloudinaryData()`
oilee80 Nov 5, 2019
31e870a
Fixes `CloudinaryStorage::delete()` so that deleting from asset admin…
oilee80 Nov 5, 2019
81aef68
SyncTask: Removed un-used dependencies
oilee80 Nov 5, 2019
b90c1c1
Moving folders in Asset Admin now moves items in Cloudinary
oilee80 Nov 6, 2019
db399cd
Update to README docs
oilee80 Nov 6, 2019
0b7bb58
Image: Stop overridding `::getURL()` this means that the original URL…
oilee80 Nov 14, 2019
2f03c6e
SyncTask: Delete a file if a 404 error is thrown during syncing
oilee80 Nov 15, 2019
a123e87
Storage::getAsURL(): Was missing the `resource_type` param
oilee80 Dec 11, 2019
ac449b1
Re-work the options for cloudinary uploads so developer has more cont…
oilee80 Jan 15, 2020
c7bb138
Add `version` ($variant) as a parameter to `cloudinary_url`
lbradley-mm Mar 10, 2020
b59bea2
Fixes for when syncing with cloudinary
lbradley-mm Mar 10, 2020
1b1256d
SyncTask: Check that the file exists before trying to delete
lbradley-mm Mar 11, 2020
25052da
Handle when `backup` is set to true, by default we ignore these
lbradley-mm May 19, 2020
a13f784
Sync Task: Fix an issue where the PublicID is blank when checking for…
lbradley-mm May 19, 2020
f54a18c
Fix detection of `deleted` files (the size should also appear at 0)
lbradley-mm May 22, 2020
9ee65db
Update `copy()` to use `overwrite => true` in Cloudinary options
lbradley-mm May 22, 2020
3c52e9d
Adds a Restore From Backup task
lbradley-mm May 22, 2020
e0948ee
Cloudinary Restore: Limit to 100 `public_ids` per `->restore()` call
lbradley-mm May 22, 2020
fa74871
Correct namespacing for `ResoreFromBackupsTask` (oops)
lbradley-mm May 26, 2020
e7ae21c
File: Delete if a NotFound exception is thrown when trying to get res…
lbradley-mm Jun 4, 2020
53e017c
Adds `AssetID` to the `File` composite field as this doesnt appear to…
lbradley-mm Jun 5, 2020
fcf044c
Update to the Notification controller to handle `create_folder` call
lbradley-mm Jun 11, 2020
d5b9b70
CloudinaryStorage::getAsURL(): Fall back check without Variant parameter
lbradley-mm Jun 12, 2020
cea46a6
Lock cloudinary to `^1` instead of `master`
lbradley-mm Feb 16, 2021
03a095e
Fixed handling of missing base files
lbradley-mm Mar 5, 2021
7c2a7ff
Adds `File.Variant` when getting `::forTemplate()` URL if the version…
lbradley-mm Mar 19, 2021
05a183b
Update `Checking-...` header as it causes `HPE_INVALID_HEADER_TOKEN` …
lbradley-mm Mar 25, 2021
4209370
Stops error if linked image has been deleted
lbradley-mm Apr 16, 2021
8f81aa6
Re-apply Gravity/Focus which were accidentally removed in `03a095ed`
lbradley-mm Apr 21, 2021
4e140f3
Notification Controller: Change ParentID when `move` is called
lbradley-mm Apr 22, 2021
6756ebf
Add additional fallbacks for getting the appropriate file from Cloudi…
lbradley-mm Apr 26, 2021
0ea97bb
add descriptions to gravities
vipen-made May 20, 2021
d420b6a
Small change to dropdown wording
vipen-made May 20, 2021
0fc0b9a
Merge pull request #54 from MadeHQ/standardization-changes-1.1
vipen-made May 20, 2021
ac78639
FileLinkField: Allow for updating the `FieldList` (children) before p…
lbradley-mm Jun 2, 2021
d8c749f
If filetype is not supported by SS, continue to next file instead of …
vipen-made Jul 9, 2021
fca9d59
Merge pull request #55 from MadeHQ/standardization-changes-file-valid…
lbradley-mm Jul 16, 2021
27449e7
Tweaks the check for new/old name (pre-rename) to ignore accented cha…
lbradley-mm Sep 7, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add descriptions to gravities
  • Loading branch information
vipen-made committed May 20, 2021
commit 0ea97bba39ac9f0ef2be81ecc4a4462cb91a8520
50 changes: 25 additions & 25 deletions src/Model/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@
class Image extends SilverStripeImage
{
private static $valid_gravities = [
'north_east' => 'North East',
'north' => 'North',
'north_west' => 'North West',
'west' => 'West',
'south_west' => 'South West',
'south' => 'South',
'south_east' => 'South East',
'east' => 'East',
'center' => 'Center',

'face' => 'Face',
'face:auto' => 'Face',
'face:center' => 'Face',

'auto' => 'Auto',
'auto:subject' => 'Auto (Subject)',
'auto:classic' => 'Auto (Classic)',
'auto:body' => 'Auto (Body)',
'auto:no_faces' => 'Auto (No Faces)',
'auto:custom_no_override' => 'Auto (Custom No Override)',
'auto:none' => 'Auto (None)',

'faces' => 'Faces',
'faces:auto' => 'Faces (Auto)',
'faces:center' => 'Faces (Center)',
'north_east' => 'North East => Sets focal point to top right',
'north' => 'North => Sets focal point to top',
'north_west' => 'North West => Sets focal point to top left',
'west' => 'West => Sets focal point to left',
'south_west' => 'South West => Sets focal point to bottom left',
'south' => 'South => Sets focal point to bottom',
'south_east' => 'South East => Sets focal point to bottom right',
'east' => 'East => Sets focal point to right',
'center' => 'Center => Sets focal point to center',

'face' => 'Face => Automatically detect the largest face in an image',
'face:auto' => 'Face => Same as face, but defaults to auto if no face is detected',
'face:center' => 'Face => Same as face, but defaults to center if no face is detected',

'auto' => 'Auto => Automatically identify the most interesting regions',
'auto:subject' => 'Auto (Subject) => Focus on subjects that are most likely to attract a person\'s gaze',
'auto:classic' => 'Auto (Classic) => Focus on significant regions in the image',
'auto:body' => 'Auto (Body) => Focus on bodies',
'auto:no_faces' => 'Auto (No Faces) => Same as auto but avoids focusing on faces',
'auto:custom_no_override' => 'Auto (Custom No Override) => Same as auto',
'auto:none' => 'Auto (None) => Same as auto',

'faces' => 'Faces => Same as face, but detects all the faces in an image',
'faces:auto' => 'Faces (Auto) => Same as faces, but defaults to auto if no face is detected',
'faces:center' => 'Faces (Center) => Same as faces, but defaults to center if no face is detected',

// 'liquid', // Leaving this one out due to complexity at the moment
// 'xy_center', // Need to be able to specify x/y values based on original image dimensions (Leaving out due to complexity)
Expand Down