aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/static/js
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/static/js')
-rw-r--r--mediagoblin/static/js/geolocation-map.js6
-rw-r--r--mediagoblin/static/js/header_dropdown.js24
2 files changed, 23 insertions, 7 deletions
diff --git a/mediagoblin/static/js/geolocation-map.js b/mediagoblin/static/js/geolocation-map.js
index 26d94c5d..c30788f7 100644
--- a/mediagoblin/static/js/geolocation-map.js
+++ b/mediagoblin/static/js/geolocation-map.js
@@ -30,13 +30,11 @@ $(document).ready(function () {
// Get a new map instance attached and element with id="tile-map"
var map = new L.Map('tile-map');
- var mqtileUrl = 'http://otile{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.jpg';
+ var mqtileUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
var mqtileAttrib = '<a id="osm_license_link">see map license</a>';
var mqtile = new L.TileLayer(
mqtileUrl,
- {maxZoom: 18,
- attribution: mqtileAttrib,
- subdomains: '1234'});
+ {maxZoom: 18});
map.attributionControl.setPrefix('');
var location = new L.LatLng(latitude, longitude);
diff --git a/mediagoblin/static/js/header_dropdown.js b/mediagoblin/static/js/header_dropdown.js
index 3ee46228..979d2690 100644
--- a/mediagoblin/static/js/header_dropdown.js
+++ b/mediagoblin/static/js/header_dropdown.js
@@ -17,9 +17,27 @@
*/
$(document).ready(function(){
- $("#header_dropdown").hide();
- $(".header_dropdown_up").hide();
- $(".header_dropdown_down,.header_dropdown_up").click(function() {
+ // The header drop-down header panel defaults to open until you explicitly
+ // close it. After that, the panel open/closed setting will persist across
+ // page loads.
+
+ // Initialise the panel status when page is loaded.
+ if (localStorage.getItem("panel_closed")) {
+ $("#header_dropdown").hide();
+ $(".header_dropdown_up").hide();
+ }
+ else {
+ $(".header_dropdown_down").hide();
+ }
+
+ // Toggle and persist the panel status.
+ $(".header_dropdown_down, .header_dropdown_up").click(function() {
+ if (localStorage.getItem("panel_closed")) {
+ localStorage.removeItem("panel_closed");
+ }
+ else {
+ localStorage.setItem("panel_closed", "true");
+ }
$(".header_dropdown_down").toggle();
$(".header_dropdown_up").toggle();
$("#header_dropdown").slideToggle();