Browse Source

HUE-3794 [editor] Click on a result row to highlight

Enrico Berti 9 years ago
parent
commit
499eee1

+ 5 - 0
desktop/core/src/desktop/static/desktop/css/hue3.css

@@ -1005,6 +1005,11 @@ div.box {
   background-color: #EFEFEF;
 }
 
+.table tr.selected, .table tr.selected td {
+  background-color: #DBE8F1!important;
+}
+
+
 .nounderline:hover {
   text-decoration: none;
 }

+ 10 - 0
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -3026,6 +3026,16 @@ ${ hueIcons.symbols() }
         }
       });
 
+      $(document).on('click', '.resultTable tbody tr', function () {
+        if ($(this).hasClass('selected')) {
+          $(this).removeClass('selected');
+        }
+        else {
+          $('.resultTable tbody tr.selected').removeClass('selected');
+          $(this).addClass('selected');
+        }
+      });
+
       function resizeToggleResultSettings (snippet) {
         var _dtElement;
         if (snippet.showGrid()) {