Skip to content

Commit

Permalink
use default elfinder route, fix some versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ozdemirbur committed Jul 7, 2015
1 parent 716a081 commit 9b879f8
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 11 deletions.
5 changes: 1 addition & 4 deletions app/Http/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,4 @@
Route::get('setting', ['as' => 'admin.setting.index', 'uses' => 'SettingController@getSettings']);
Route::patch('setting/{setting}', ['as' => 'admin.setting.update', 'uses' => 'SettingController@patchSettings']);
});
});

// Tinymce elfinder integration
Route::get('elfinder', [ 'as' => 'elfinder', 'middleware' => 'auth', 'uses' => 'Barryvdh\Elfinder\ElfinderController@showTinyMCE4'] );
});
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"mjolnic-bootstrap-colorpicker": "~2.1.1",
"bootstrap-datepicker": "~1.4.0",
"morris.js" : "~0.5.1",
"jquery-floating-social-share" : "~1.0.0",
"tinymce": "~4.1.9"
"jquery-floating-social-share" : "~1.0.1",
"tinymce": "~4.2.1"
}
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"laravel/framework": ">=5.1.4",
"laravelcollective/html": "~5.0",
"baum/baum": "~1.1",
"chumper/datatable": "dev-develop",
"kris/laravel-form-builder": "~1.4",
"laracasts/flash": "~1.3",
"mews/purifier": "dev-master",
"cviebrock/eloquent-sluggable" : ">=3.0.0-beta",
"cviebrock/eloquent-sluggable" : "~3.0.0",
"barryvdh/laravel-elfinder": "0.3.*",
"spatie/laravel-analytics": "~1.1",
"caffeinated/menus": "~2.0"
Expand Down
81 changes: 81 additions & 0 deletions config/elfinder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?php

return array(

/*
|--------------------------------------------------------------------------
| Upload dir
|--------------------------------------------------------------------------
|
| The dir where to store the images (relative from public)
|
*/
'dir' => ['files'],

/*
|--------------------------------------------------------------------------
| Filesystem disks (Flysytem)
|--------------------------------------------------------------------------
|
| Define an array of Filesystem disks, which use Flysystem.
| You can set extra options, example:
|
| 'my-disk' => [
| 'URL' => url('to/disk'),
| 'alias' => 'Local storage',
| ]
*/
'disks' => [

],

/*
|--------------------------------------------------------------------------
| Routes group config
|--------------------------------------------------------------------------
|
| The default group settings for the elFinder routes.
|
*/

'route' => [
'prefix' => 'elfinder',
'middleware' => 'auth', //Set to null to disable middleware filter
],

/*
|--------------------------------------------------------------------------
| Access filter
|--------------------------------------------------------------------------
|
| Filter callback to check the files
|
*/

'access' => 'Barryvdh\Elfinder\Elfinder::checkAccess',

/*
|--------------------------------------------------------------------------
| Roots
|--------------------------------------------------------------------------
|
| By default, the roots file is LocalFileSystem, with the above public dir.
| If you want custom options, you can set your own roots below.
|
*/

'roots' => null,

/*
|--------------------------------------------------------------------------
| Options
|--------------------------------------------------------------------------
|
| These options are merged, together with 'roots' and passed to the Connector.
| See https://github.com/Studio-42/elFinder/wiki/Connector-configuration-options-2.1
|
*/

'options' => array(),

);
5 changes: 2 additions & 3 deletions resources/views/partials/admin/tinymce.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@
});
function elFinderBrowser(callback, value, meta) {
var request = "{{ action('\Barryvdh\Elfinder\ElfinderController@showTinyMCE4') }}";
var request = "{{ route('elfinder.tinymce4') }}";
tinymce.activeEditor.windowManager.open({
title: '{{ trans('admin.elfinder') }}',
url: request,
width: 900,
height: 450,
resizable: 'yes',
resizable: 'yes'
}, {
oninsert: function (url) {
callback(url);
Expand Down

0 comments on commit 9b879f8

Please sign in to comment.