1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 15:47:00 +02:00

JS: Use arrow functions

All function () {} left in the code reference `this` and thus couldn't use arrow functions.
This commit is contained in:
Jakub Vrana
2025-03-20 10:22:44 +01:00
parent 3c310ddfaf
commit 1f5a7fa717
12 changed files with 31 additions and 35 deletions

View File

@@ -61,8 +61,8 @@ tinyMCE.init({
return "<textarea$attrs id='fields-" . Adminer\h($field["field"]) . "' rows='12' cols='50'>" . Adminer\h($value) . "</textarea>" . Adminer\script("
tinyMCE.remove(tinyMCE.get('fields-" . Adminer\js_escape($field["field"]) . "') || { });
tinyMCE.EditorManager.execCommand('mceAddControl', true, 'fields-" . Adminer\js_escape($field["field"]) . "');
qs('#form').onsubmit = function () {
tinyMCE.each(tinyMCE.editors, function (ed) {
qs('#form').onsubmit = () => {
tinyMCE.each(tinyMCE.editors, ed => {
ed.remove();
});
};