Commit 776a38d2 authored by Niels Holt's avatar Niels Holt

Using fcoo/grunt-fcoo-grunt-plugin^3.0.0

Using fcoo/fcoo-application#^4.0.0
Adjust to new versions
parent 1e75b7a6
......@@ -46,7 +46,7 @@
/**
* Called when something is updated in the datetime selector. If
* type is 'datetime' all overlays with timesteps will be updated
* with a new time. If type is 'timezone' all GeoJSON overlays with
* with a new time. If type is 'timezone' all GeoJSON overlays with
* popups containing '{t}' in their inner HTML gets that replaced.
*
* @param type string
......@@ -251,17 +251,17 @@
} else {
initial_level = null;
}
var datetime_pos = 'bottomleft';
if (desktop) {
datetime_pos = 'bottomcenter';
}
//
$.each(Object.keys(maps), function(index, mapKey) {
$.each(Object.keys(maps), function(index, mapKey) {
var map;
var baseMaps = mapStore.layers.basemaps[mapKey];
var baseMaps = mapStore.layers.basemaps[mapKey];
// Construct map
......@@ -330,7 +330,7 @@
$(mapStore.controls.print._container).addClass("hide-for-print show-for-large-up");
}
} //if (index === 0) {
// Enable sync between maps
if (index !== 0) {
mainMap.sync(map);
......@@ -338,8 +338,8 @@
// Add layer control
var overlayMaps = mapStore.layers.overlays[mapKey];
var layerControl = mapStore.layers.layerControls[mapKey];
map.addControl(layerControl);
var layerControl = mapStore.layers.layerControls[mapKey];
map.addControl(layerControl);
// patch layer control to add some titles
var $form = $(layerControl._form);
......@@ -351,8 +351,8 @@
var result = $('<div/>')
.addClass('fcoo-layercontrol-header');
if (key)
result.append(
$('<span/>').i18n( key )
result.append(
$('<span/>').i18n( key )
);
if ($before)
result.insertBefore( $before );
......@@ -370,7 +370,7 @@
$separator.prependTo( $form );
var $area = addHeader({da:'Område', en:'Area'}, $separator ),
$currentArea = addHeader( '', null, $area );
$currentArea
$currentArea
.css({'line-height':'15px'})
.append( $('<span/>')
.text( window.getI18n('domain-'+window.domain) )
......@@ -404,7 +404,7 @@
moveControlToMenu(map.locateControl);
$(map.zoomControl.getContainer()).hide();
}
// Add datetime control. This is done when the overlays have been
// properly initialized (they retrieve the current timesteps in
// the forecast files asynchronously, so we have to wait until
......@@ -429,7 +429,7 @@
defaultMinimized: false,
displayAsLocal: true,
minMoment: moment(dates[0]),
maxMoment: moment(dates[dates.length-1]),
maxMoment: moment(dates[dates.length-1]),
fromMoment: moment(initial_datetime),
step: moment(dates[1]).diff(moment(dates[0]), 'hours', true),
callbackLocal: function( displayAsLocal ) {
......@@ -438,9 +438,9 @@
},
callback: function( result ) {
map.fire('datetimechange', {datetime: result.fromMoment.toISOString()});
}
}
}).addTo(map);
// When an overlay is added to the map we want the
// When an overlay is added to the map we want the
// datetime control to send a signal that the datetime
// is updated so that the time setting of the just
// added overlay can be set
......@@ -453,7 +453,7 @@
);
// Let overlays on the map know what time it is
map.fire('datetimechange', {datetime: initial_datetime.toISOString()});
} else {
} else {
datetimeControl = (new L.Control.Datetime({
title: window.getI18n('datetime'),
datetimes: dates,
......@@ -521,11 +521,11 @@
map.permalinkControl._update({overlays: appendOverlays});
map.permalinkControl.options.layers.setOverlays(appendOverlays);
}
}
}
}
else {
if (dt_current_levels <= dt_max) {
dt_current_levels += dt_check;
......@@ -554,7 +554,7 @@
}
}
checkTimesteps();
}); //end of $.each(Object.keys(maps),....
}); //end of $.each(Object.keys(maps),....
// Add custom title (unescaped and sanitized) - used for print
if (urlParams.title !== undefined) {
......@@ -567,7 +567,7 @@
}
window.createCommonMap = createCommonMap;
/**
* Initialization prior to DOM is loaded. We create most of the map controls
* here.
......@@ -591,11 +591,11 @@
// Layer control options
var opts = {
collapsed : false,
groupsCollapsed : true,
collapseActiveGroups: true,
minimized : false,
groupsCollapsed : true,
collapseActiveGroups: true,
autoZIndex : false,
position : "topleft",
position : "topleft",
height : 0.8
};
......@@ -655,7 +655,7 @@
// Construct geocoder control
controls.OSMGeocoder = new L.Control.OSMGeocoder({
position: 'bottomright',
position: 'bottomright',
text: window.getI18n('Locate'),
callback: function (results) {
if (results.length === 0) {
......
......@@ -12,7 +12,7 @@
"url": "git://github.com/FCOO/ifm-maps.git"
},
"dependencies": {
"fcoo-application": "fcoo/fcoo-application#^3.0.0",
"fcoo-application": "fcoo/fcoo-application#^4.0.0",
"fcoo-leaflet": "fcoo/fcoo-leaflet#^2.1.0",
"jquery-ui": "1.12.1",
"leaflet-control-position": "fcoo/leaflet-control-position#~0.2.5",
......@@ -90,6 +90,23 @@
"main": [
"leaflet-pip.js"
]
},
"_noty": {
"main": [
"lib/noty.js",
"lib/noty.css"
]
},
"bootstrap": {
"main": [
"scss/bootstrap.scss",
"dist/js/bootstrap.js"
]
},
"jquery.scrollbar": {
"main": [
"jquery.scrollbar.js"
]
}
},
"devDependencies": {
......@@ -109,7 +126,7 @@
"es6"
],
"resolutions": {
"fcoo-application": "^3.0.0",
"fcoo-application": "^4.0.0",
"fcoo-leaflet": "^2.1.0",
"jquery-ui": "1.12.1",
"leaflet-control-position": "~0.2.5",
......@@ -166,6 +183,8 @@
"leaflet-zoom-modernizr": "~1.1.2",
"leaflet.locatecontrol": "~0.60.0",
"leaflet-control-permalink": "^2.0.0",
"leaflet-icon-pulse": "^0.1.0"
"leaflet-icon-pulse": "^0.1.0",
"noty": "^3.1.3",
"bootstrap": "v4.0.0-beta"
}
}
\ No newline at end of file
......@@ -13,7 +13,7 @@
},
"dependencies": {
"grunt": "^1.0.1",
"grunt-fcoo-grunt-plugin": "^2.8.0",
"grunt-fcoo-grunt-plugin": "^3.0.0",
"grunt-real-favicon": "0.2.2"
},
"license": "MIT",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment