Translate overlay type and fix width computation (#379)
This commit is contained in:
parent
e188d8f9de
commit
a0a78cdab2
2 changed files with 8 additions and 3 deletions
|
|
@ -13,20 +13,23 @@ BR.Layers = L.Class.extend({
|
||||||
_loadTable: function () {
|
_loadTable: function () {
|
||||||
var layersData = [];
|
var layersData = [];
|
||||||
for (layer in this._customLayers) {
|
for (layer in this._customLayers) {
|
||||||
|
var isOverlay = this._customLayers[layer].isOverlay;
|
||||||
layersData.push([
|
layersData.push([
|
||||||
layer,
|
layer,
|
||||||
this._customLayers[layer].layer._url,
|
this._customLayers[layer].layer._url,
|
||||||
this._customLayers[layer].isOverlay ? 'Overlay' : 'Layer',
|
isOverlay
|
||||||
|
? i18next.t('sidebar.layers.table.type_overlay')
|
||||||
|
: i18next.t('sidebar.layers.table.type_layer'),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
if (this._layersTable != null) {
|
if (this._layersTable != null) {
|
||||||
this._layersTable.destroy();
|
this._layersTable.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
this._layersTable = $('#custom_layers_table').DataTable({
|
this._layersTable = $('#custom_layers_table').DataTable({
|
||||||
data: layersData,
|
data: layersData,
|
||||||
info: false,
|
info: false,
|
||||||
searching: false,
|
searching: false,
|
||||||
|
bAutoWidth: false,
|
||||||
paging: false,
|
paging: false,
|
||||||
language: {
|
language: {
|
||||||
emptyTable: i18next.t('sidebar.layers.table.empty'),
|
emptyTable: i18next.t('sidebar.layers.table.empty'),
|
||||||
|
|
|
||||||
|
|
@ -246,7 +246,9 @@
|
||||||
"URL": "URL",
|
"URL": "URL",
|
||||||
"empty": "No custom layer configured yet.",
|
"empty": "No custom layer configured yet.",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"type": "Type"
|
"type": "Type",
|
||||||
|
"type_layer": "Layer",
|
||||||
|
"type_overlay": "Overlay"
|
||||||
},
|
},
|
||||||
"title": "Layers",
|
"title": "Layers",
|
||||||
"tooltip": "Select layers"
|
"tooltip": "Select layers"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue