Эх сурвалжийг харах

[search] Moved scope to properties

Enrico Berti 10 жил өмнө
parent
commit
cbf941c

+ 10 - 0
apps/search/src/search/static/search/css/search.css

@@ -490,3 +490,13 @@ em {
 .card-column {
   min-height: 400px !important;
 }
+
+.map-scope {
+  position:absolute;
+  margin-left: 51px;
+  margin-top: 130px;
+}
+
+.card-column.span2 .map-scope {
+  margin-left: 0;
+}

+ 14 - 7
apps/search/src/search/templates/search.mako

@@ -309,6 +309,20 @@ ${ dashboard.layout_skeleton() }
         </span>
       </div>
     <!-- /ko -->
+
+    <!-- ko if: widgetType() == 'map-widget' -->
+      <div class="facet-field-cnt">
+        <span class="spinedit-cnt">
+          <span class="facet-field-label facet-field-label-fixed-width">
+            ${ _('Scope') }
+          </span>
+          <select data-bind="selectedOptions: properties.scope" class="input-small">
+            <option value="world">${ _("World") }</option>
+            <option value="usa">${ _("USA") }</option>
+          </select>
+        </span>
+      </div>
+    <!-- /ko -->
     </div>
 
     <!-- ko if: type() == 'pivot' -->
@@ -1141,13 +1155,6 @@ ${ dashboard.layout_skeleton() }
       <div class="clearfix"></div>
 
     </div>
-    <div class="pull-left" data-bind="visible: $root.isEditing" style="margin-left: 51px; margin-top: -48px">
-      <span class="facet-field-label">${ _('Scope') }</span>
-      <select data-bind="selectedOptions: $root.collection.getFacetById($parent.id()).properties.scope" class="input-small" style="margin-left: 9px">
-        <option value="world">${ _("World") }</option>
-        <option value="usa">${ _("USA") }</option>
-      </select>
-    </div>
     <div data-bind="with: $root.collection.getFacetById($parent.id())">
       <div data-bind="mapChart: {data: {counts: $parent.count, scope: $root.collection.getFacetById($parent.id).properties.scope()},
         transformer: mapChartDataTransformer,