Skip to content

Commit a307ff4

Browse files
committed
Should fix file editing in all bowsers
1 parent 3acc7b3 commit a307ff4

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
1212
* `[beta.2]` — Fixes bug with Terarria and Voice servers reporting a `TypeError: Service is not a constructor` in the daemon due to a missing service configuration.
1313
* `[beta.2]` — Fixes password reset form throwing a MethodNotAllowed error when accessed.
1414
* `[beta.2]` — Fixes invalid password bug when attempting to change account email address.
15+
* `[beta.2]` — New attempt at fixing the issues when rendering files in the browser file editor on certain browsers.
1516

1617
### Changed
1718
* Deleting a server safely now continues even if the daemon reports a `HTTP/404` missing server error (requires `Daemon@0.4.0-beta.2.1`)

resources/themes/pterodactyl/server/files/edit.blade.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@
4444
</div>
4545
</div>
4646
<input type="hidden" name="file" value="{{ $file }}" />
47-
<div class="box-body" style="height:500px;" id="editor">{{ $contents }}</div>
47+
<textarea id="editorSetContent" class="hidden">{{ $contents }}</textarea>
48+
<div class="overlay" id="editorLoadingOverlay"><i class="fa fa-refresh fa-spin"></i></div>
49+
<div class="box-body" style="height:500px;" id="editor"></div>
4850
<div class="box-footer with-border">
4951
<button class="btn btn-sm btn-primary" id="save_file"><i class="fa fa-fw fa-save"></i> &nbsp;@lang('server.files.edit.save')</button>
5052
<a href="/server/{{ $server->uuidShort }}/files#{{ rawurlencode($directory) }}" class="pull-right"><button class="btn btn-default btn-sm">{{ trans('server.files.edit.return') }}</button></a>
@@ -61,4 +63,10 @@
6163
{!! Theme::js('vendor/ace/ext-modelist.js') !!}
6264
{!! Theme::js('vendor/ace/ext-whitespace.js') !!}
6365
{!! Theme::js('js/frontend/files/editor.js') !!}
66+
<script>
67+
$(document).ready(function () {
68+
Editor.setValue($('#editorSetContent').val(), -1);
69+
$('#editorLoadingOverlay').hide();
70+
});
71+
</script>
6472
@endsection

0 commit comments

Comments
 (0)