From da003efb031ea45e7bd8547785097368a3a55b68 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Thu, 30 Mar 2017 16:23:25 -0400 Subject: [PATCH] Fixes issue with DOCTYPE being discarded on JS injected views --- config/javascript.php | 3 +-- .../themes/pterodactyl/layouts/admin.blade.php | 13 +++++++------ .../themes/pterodactyl/layouts/master.blade.php | 8 +++++--- .../themes/pterodactyl/layouts/scripts.blade.php | 1 + 4 files changed, 14 insertions(+), 11 deletions(-) create mode 100644 resources/themes/pterodactyl/layouts/scripts.blade.php diff --git a/config/javascript.php b/config/javascript.php index 1c2ef82dc..1aeb222e0 100644 --- a/config/javascript.php +++ b/config/javascript.php @@ -14,8 +14,7 @@ return [ | */ 'bind_js_vars_to_this_view' => [ - 'layouts.master', - 'layouts.admin', + 'layouts.scripts', ], /* diff --git a/resources/themes/pterodactyl/layouts/admin.blade.php b/resources/themes/pterodactyl/layouts/admin.blade.php index f3a7920b8..910b50bcf 100644 --- a/resources/themes/pterodactyl/layouts/admin.blade.php +++ b/resources/themes/pterodactyl/layouts/admin.blade.php @@ -26,7 +26,6 @@ - @@ -36,6 +35,8 @@ + @include('layouts.scripts') + @section('scripts') {!! Theme::css('vendor/select2/select2.min.css') !!} {!! Theme::css('vendor/bootstrap/bootstrap.min.css') !!} @@ -75,13 +76,13 @@
  • - +
  • -
  • +
  • -
  • +
  • @@ -171,8 +172,8 @@ diff --git a/resources/themes/pterodactyl/layouts/master.blade.php b/resources/themes/pterodactyl/layouts/master.blade.php index 8481a5e89..ac074bb30 100644 --- a/resources/themes/pterodactyl/layouts/master.blade.php +++ b/resources/themes/pterodactyl/layouts/master.blade.php @@ -35,6 +35,8 @@ + @include('layouts.scripts') + @section('scripts') {!! Theme::css('vendor/bootstrap/bootstrap.min.css') !!} {!! Theme::css('vendor/adminlte/admin.min.css') !!} @@ -73,15 +75,15 @@
  • - +
  • @if(Auth::user()->isRootAdmin())
  • -
  • +
  • @endif
  • -
  • +
  • diff --git a/resources/themes/pterodactyl/layouts/scripts.blade.php b/resources/themes/pterodactyl/layouts/scripts.blade.php new file mode 100644 index 000000000..3393bf5fe --- /dev/null +++ b/resources/themes/pterodactyl/layouts/scripts.blade.php @@ -0,0 +1 @@ +{{-- Just here as a binder for dynamically rendered content. --}}