Bläddra i källkod

[search] Fix hover field titles

Enrico Berti 11 år sedan
förälder
incheckning
ae5887e

+ 14 - 8
apps/search/src/search/templates/search2.mako

@@ -456,19 +456,25 @@ ${ commonheader(_('Search'), "search", user, "80px") | n,unicode }
       <table id="result-container" data-bind="visible: !$root.isRetrievingResults()" style="margin-top: 0">
         <thead>
           <tr data-bind="visible: $root.results().length > 0, foreach: $root.collection.template.fieldsSelected">        
-            <th data-bind="with: $root.collection.getTemplateField($data)" style="white-space: nowrap">
-              <a href="javascript: void(0)" data-bind="visible: $index() > 0, 
-                  click: function(){ $root.collection.translateSelectedField($index(), 'left'); }">
-                  <i class="fa fa-chevron-left" data-bind="visible: $root.toggledGridlayoutResultChevron"></i>
+            <th data-bind="with: $root.collection.getTemplateField($data), event: { mouseover: $root.enableGridlayoutResultChevron, mouseout: $root.disableGridlayoutResultChevron }" >
+              <div style="float:left; width:20px;">
+              <a href="javascript: void(0)" data-bind="click: function(){ $root.collection.translateSelectedField($index(), 'left'); }">
+                  <i class="fa fa-chevron-left" data-bind="visible: $root.toggledGridlayoutResultChevron() && $index() > 0"></i>
+                  <i class="fa fa-chevron-left" style="color: #FFF" data-bind="visible: !$root.toggledGridlayoutResultChevron() || $index() == 0"></i>
               </a>
+              </div>
+              <div style="float:left;">
               <a href="javascript: void(0)" title="${ _('Click to sort') }">
-                <span data-bind="text: name, click: $root.collection.toggleSortColumnGridLayout, event: { mouseover: $root.toggleGridlayoutResultChevron, mouseout: $root.toggleGridlayoutResultChevron }"></span>
+                <span data-bind="text: name, click: $root.collection.toggleSortColumnGridLayout"></span>
                 <i class="fa" data-bind="visible: sort.direction() != null, css: { 'fa-chevron-down': sort.direction() == 'desc', 'fa-chevron-up': sort.direction() == 'asc' }"></i>
               </a>
-              <a href="javascript: void(0)" data-bind="visible: $index() < $root.collection.template.fields().length - 1,
-                  click: function(){ $root.collection.translateSelectedField($index(), 'right'); }">
-                  <i class="fa fa-chevron-right" data-bind="visible: $root.toggledGridlayoutResultChevron"></i>
+                </div>
+              <div style="float:left; width:20px;">
+              <a href="javascript: void(0)" data-bind="click: function(){ $root.collection.translateSelectedField($index(), 'right'); }">
+                  <i class="fa fa-chevron-right" data-bind="visible: $root.toggledGridlayoutResultChevron() && $index() < $root.collection.template.fields().length - 1"></i>
+                <i class="fa fa-chevron-up" style="color: #FFF" data-bind="visible: !$root.toggledGridlayoutResultChevron() || $index() == $root.collection.template.fields().length - 1,"></i>
               </a>
+              </div>
             </th>
           </tr>
           <tr data-bind="visible: $root.collection.template.fieldsSelected().length == 0">

+ 5 - 2
apps/search/static/js/search.ko.js

@@ -707,8 +707,11 @@ var SearchViewModel = function (collection_json, query_json, initial_json) {
   };
   self.changeCollection = ko.observable(false);
   self.toggledGridlayoutResultChevron = ko.observable(false);
-  self.toggleGridlayoutResultChevron = function() {
-    self.toggledGridlayoutResultChevron(! self.toggledGridlayoutResultChevron());
+  self.enableGridlayoutResultChevron = function() {
+    self.toggledGridlayoutResultChevron(true);
+  };
+  self.disableGridlayoutResultChevron = function() {
+    self.toggledGridlayoutResultChevron(false);
   };
 
   self.previewColumns = ko.observable("");

+ 1 - 0
desktop/core/static/css/hue3.css

@@ -998,6 +998,7 @@ div.box {
   width: 400px;
   text-align: center;
   z-index: 8000;
+  word-break: break-word;
 }
 
 .jHueNotify .close {