From 1b151ff1b58272b77acaa3f50f5d04d40bb03bec Mon Sep 17 00:00:00 2001 From: Albert Ganiev Date: Fri, 5 Dec 2014 20:55:52 +1000 Subject: [PATCH 1/7] removed assetic dependency --- Controller/ElFinderController.php | 12 +- DependencyInjection/Configuration.php | 1 - .../public/js/proxy/elFinderSupportVer1.js | 338 ------------------ .../Elfinder/compressed/_tinymce.html.twig | 20 -- .../Elfinder/compressed/_tinymce4.html.twig | 16 - .../Elfinder/compressed/ckeditor.html.twig | 55 --- .../Elfinder/compressed/simple.html.twig | 38 -- .../Elfinder/compressed/tinymce.html.twig | 70 ---- .../Elfinder/compressed/tinymce4.html.twig | 46 --- .../Elfinder/helper/assets_css.html.twig | 7 +- .../views/Elfinder/helper/assets_js.html.twig | 63 +++- 11 files changed, 63 insertions(+), 603 deletions(-) delete mode 100644 Resources/public/js/proxy/elFinderSupportVer1.js delete mode 100644 Resources/views/Elfinder/compressed/_tinymce.html.twig delete mode 100644 Resources/views/Elfinder/compressed/_tinymce4.html.twig delete mode 100644 Resources/views/Elfinder/compressed/ckeditor.html.twig delete mode 100644 Resources/views/Elfinder/compressed/simple.html.twig delete mode 100644 Resources/views/Elfinder/compressed/tinymce.html.twig delete mode 100644 Resources/views/Elfinder/compressed/tinymce4.html.twig diff --git a/Controller/ElFinderController.php b/Controller/ElFinderController.php index 5af2bfc..a42ca43 100644 --- a/Controller/ElFinderController.php +++ b/Controller/ElFinderController.php @@ -39,13 +39,11 @@ private function selectEditor($parameters, $instance, $formTypeId = null) $locale = $parameters['locale'] ?: $this->container->getParameter('locale'); $fullscreen = $parameters['fullscreen']; $includeAssets = $parameters['include_assets']; - $compression = $parameters['compression']; - $prefix = ($compression ? '/compressed' : ''); $result = array(); switch ($editor) { case 'ckeditor': - $result['template'] = 'FMElfinderBundle:Elfinder'.$prefix.':ckeditor.html.twig'; + $result['template'] = 'FMElfinderBundle:Elfinder:ckeditor.html.twig'; $result['params'] = array( 'locale' => $locale, 'fullscreen' => $fullscreen, @@ -54,7 +52,7 @@ private function selectEditor($parameters, $instance, $formTypeId = null) ); return $result; case 'tinymce': - $result['template'] = 'FMElfinderBundle:Elfinder'.$prefix.':tinymce.html.twig'; + $result['template'] = 'FMElfinderBundle:Elfinder:tinymce.html.twig'; $result['params'] = array( 'locale' => $locale, 'tinymce_popup_path' => $this->getAssetsUrl($parameters['tinymce_popup_path']), @@ -63,7 +61,7 @@ private function selectEditor($parameters, $instance, $formTypeId = null) ); return $result; case 'tinymce4': - $result['template'] = 'FMElfinderBundle:Elfinder'.$prefix.':tinymce4.html.twig'; + $result['template'] = 'FMElfinderBundle:Elfinder:tinymce4.html.twig'; $result['params'] = array( 'locale' => $locale, 'includeAssets' => $includeAssets, @@ -71,7 +69,7 @@ private function selectEditor($parameters, $instance, $formTypeId = null) ); return $result; case 'form': - $result['template'] = 'FMElfinderBundle:Elfinder'.$prefix.':elfinder_type.html.twig'; + $result['template'] = 'FMElfinderBundle:Elfinder:elfinder_type.html.twig'; $result['params'] = array( 'locale' => $locale, 'fullscreen' => $fullscreen, @@ -81,7 +79,7 @@ private function selectEditor($parameters, $instance, $formTypeId = null) ); return $result; default: - $result['template'] = 'FMElfinderBundle:Elfinder'.$prefix.':simple.html.twig'; + $result['template'] = 'FMElfinderBundle:Elfinder:simple.html.twig'; $result['params'] = array( 'locale' => $locale, 'fullscreen' => $fullscreen, diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 51df1b5..b7329ad 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -34,7 +34,6 @@ public function getConfigTreeBuilder() ->children() ->scalarNode('locale')->defaultNull()->end() ->scalarNode('editor')->defaultValue('simple')->end() - ->booleanNode('compression')->defaultFalse()->end() ->booleanNode('fullscreen')->defaultTrue()->end() ->booleanNode('include_assets')->defaultTrue()->end() ->scalarNode('tinymce_popup_path')->defaultValue('')->end() diff --git a/Resources/public/js/proxy/elFinderSupportVer1.js b/Resources/public/js/proxy/elFinderSupportVer1.js deleted file mode 100644 index 6c33dc6..0000000 --- a/Resources/public/js/proxy/elFinderSupportVer1.js +++ /dev/null @@ -1,338 +0,0 @@ -"use strict"; -/** - * elFinder transport to support old protocol. - * - * @example - * $('selector').elfinder({ - * .... - * transport : new elFinderSupportVer1() - * }) - * - * @author Dmitry (dio) Levashov - **/ -window.elFinderSupportVer1 = function(upload) { - var self = this; - - this.upload = upload || 'auto'; - - this.init = function(fm) { - this.fm = fm; - this.fm.parseUploadData = function(text) { - var data; - - if (!$.trim(text)) { - return {error : ['errResponse', 'errDataEmpty']}; - } - - try { - data = $.parseJSON(text); - } catch (e) { - return {error : ['errResponse', 'errDataNotJSON']} - } - - return self.normalize('upload', data); - } - } - - - this.send = function(opts) { - var self = this, - fm = this.fm, - dfrd = $.Deferred(), - cmd = opts.data.cmd, - args = [], - _opts = {}, - data, - xhr; - - dfrd.abort = function() { - xhr.state() == 'pending' && xhr.abort(); - } - - switch (cmd) { - case 'open': - opts.data.tree = 1; - break; - case 'parents': - case 'tree': - return dfrd.resolve({tree : []}); - break; - case 'get': - opts.data.cmd = 'read'; - opts.data.current = fm.file(opts.data.target).phash; - break; - case 'put': - opts.data.cmd = 'edit'; - opts.data.current = fm.file(opts.data.target).phash; - break; - case 'archive': - case 'rm': - opts.data.current = fm.file(opts.data.targets[0]).phash; - break; - case 'extract': - case 'rename': - case 'resize': - opts.data.current = fm.file(opts.data.target).phash; - break; - case 'duplicate': - _opts = $.extend(true, {}, opts); - - $.each(opts.data.targets, function(i, hash) { - $.ajax($.extend(_opts, {data : {cmd : 'duplicate', target : hash, current : fm.file(hash).phash}})) - .error(function(error) { - fm.error(fm.res('error', 'connect')); - }) - .done(function(data) { - data = self.normalize('duplicate', data); - if (data.error) { - fm.error(data.error); - } else if (data.added) { - fm.trigger('add', {added : data.added}); - } - }) - }); - return dfrd.resolve({}) - break; - - case 'mkdir': - case 'mkfile': - opts.data.current = opts.data.target; - break; - case 'paste': - opts.data.current = opts.data.dst - break; - - case 'size': - return dfrd.resolve({error : fm.res('error', 'cmdsupport')}); - break; - case 'search': - return dfrd.resolve({error : fm.res('error', 'cmdsupport')}); - break; - - } - // cmd = opts.data.cmd - - xhr = $.ajax(opts) - .fail(function(error) { - dfrd.reject(error) - }) - .done(function(raw) { - data = self.normalize(cmd, raw); - - // cmd != 'open' && self.fm.log(data); - - if (cmd == 'paste' && !data.error) { - fm.sync(); - dfrd.resolve({}); - } else { - dfrd.resolve(data); - } - }) - - return dfrd; - - return $.ajax(opts); - } - - // fix old connectors errors messages as possible - // this.errors = { - // 'Unknown command' : 'Unknown command.', - // 'Invalid backend configuration' : 'Invalid backend configuration.', - // 'Access denied' : 'Access denied.', - // 'PHP JSON module not installed' : 'PHP JSON module not installed.', - // 'File not found' : 'File not found.', - // 'Invalid name' : 'Invalid file name.', - // 'File or folder with the same name already exists' : 'File named "$1" already exists in this location.', - // 'Not allowed file type' : 'Not allowed file type.', - // 'File exceeds the maximum allowed filesize' : 'File exceeds maximum allowed size.', - // 'Unable to copy into itself' : 'Unable to copy "$1" into itself.', - // 'Unable to create archive' : 'Unable to create archive.', - // 'Unable to extract files from archive' : 'Unable to extract files from "$1".' - // } - - this.normalize = function(cmd, data) { - var self = this, - files = {}, - filter = function(file) { return file && file.hash && file.name && file.mime ? file : null; }, - phash; - - if ((cmd == 'tmb' || cmd == 'get')) { - return data; - } - - // if (data.error) { - // $.each(data.error, function(i, msg) { - // if (self.errors[msg]) { - // data.error[i] = self.errors[msg]; - // } - // }); - // } - - if (cmd == 'upload' && data.error && data.cwd) { - data.warning = $.extend({}, data.error); - data.error = false; - } - - - if (data.error) { - return data; - } - - if (cmd == 'put') { - - phash = this.fm.file(data.target.hash).phash; - return {changed : [this.normalizeFile(data.target, phash)]}; - } - - phash = data.cwd.hash; - - if (data.tree) { - $.each(this.normalizeTree(data.tree), function(i, file) { - files[file.hash] = file; - }); - } - - $.each(data.cdc||[], function(i, file) { - var hash = file.hash; - - if (files[hash]) { - files[hash].date = file.date; - files[hash].locked = file.hash == phash ? true : file.rm === void(0) ? false : !file.rm; - } else { - files[hash] = self.normalizeFile(file, phash, data.tmb); - } - }); - - if (!data.tree) { - $.each(this.fm.files(), function(hash, file) { - if (!files[hash] && file.phash != phash && file.mime == 'directory') { - files[hash] = file; - } - }); - } - - if (cmd == 'open') { - return { - cwd : files[phash] || this.normalizeFile(data.cwd), - files : $.map(files, function(f) { return f }), - options : self.normalizeOptions(data), - init : !!data.params, - debug : data.debug - }; - } - - - - return $.extend({ - current : data.cwd.hash, - error : data.error, - warning : data.warning, - options : {tmb : !!data.tmb} - }, this.fm.diff($.map(files, filter))); - - } - - /** - * Convert old api tree into plain array of dirs - * - * @param Object root dir - * @return Array - */ - this.normalizeTree = function(root) { - var self = this, - result = [], - traverse = function(dirs, phash) { - var i, dir; - - for (i = 0; i < dirs.length; i++) { - dir = dirs[i]; - result.push(self.normalizeFile(dir, phash)) - dir.dirs.length && traverse(dir.dirs, dir.hash); - } - }; - - traverse([root]); - - return result; - } - - /** - * Convert file info from old api format into new one - * - * @param Object file - * @param String parent dir hash - * @return Object - */ - this.normalizeFile = function(file, phash, tmb) { - var mime = file.mime || 'directory', - size = mime == 'directory' && !file.linkTo ? 0 : file.size, - info = { - url : file.url, - hash : file.hash, - phash : phash, - name : file.name, - mime : mime, - date : file.date || 'unknown', - size : size, - read : file.read, - write : file.write, - locked : !phash ? true : file.rm === void(0) ? false : !file.rm - }; - - if (file.mime == 'application/x-empty') { - info.mime = 'text/plain'; - } - if (file.linkTo) { - info.alias = file.linkTo; - } - - if (file.linkTo) { - info.linkTo = file.linkTo; - } - - if (file.tmb) { - info.tmb = file.tmb; - } else if (info.mime.indexOf('image/') === 0 && tmb) { - info.tmb = 1; - - } - - if (file.dirs && file.dirs.length) { - info.dirs = true; - } - if (file.dim) { - info.dim = file.dim; - } - if (file.resize) { - info.resize = file.resize; - } - return info; - } - - this.normalizeOptions = function(data) { - var opts = { - path : data.cwd.rel, - disabled : data.disabled || [], - tmb : !!data.tmb, - copyOverwrite : true - }; - - if (data.params) { - opts.api = 1; - opts.url = data.params.url; - opts.archivers = { - create : data.params.archives || [], - extract : data.params.extract || [] - } - } - - if (opts.path.indexOf('/') !== -1) { - opts.separator = '/'; - } else if (opts.path.indexOf('\\') !== -1) { - opts.separator = '\\'; - } - return opts; - } - - -} diff --git a/Resources/views/Elfinder/compressed/_tinymce.html.twig b/Resources/views/Elfinder/compressed/_tinymce.html.twig deleted file mode 100644 index 237b02e..0000000 --- a/Resources/views/Elfinder/compressed/_tinymce.html.twig +++ /dev/null @@ -1,20 +0,0 @@ - diff --git a/Resources/views/Elfinder/compressed/_tinymce4.html.twig b/Resources/views/Elfinder/compressed/_tinymce4.html.twig deleted file mode 100644 index 0c8aa09..0000000 --- a/Resources/views/Elfinder/compressed/_tinymce4.html.twig +++ /dev/null @@ -1,16 +0,0 @@ - diff --git a/Resources/views/Elfinder/compressed/ckeditor.html.twig b/Resources/views/Elfinder/compressed/ckeditor.html.twig deleted file mode 100644 index b21eee8..0000000 --- a/Resources/views/Elfinder/compressed/ckeditor.html.twig +++ /dev/null @@ -1,55 +0,0 @@ - - - - - {% stylesheets output='assetic/css/compiled/fmelfinder/main.css' - 'bundles/fmelfinder/css/*' filter='cssrewrite,?uglifycss' %} - - {% endstylesheets %} - - - {% javascripts output='assetic/js/compiled/fmelfinder/main.js' filter='?uglifyjs2' - '@FMElfinderBundle/Resources/public/js/jquery/jquery-1.8.0.min.js' - '@FMElfinderBundle/Resources/public/js/jquery/jquery-ui-1.8.23.custom.min.js' - '@FMElfinderBundle/Resources/public/js/elfinder.min.js' - '@FMElfinderBundle/Resources/public/js/i18n/*' - %} - - {% endjavascripts %} - - -
- - diff --git a/Resources/views/Elfinder/compressed/simple.html.twig b/Resources/views/Elfinder/compressed/simple.html.twig deleted file mode 100644 index a94f97f..0000000 --- a/Resources/views/Elfinder/compressed/simple.html.twig +++ /dev/null @@ -1,38 +0,0 @@ - - - - {% stylesheets output='assetic/css/compiled/fmelfinder/main.css' - 'bundles/fmelfinder/css/*' filter='cssrewrite,?uglifycss' %} - - {% endstylesheets %} - - - {% javascripts output='bundles/fmelfinder/js/main.js' filter='?uglifyjs2' - '@FMElfinderBundle/Resources/public/js/jquery/jquery-1.8.0.min.js' - '@FMElfinderBundle/Resources/public/js/jquery/jquery-ui-1.8.23.custom.min.js' - '@FMElfinderBundle/Resources/public/js/elfinder.min.js' - '@FMElfinderBundle/Resources/public/js/i18n/*' - %} - - {% endjavascripts %} - -
- - diff --git a/Resources/views/Elfinder/compressed/tinymce.html.twig b/Resources/views/Elfinder/compressed/tinymce.html.twig deleted file mode 100644 index 5ced749..0000000 --- a/Resources/views/Elfinder/compressed/tinymce.html.twig +++ /dev/null @@ -1,70 +0,0 @@ - - - - {% stylesheets output='assetic/css/compiled/fmelfinder/main.css' - 'bundles/fmelfinder/css/*' filter='cssrewrite,?uglifycss' %} - - {% endstylesheets %} - - - {% javascripts output='bundles/fmelfinder/js/main.js' filter='?uglifyjs2' - '@FMElfinderBundle/Resources/public/js/jquery/jquery-1.8.0.min.js' - '@FMElfinderBundle/Resources/public/js/jquery/jquery-ui-1.8.23.custom.min.js' - '@FMElfinderBundle/Resources/public/js/elfinder.min.js' - '@FMElfinderBundle/Resources/public/js/i18n/*' - %} - - {% endjavascripts %} - - -
- - diff --git a/Resources/views/Elfinder/compressed/tinymce4.html.twig b/Resources/views/Elfinder/compressed/tinymce4.html.twig deleted file mode 100644 index d61028f..0000000 --- a/Resources/views/Elfinder/compressed/tinymce4.html.twig +++ /dev/null @@ -1,46 +0,0 @@ - - - - {% stylesheets output='assetic/css/compiled/fmelfinder/main.css' - 'bundles/fmelfinder/css/*' filter='cssrewrite,?uglifycss' %} - - {% endstylesheets %} - - -{% javascripts output='bundles/fmelfinder/js/main.js' filter='?uglifyjs2' -'@FMElfinderBundle/Resources/public/js/jquery/jquery-1.8.0.min.js' -'@FMElfinderBundle/Resources/public/js/jquery/jquery-ui-1.8.23.custom.min.js' -'@FMElfinderBundle/Resources/public/js/elfinder.min.js' -'@FMElfinderBundle/Resources/public/js/i18n/*' -%} - -{% endjavascripts %} - -
- - diff --git a/Resources/views/Elfinder/helper/assets_css.html.twig b/Resources/views/Elfinder/helper/assets_css.html.twig index 1fbec41..b6bd54e 100644 --- a/Resources/views/Elfinder/helper/assets_css.html.twig +++ b/Resources/views/Elfinder/helper/assets_css.html.twig @@ -1,4 +1,3 @@ -{% stylesheets output='assetic/css/compiled/fmelfinder/main.css' - 'bundles/fmelfinder/css/*' filter='cssrewrite' %} - -{% endstylesheets %} + + + \ No newline at end of file diff --git a/Resources/views/Elfinder/helper/assets_js.html.twig b/Resources/views/Elfinder/helper/assets_js.html.twig index 99c7011..725d8f5 100644 --- a/Resources/views/Elfinder/helper/assets_js.html.twig +++ b/Resources/views/Elfinder/helper/assets_js.html.twig @@ -1,8 +1,55 @@ -{% javascripts output='assetic/js/compiled/fmelfinder/main.js' - '@FMElfinderBundle/Resources/public/js/jquery/jquery-1.8.0.min.js' - '@FMElfinderBundle/Resources/public/js/jquery/jquery-ui-1.8.23.custom.min.js' - '@FMElfinderBundle/Resources/public/js/elfinder.min.js' - '@FMElfinderBundle/Resources/public/js/i18n/*' -%} - -{% endjavascripts %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 3ebc656f1e079c453a76b7ef18865e5cf9a3f4b5 Mon Sep 17 00:00:00 2001 From: Albert Ganiev Date: Fri, 5 Dec 2014 21:38:36 +1000 Subject: [PATCH 2/7] removed unnecessary --- Controller/ElFinderController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Controller/ElFinderController.php b/Controller/ElFinderController.php index a42ca43..906f7cb 100644 --- a/Controller/ElFinderController.php +++ b/Controller/ElFinderController.php @@ -31,6 +31,7 @@ public function showAction($instance) /** * @param $parameters * @param $instance + * @param null $formTypeId * @return array */ private function selectEditor($parameters, $instance, $formTypeId = null) From 4dca05bd5ec87e83b07ce5887876f200c5b36494 Mon Sep 17 00:00:00 2001 From: Albert Ganiev Date: Fri, 5 Dec 2014 21:39:09 +1000 Subject: [PATCH 3/7] removed unnecessary --- Resources/views/Elfinder/_tinymce.html.twig | 20 -------------------- Resources/views/Elfinder/_tinymce4.html.twig | 16 ---------------- 2 files changed, 36 deletions(-) delete mode 100644 Resources/views/Elfinder/_tinymce.html.twig delete mode 100644 Resources/views/Elfinder/_tinymce4.html.twig diff --git a/Resources/views/Elfinder/_tinymce.html.twig b/Resources/views/Elfinder/_tinymce.html.twig deleted file mode 100644 index ae5490d..0000000 --- a/Resources/views/Elfinder/_tinymce.html.twig +++ /dev/null @@ -1,20 +0,0 @@ - diff --git a/Resources/views/Elfinder/_tinymce4.html.twig b/Resources/views/Elfinder/_tinymce4.html.twig deleted file mode 100644 index 26d145e..0000000 --- a/Resources/views/Elfinder/_tinymce4.html.twig +++ /dev/null @@ -1,16 +0,0 @@ - From b0c3cc8c911735fe6c44e32aa24f5142febb80af Mon Sep 17 00:00:00 2001 From: Albert Ganiev Date: Fri, 5 Dec 2014 22:55:38 +1000 Subject: [PATCH 4/7] fixed permissions --- Tests/DependencyInjection/FMElfinderExtensionTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Tests/DependencyInjection/FMElfinderExtensionTest.php b/Tests/DependencyInjection/FMElfinderExtensionTest.php index 4576979..0207f17 100644 --- a/Tests/DependencyInjection/FMElfinderExtensionTest.php +++ b/Tests/DependencyInjection/FMElfinderExtensionTest.php @@ -44,7 +44,6 @@ protected function getMinimalConfiguration() default: locale: %locale% editor: simple # other choices are tinymce or simple - compression: false include_assets: true fullscreen: true connector: From 914836f7463e6a7dd97d02a54328e7e506b2d1c6 Mon Sep 17 00:00:00 2001 From: Albert Ganiev Date: Fri, 5 Dec 2014 23:06:18 +1000 Subject: [PATCH 5/7] fixed tests --- Tests/Twig/Extension/FMElfinderTinymceExtensionTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/Twig/Extension/FMElfinderTinymceExtensionTest.php b/Tests/Twig/Extension/FMElfinderTinymceExtensionTest.php index 1983ae1..cbd189d 100644 --- a/Tests/Twig/Extension/FMElfinderTinymceExtensionTest.php +++ b/Tests/Twig/Extension/FMElfinderTinymceExtensionTest.php @@ -35,7 +35,7 @@ class FMElfinderTinymceExtensionTest extends \PHPUnit_Framework_TestCase */ protected function setUp() { - $this->twig = new \Twig_Environment(new \Twig_Loader_Filesystem(array(__DIR__.'/../../../Resources/views/Elfinder'))); + $this->twig = new \Twig_Environment(new \Twig_Loader_Filesystem(array(__DIR__.'/../../../Resources/views/Elfinder/helper'))); $this->extension = new FMElfinderTinymceExtension($this->twig); $this->twig->addExtension($this->extension); $loader = new YamlFileLoader(new FileLocator(__DIR__ . '/../../../Resources/config')); From 65364b0fc95bb47cd882c4e26a6c63282302331f Mon Sep 17 00:00:00 2001 From: Albert Ganiev Date: Sat, 6 Dec 2014 03:23:53 +1000 Subject: [PATCH 6/7] fix tests --- .../Extension/FMElfinderTinymceExtensionTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Tests/Twig/Extension/FMElfinderTinymceExtensionTest.php b/Tests/Twig/Extension/FMElfinderTinymceExtensionTest.php index cbd189d..4d02159 100644 --- a/Tests/Twig/Extension/FMElfinderTinymceExtensionTest.php +++ b/Tests/Twig/Extension/FMElfinderTinymceExtensionTest.php @@ -57,9 +57,9 @@ public function testRenderTinyMCE3() function elFinderBrowser (field_name, url, type, win) { tinyMCE.activeEditor.windowManager.open({ file: "http://localhost/elfinder/minimal", - title: 'elFinder 2.0', - width: 900, - height: 450, + title: "", + width:, + height:, resizable: 'yes', inline: 'yes', // This parameter only has an effect if you use the inlinepopups plugin! popup_css: false, // Disable TinyMCE's default popup CSS @@ -87,9 +87,9 @@ public function testRenderTinyMCE4() function elFinderBrowser (field_name, url, type, win) { tinymce.activeEditor.windowManager.open({ file:"http://localhost/elfinder/minimal", - title: 'elFinder 2.0', - width: 900, - height: 450, + title: "", + width:, + height:, resizable: 'yes' }, { setUrl: function (url) { From afb03776effb1a5394218e0de52bdf9f05e12b15 Mon Sep 17 00:00:00 2001 From: Albert Ganiev Date: Sat, 6 Dec 2014 17:00:13 +1000 Subject: [PATCH 7/7] updated readme --- README.md | 39 +++++++-------------------------------- 1 file changed, 7 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 688cb6e..0c32056 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,7 @@ Recommended bundles to use with: - [Step 2: Enable the bundle](#step-2-enable-the-bundle) - [Step 3: Import FMElfinderBundle routing file](#step-3-import-fmelfinderbundle-routing-file) - [Step 4: Configure your application's security.yml](#step-4-configure-your-applications-securityyml) - - [Step 5: Configure assetic](#step-5-configure-assetic) - - [Step 6: Install and dump assets](#step-6-install-and-dump-assets) + - [Step 5: Install and dump assets](#step-5-install-assets) - [Basic configuration](#basic-configuration) - [Add configuration options to your config.yml](#add-configuration-options-to-your-configyml) - [Configuring symfony service as a volumeDriver](#configuring-symfony-service-as-a-volumedriver) @@ -105,35 +104,12 @@ security: ``` role ROLE_USER is provided as example. -### Step 5: Configure assetic +### Step 5: Install assets -Under assetic section of your config.yml, add FMElfinderBundle to bundles section, also you can enable uglify js/css -compressor (also you need to enable option "compression: true" under bundle configuration). - -Also set "use_controller: false". - -``` yaml -assetic: - debug: %kernel.debug% - use_controller: false - bundles: [FMElfinderBundle] - java: /usr/bin/java - filters: - cssrewrite: ~ - uglifyjs2: - # the path to the uglifyjs executable - bin: /usr/bin/uglifyjs - uglifycss: - bin: /usr/bin/uglifycss -``` - -### Step 6: Install and dump assets - -Install and dump assets using symfony built-in commands: +Install assets using symfony built-in commands: ```sh app/console assets:install web -app/console assetic:dump --env=prod ``` ## Basic configuration @@ -148,7 +124,6 @@ fm_elfinder: editor: ckeditor # other choices are tinymce or simple, and form fullscreen: true # defaults true, applies to simple and ckeditor editors include_assets: true # disable if you want to handle loading of the javascript and css assets yourself - compression: false # enable if you configured the uglifycss and uglifyjs2 assetic filters and want compression connector: debug: false # defaults to false roots: # at least one root must be defined @@ -385,11 +360,11 @@ method getConfiguration($instance) should return array of parameters compatible Manual integration guide can be found [here](/INTEGRATION_GUIDE.md) -##Todo - -More tests, gridfs support, complex user intergration(?) - ##Changelog +### 2.3.3 +* Compression option deprecated +* assetic dep removed + ### 2.1 * New Elfinder form type, provides basic field with Elfinder callback