Skip to content

Commit 7f48b75

Browse files
committed
Major cleanup of Ace editor files, as well as hopefully fixing broken editor issues.
1 parent 3e7a720 commit 7f48b75

File tree

351 files changed

+44
-360
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

351 files changed

+44
-360
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
77
### Fixed
88
* `[beta.1]` — Fixes task management ststem not running correctly.
99
* `[beta.1]` — Fixes API endpoint for command sending missing the required class definition.
10-
* `[beta.1]` — Fixes panel looking fo an old compiled classfile that is no longer used. This was causing errors relating to `missing class DingoAPI` when trying to upgrade the panel.
10+
* `[beta.1]` — Fixes panel looking for an old compiled classfile that is no longer used. This was causing errors relating to `missing class DingoAPI` when trying to upgrade the panel.
11+
* `[beta.1]` — Should fix render issues when trying to edit some files via the panel file editor.
1112

1213
## v0.6.0-beta.1 (Courageous Carniadactylus)
1314
### Fixed

public/themes/pterodactyl/js/frontend/console.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ var InitialLogSent = false;
5252
TerminalNotifyElement.addClass('hidden');
5353
}
5454
})
55-
// Socket.on('initial status', function (data) {
56-
// Terminal.clear();
57-
// if (data.status === 1 || data.status === 2) {
58-
// Socket.emit('send server log');
59-
// }
60-
// });
6155
})();
6256

6357
(function pushOutputQueue() {
@@ -86,7 +80,6 @@ var InitialLogSent = false;
8680
(function setupSocketListeners() {
8781
// Update Listings on Initial Status
8882
Socket.on('initial status', function (data) {
89-
console.log('initial status 2');
9083
if (! InitialLogSent) {
9184
updateServerPowerControls(data.status);
9285

public/themes/pterodactyl/js/frontend/files/editor.js

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,19 @@
1717
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1818
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1919
// SOFTWARE.
20-
$(document).ready(function () {
21-
const Editor = ace.edit('editor');
22-
const Modelist = ace.require('ace/ext/modelist')
20+
(function () {
21+
window.Editor = ace.edit('editor');
22+
var Whitespace = ace.require('ace/ext/whitespace');
23+
var Modelist = ace.require('ace/ext/modelist');
2324

2425
Editor.setTheme('ace/theme/chrome');
2526
Editor.getSession().setUseWrapMode(true);
2627
Editor.setShowPrintMargin(false);
2728

28-
if (typeof Pterodactyl !== 'undefined' && typeof Pterodactyl.stat !== 'undefined') {
29-
Editor.getSession().setMode(Modelist.getModeForPath(Pterodactyl.stat.name).mode);
29+
if (typeof Pterodactyl !== 'undefined') {
30+
if(typeof Pterodactyl.stat !== 'undefined') {
31+
Editor.getSession().setMode(Modelist.getModeForPath(Pterodactyl.stat.name).mode);
32+
}
3033
}
3134

3235
Editor.commands.addCommand({
@@ -42,6 +45,10 @@ $(document).ready(function () {
4245
readOnly: false
4346
});
4447

48+
Editor.commands.addCommands(Whitespace.commands);
49+
50+
Whitespace.detectIndentation(Editor.session);
51+
4552
$('#save_file').on('click', function (e) {
4653
e.preventDefault();
4754
save();
@@ -121,4 +128,4 @@ $(document).ready(function () {
121128
$('#save_file').html('<i class="fa fa-fw fa-save"></i> &nbsp;Save File').removeClass('disabled');
122129
});
123130
}
124-
});
131+
})();

public/themes/pterodactyl/js/frontend/server.socket.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,11 @@ var Server = (function () {
5050

5151
var notifySocketError = false;
5252

53-
console.log('Starting connection');
5453
window.Socket = io(Pterodactyl.node.scheme + '://' + Pterodactyl.node.fqdn + ':' + Pterodactyl.node.daemonListen + '/ws/' + Pterodactyl.server.uuid, {
5554
'query': 'token=' + Pterodactyl.server.daemonSecret,
5655
});
5756

5857
Socket.io.on('connect_error', function (err) {
59-
console.log('connect_error');
6058
if(typeof notifySocketError !== 'object') {
6159
notifySocketError = $.notify({
6260
message: 'There was an error attempting to establish a WebSocket connection to the Daemon. This panel will not work as expected.<br /><br />' + err,
@@ -69,15 +67,13 @@ var Server = (function () {
6967

7068
// Connected to Socket Successfully
7169
Socket.on('connect', function () {
72-
console.log('connect');
7370
if (notifySocketError !== false) {
7471
notifySocketError.close();
7572
notifySocketError = false;
7673
}
7774
});
7875

7976
Socket.on('initial status', function (data) {
80-
console.log('initial status');
8177
setStatusIcon(data.status);
8278
});
8379

public/themes/pterodactyl/vendor/ace/ace.js

100755100644
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/themes/pterodactyl/vendor/ace/ext-beautify.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

public/themes/pterodactyl/vendor/ace/ext-chromevox.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

public/themes/pterodactyl/vendor/ace/ext-elastic_tabstops_lite.js

100755100644
File mode changed.

public/themes/pterodactyl/vendor/ace/ext-emmet.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

public/themes/pterodactyl/vendor/ace/ext-error_marker.js

100755100644
File mode changed.

0 commit comments

Comments
 (0)