diff --git a/src/c3nav/editor/static/editor/css/editor.css b/src/c3nav/editor/static/editor/css/editor.css
index 98aad291..d7897f77 100644
--- a/src/c3nav/editor/static/editor/css/editor.css
+++ b/src/c3nav/editor/static/editor/css/editor.css
@@ -87,16 +87,24 @@ body {
legend {
margin: 0;
}
-.start-drawing {
+#featuretype_dropdown_btn {
+ cursor:pointer;
+}
+#start-drawing, #cancel-drawing {
display:none;
+ position: absolute;
+ right: 8px;
+ top: 8px;
}
.leaflet-editable-drawing .leaflet-overlay-pane .leaflet-interactive {
cursor:crosshair;
}
+.feature_list {
+ display:none;
+}
.feature_level_list {
list-style-type:none;
display:none;
- margin-bottom:15px;
padding:0;
}
.feature_level_list li {
diff --git a/src/c3nav/editor/static/editor/js/editor.js b/src/c3nav/editor/static/editor/js/editor.js
index 1736d086..4ad01363 100644
--- a/src/c3nav/editor/static/editor/js/editor.js
+++ b/src/c3nav/editor/static/editor/js/editor.js
@@ -29,10 +29,15 @@ editor = {
editor.get_sources();
},
+ _feature_type: null,
get_feature_types: function () {
$.getJSON('/api/featuretypes/', function (feature_types) {
var feature_type;
- var editcontrols = $('#mapeditlist');
+ var listcontainer = $('#mapeditlist fieldset');
+ var dropdown = $('#featuretype_dropdown').on('click', 'a', function(e) {
+ e.preventDefault();
+ editor.set_current_feature_type($(this).parent().attr('data-name'));
+ });
for (var i = 0; i < feature_types.length; i++) {
feature_type = feature_types[i];
editor.feature_types[feature_type.name] = feature_type;
@@ -40,17 +45,32 @@ editor = {
feature_type.fillOpacity = 0.6;
feature_type.smoothFactor = 0;
editor.feature_types_order.push(feature_type.name);
- editcontrols.append(
- $('