Show missing filename in load no-go areas dialog
5b52abc1 copied `<label>` and `<input>` from the `loadedittrackForm` for
consistency, but missed to add some corresponding code to `NoGoAreas.js`.
After completing the implementation, the filename for loading no-go areas is now
displayed after selecting a file just like in the "Load track as route" dialog.
Test Plan:
- Open "Load no-go areas" dialog.
- Browse and select file.
- The filename should now be shown next to "Browse".
This commit is contained in:
parent
ef37b65c75
commit
8b9fda47ad
1 changed files with 7 additions and 0 deletions
|
|
@ -98,6 +98,8 @@ BR.NogoAreas = L.Control.extend({
|
|||
|
||||
L.DomEvent.addListener(document, 'keydown', this._keydownListener, this);
|
||||
|
||||
L.DomUtil.get('nogoFile').onchange = L.bind(this.onFileChanged, this);
|
||||
|
||||
this.editTools.on(
|
||||
'editable:drawing:end',
|
||||
function (e) {
|
||||
|
|
@ -170,6 +172,11 @@ BR.NogoAreas = L.Control.extend({
|
|||
$('#nogoError').css('display', message ? 'block' : 'none');
|
||||
},
|
||||
|
||||
onFileChanged: function (e) {
|
||||
if (!e.target.files[0]) return;
|
||||
$(e.target).next('label').text(e.target.files[0].name);
|
||||
},
|
||||
|
||||
uploadNogos: function () {
|
||||
var self = this;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue