Selaa lähdekoodia

HUE-8046 [frontend] Improve the global search result list layout

This adds hover effects and improved separation between the alternatives.
Johan Ahlen 7 vuotta sitten
vanhempi
commit
d424f3a591

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue-embedded.css


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue.css


+ 8 - 0
desktop/core/src/desktop/static/desktop/less/hue4.less

@@ -983,6 +983,14 @@ a:visited {
           }
         }
 
+        li:not(:first-child).result {
+          border-top: 1px solid @cui-blue-010;
+        }
+
+        li.result:hover {
+          background-color: @hue-primary-color-light;
+        }
+
         li.selected {
           background-color: @hue-primary-color-light;
         }

+ 2 - 2
desktop/core/src/desktop/templates/ko_components/ko_global_search.mako

@@ -59,13 +59,13 @@ from desktop.views import _ko
           <ul>
             <!-- ko foreach: expanded() ? result : topMatches -->
             <!-- ko if: typeof draggable !== 'undefined' -->
-            <li data-bind="multiClick: {
+            <li class="result" data-bind="multiClick: {
                 click: function () { $parents[1].resultSelected($parentContext.$index(), $index()) },
                 dblClick: function () { $parents[1].resultSelected($parentContext.$index(), $index()); $parents[1].openResult(); }
               }, html: label, css: { 'selected': $parents[1].selectedResult() === $data }, draggableText: { text: draggable, meta: draggableMeta }"></li>
             <!-- /ko -->
             <!-- ko if: typeof draggable === 'undefined' -->
-            <li data-bind="multiClick: {
+            <li class="result" data-bind="multiClick: {
                 click: function () { $parents[1].resultSelected($parentContext.$index(), $index()) },
                 dblClick: function () { $parents[1].resultSelected($parentContext.$index(), $index()); $parents[1].openResult(); }
               }, html: label, css: { 'selected': $parents[1].selectedResult() === $data }"></li>

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä