diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-03-22 22:58:18 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-03-22 22:58:18 -0700 |
commit | ba9cc86f667486a09edb323402c2d63ada5ea639 (patch) | |
tree | 8df80eca54f9dd39664f63365ffcc2ec248fb3df /web/app/view/UnescapedTextAreaField.js | |
parent | 990d485a21c945e7d57b85378650a65f3e79eed3 (diff) | |
parent | f5165c8e897e8d9cf4219d943e2d34b61adb48b5 (diff) | |
download | trackermap-web-ba9cc86f667486a09edb323402c2d63ada5ea639.tar.gz trackermap-web-ba9cc86f667486a09edb323402c2d63ada5ea639.tar.bz2 trackermap-web-ba9cc86f667486a09edb323402c2d63ada5ea639.zip |
Merge branch 'master' into modern
Diffstat (limited to 'web/app/view/UnescapedTextAreaField.js')
-rw-r--r-- | web/app/view/UnescapedTextAreaField.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/web/app/view/UnescapedTextAreaField.js b/web/app/view/UnescapedTextAreaField.js new file mode 100644 index 00000000..5de267ce --- /dev/null +++ b/web/app/view/UnescapedTextAreaField.js @@ -0,0 +1,29 @@ +/* + * Copyright 2019 Anton Tananaev (anton@traccar.org) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +Ext.define('Traccar.view.UnescapedTextAreaField', { + extend: 'Ext.form.field.TextArea', + xtype: 'unescapedTextAreaField', + + initComponent: function () { + this.callParent(); + this.on('change', this.onValueChange); + }, + + onValueChange: function (field, newValue) { + field.setValue(Ext.String.htmlDecode(newValue)); + } +}); |