diff --git a/bims/static/js/views/olmap_layers.js b/bims/static/js/views/olmap_layers.js index 67fd5a73a..d4b1fbd8b 100644 --- a/bims/static/js/views/olmap_layers.js +++ b/bims/static/js/views/olmap_layers.js @@ -1046,9 +1046,19 @@ define(['shared', 'backbone', 'underscore', 'jquery', 'jqueryUi', 'jqueryTouch', let order = Shared.StorageUtil.getItemDict(layerName, 'order'); if (order != null) { self.changeLayerOder(layerName, order); + } else { + if (layerName === 'Sites') { + self.changeLayerOder(layerName, 0) + } } }); - self.layerSelector.trigger('sortupdate'); + if (self && self.layerSelector) { + self.layerSelector.trigger('sortupdate'); + } else { + setTimeout(function () { + self.layerSelector.trigger('sortupdate'); + }, 600) + } } }) }); diff --git a/deployment/docker/REQUIREMENTS.txt b/deployment/docker/REQUIREMENTS.txt index 47b15d3e2..ef51eb1f4 100644 --- a/deployment/docker/REQUIREMENTS.txt +++ b/deployment/docker/REQUIREMENTS.txt @@ -31,7 +31,7 @@ django-modelsdoc==0.1.11 # contacts page django-contact-us==0.4.3 -django-ordered-model==3.4.1 +django-ordered-model==3.7.4 # Statistics Dashboard diff --git a/deployment/production/REQUIREMENTS.txt b/deployment/production/REQUIREMENTS.txt index 47b15d3e2..ef51eb1f4 100644 --- a/deployment/production/REQUIREMENTS.txt +++ b/deployment/production/REQUIREMENTS.txt @@ -31,7 +31,7 @@ django-modelsdoc==0.1.11 # contacts page django-contact-us==0.4.3 -django-ordered-model==3.4.1 +django-ordered-model==3.7.4 # Statistics Dashboard