Переглянути джерело

HUE-3806 [search] Long fields in grid widget legend scroll weirdly

Enrico Berti 9 роки тому
батько
коміт
97ced2c
1 змінених файлів з 8 додано та 2 видалено
  1. 8 2
      apps/search/src/search/templates/search.mako

+ 8 - 2
apps/search/src/search/templates/search.mako

@@ -655,10 +655,10 @@ ${ dashboard.layout_skeleton() }
           <strong>${_('Field Name')}</strong>
         </div>
         <div class="fields-list" data-bind="foreach: $root.collection.template.filteredAttributeFields">
-          <div style="margin-bottom: 3px; white-space: nowrap">
-            <i class="fa fa-question-circle pull-right muted pointer analysis" data-bind="click: function() { $root.fieldAnalysesName(name()); $root.showFieldAnalysis(); }, attr: {'title': '${ _ko('Click to analyze field') } ' + name() + ' (' + type() + ')'}"></i>
+          <div style="margin-bottom: 3px; white-space: nowrap; position:relative">
             <input type="checkbox" data-bind="checkedValue: name, checked: $root.collection.template.fieldsSelected" style="margin: 0" />
             <div data-bind="text: name, css:{'field-selector': true, 'hoverable': $root.collection.template.fieldsSelected.indexOf(name()) > -1}, click: highlightColumn" style="margin-right:10px"></div>
+            <i class="fa fa-question-circle muted pointer analysis" data-bind="click: function() { $root.fieldAnalysesName(name()); $root.showFieldAnalysis(); }, attr: {'title': '${ _ko('Click to analyze field') } ' + name() + ' (' + type() + ')'}" style="position:absolute; left: 184px; background-color: #FFF"></i>
           </div>
         </div>
         <div data-bind="visible: $root.collection.template.filteredAttributeFields().length == 0" style="padding-left:4px; padding-top:5px; font-size:40px; color:#CCC">
@@ -2634,6 +2634,12 @@ function resizeFieldsList() {
       $(".fields-list").css("max-height", _fillHeight);
     }
   }, 100);
+  function positionInfo() {
+    $('.fields-list i').css('left', (184 + $('.fields-list').scrollLeft()) + 'px');
+  }
+
+  $('.fields-list').off('scroll');
+  $('.fields-list').on('scroll', positionInfo);
 }
 
 function toggleDocDetails(doc) {