Bläddra i källkod

[search] Fix Leaflet map z-index and edit form

Enrico Berti 10 år sedan
förälder
incheckning
8f54840

+ 6 - 4
apps/search/src/search/templates/search.mako

@@ -1109,14 +1109,16 @@ ${ dashboard.layout_skeleton() }
 
 <script type="text/html" id="leafletmap-widget">
   <div class="row-fluid">
-    <div data-bind="visible: $root.isEditing" style="margin-top: 10px; margin-bottom: 20px; text-align: center">
-      ${_('Latitude')}
+    <div data-bind="visible: $root.isEditing" style="margin-top: 10px; margin-bottom: 20px;" class="leaflet-align">
+      ${_('Latitude')}<div class="break-on-small-column"></div>
       <select data-bind="options: $root.collection.template.fieldsNames, value: $root.collection.template.leafletmap.latitudeField, optionsCaption: '${ _('Choose...') }'"></select>
       &nbsp;&nbsp;
-      ${_('Longitude')}
+      <div class="break-on-small-column"></div>
+      ${_('Longitude')}<div class="break-on-small-column"></div>
       <select data-bind="options: $root.collection.template.fieldsNames, value: $root.collection.template.leafletmap.longitudeField, optionsCaption: '${ _('Choose...') }'"></select>
       &nbsp;&nbsp;
-      ${_('Label')}
+      <div class="break-on-small-column"></div>
+      ${_('Label')}<div class="break-on-small-column"></div>
       <select data-bind="options: $root.collection.template.fieldsNames, value: $root.collection.template.leafletmap.labelField, optionsCaption: '${ _('Choose...') }'"></select>
     </div>
 

+ 17 - 1
desktop/core/src/desktop/static/desktop/css/common_dashboard.css

@@ -78,7 +78,7 @@
   top: 70px;
   position: fixed;
   width: 100%;
-  z-index: 1000;
+  z-index: 1001;
 }
 
 .row-header {
@@ -392,3 +392,19 @@ body.modal-open {
   font-weight: bold;
   margin-bottom: 3px;
 }
+
+.break-on-small-column {
+  display: none;
+}
+
+.card-column.span2 .break-on-small-column {
+  display: block;
+}
+
+.leaflet-align {
+  text-align: center;
+}
+
+.card-column.span2 .leaflet-align {
+  text-align: left;
+}