Switch filemanager and EULA check to use pure Javascript methods

Removes the need for the javascript to be parsed by Blade template
engine by using a defined javascript variable with the values that are
necessary for checking everything and passing the correct values.

This does make it so that if a user does not have permission to do
something they could theoretically make the option show up in the
context menu, however when they click it, it will simply return an
error by the daemon.
This commit is contained in:
Dane Everitt 2017-01-03 16:47:33 -05:00
parent e282f774af
commit aa6e733ba5
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
13 changed files with 567 additions and 528 deletions

32
config/javascript.php Normal file
View file

@ -0,0 +1,32 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| View to Bind JavaScript Vars To
|--------------------------------------------------------------------------
|
| Set this value to the name of the view (or partial) that
| you want to prepend all JavaScript variables to.
| This can be a single view, or an array of views.
| Example: 'footer' or ['footer', 'bottom']
|
*/
'bind_js_vars_to_this_view' => [
'layouts.master'
],
/*
|--------------------------------------------------------------------------
| JavaScript Namespace
|--------------------------------------------------------------------------
|
| By default, we'll add variables to the global window object. However,
| it's recommended that you change this to some namespace - anything.
| That way, you can access vars, like "SomeNamespace.someVariable."
|
*/
'js_namespace' => 'Pterodactyl'
];