Skip to content

Commit

Permalink
Remove custom dependency for asset-admin
Browse files Browse the repository at this point in the history
Also fix `Image::Quality` to match signature on parent

Also removes the `sync` button from the CMS file admin
  • Loading branch information
oilee80 committed Feb 12, 2019
1 parent 2d2256a commit 79d0a76
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 156 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions client/src/js/app.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@

import CloudinaryEnhancedGalleryToolbar from './components/CloudinaryEnhancedGalleryToolbar';
import CloudinaryPreviewImageField from './components/CloudinaryPreviewImageField';

import Injector from 'lib/Injector';

Injector.transform(
'cloudinary-sync-button',
updater => {
updater.component('GalleryToolbar', CloudinaryEnhancedGalleryToolbar);
}
);

Injector.transform(
'cloudinary-preview-image-field',
updater => {
Expand Down
14 changes: 0 additions & 14 deletions client/src/js/components/CloudinaryEnhancedGalleryToolbar.js

This file was deleted.

101 changes: 0 additions & 101 deletions client/src/js/components/CloudinarySync.js

This file was deleted.

25 changes: 0 additions & 25 deletions client/src/js/components/CloudinaryToolbarFields.js

This file was deleted.

1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"require": {
"cloudinary/cloudinary_php": "dev-master",
"php": ">=7.0.0",
"silverstripe/assets": "^1.1",
"silverstripe/asset-admin": "^1.1"
},
"autoload": {
Expand Down
7 changes: 7 additions & 0 deletions src/Model/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,11 @@ public function doArchive()
$r = $api->delete_resources(array($this->PublicID));
return parent::doArchive();
}

public static function getOneByPublicId($publicId)
{
return static::get_one(static::class, [
'PublicID' => $publicId,
]);
}
}
7 changes: 0 additions & 7 deletions src/Traits/CloudinaryFileTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ trait CloudinaryFileTrait
'RemoteData' => 'Text',
];

public static function getOneByPublicId($publicId)
{
return static::get_one(static::class, [
'PublicID' => $publicId,
]);
}

public function updateFromCloudinary($resource)
{
$parentFolder = static::getParentFolderForResouce($resource);
Expand Down

0 comments on commit 79d0a76

Please sign in to comment.