diff --git a/README.md b/README.md index 46e1d8b..567814a 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,17 @@ an Abstraction for local and remote filesystems into Magento2 without overriding ## Features ## -* Integrate Flysystem to configure different file storages like **ftp**, **local** and **cloud** (S3). +* Integrate Flysystem to configure different file storages like **sftp**, **local** or **cloud** (S3). * Provide modularity to easily integrate more adapters in the projects which use it. * Integrate image modal for Magento2 product and category image uploads. * You can select from the same **file-pool** instead of uploading from local. * So you can select an image like in the image selector for cms pages and blocks. * ACL Configuration for insert, upload, delete files and for create, delete folders and more. * Separate media page for fast access to flysystem media files. No need for WYSIWYG-Editor Button. + +## Flysystem Adapters ## +* In core module integrated **local**, **ftp** and **sftp** adapters +* [**S3** Flysystem Adapter](https://github.com/flagbit/Magento2-Flysystem-S3) (install the additional magento2 module) ## Wiki Pages ## diff --git a/view/adminhtml/templates/browser/content.phtml b/view/adminhtml/templates/browser/content.phtml index 6ce7847..7b36b3f 100644 --- a/view/adminhtml/templates/browser/content.phtml +++ b/view/adminhtml/templates/browser/content.phtml @@ -5,16 +5,17 @@ ?>
-
getChildHtml('flagbit_flysystem.tree') ?>
-
-
-
-
+
+
+
+
getButtonsHtml() ?>
-
escapeHtml($block->getHeaderText()) ?>
+
+
getChildHtml('flagbit_flysystem.tree') ?>
+
getChildHtml('flagbit_flysystem.uploader') ?>
@@ -30,4 +31,4 @@ } } } - \ No newline at end of file + diff --git a/view/adminhtml/web/js/cms/mediabrowserExtension.js b/view/adminhtml/web/js/cms/mediabrowserExtension.js index 3ec245a..929b98b 100644 --- a/view/adminhtml/web/js/cms/mediabrowserExtension.js +++ b/view/adminhtml/web/js/cms/mediabrowserExtension.js @@ -7,11 +7,19 @@ define([ newButton.title = data.flysystemButtonTitle; newButton.type = 'button'; newButton.innerHTML = '' + data.flysystemButtonTitle + ''; + newButton.classList.add('action-default'); + newButton.classList.add('scalable'); + newButton.classList.add('action-quaternary'); newButton.on('click', function () { MediabrowserUtility.openDialog(data.flysystemButtonUrl) }); - $('#modal_dialog_message').find('.insert-actions').first().prepend(newButton); + + if($('#modal_dialog_message').find('.page-action-buttons').length) { + $('#modal_dialog_message').find('.page-action-buttons').first().prepend(newButton); + } else if($('#modal_dialog_message').find('.insert-actions').length) { + $('#modal_dialog_message').find('.insert-actions').first().prepend(newButton); + } } } }); \ No newline at end of file diff --git a/view/base/web/js/flysystemUtility.js b/view/base/web/js/flysystemUtility.js index 29e6157..1439b37 100644 --- a/view/base/web/js/flysystemUtility.js +++ b/view/base/web/js/flysystemUtility.js @@ -34,7 +34,7 @@ define([ console.log(data.error); if(!data.error) { var previewHtml = $('#flysystem-image-preview'); - previewHtml.find('img').attr('src', data.previewUrl); + previewHtml.find('img').first().attr('src', data.url); previewHtml.show(); } }, this)