Browse Source

HUE-6237 [editor] Avoid blinking of the result headers on paste

Enrico Berti 8 years ago
parent
commit
69adbab

File diff suppressed because it is too large
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue.css


File diff suppressed because it is too large
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue3-extra.css


+ 8 - 3
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -1978,12 +1978,12 @@
       var $contentPanel = $(".content-panel");
       var $execStatus = $resizer.prev('.snippet-execution-status');
 
-      var lastEditorSize = $.totalStorage('hue.editor.editor.size') || 128;
+      var lastEditorSize = $.totalStorage('hue.editor.editor.size') || 131;
       var editorHeight = Math.floor(lastEditorSize / 16);
       $target.height(lastEditorSize);
       var autoExpand = true;
 
-      ace().on('change', function () {
+      function throttleChange() {
         if (autoExpand) {
           var maxAutoLines = Math.floor((($(window).height() - 80) / 2) / 16);
           var resized = false;
@@ -2013,6 +2013,12 @@
             huePubSub.publish('redraw.fixed.headers');
           }
         }
+      }
+
+      var changeTimeout = -1;
+      ace().on('change', function () {
+        window.clearTimeout(changeTimeout);
+        changeTimeout = window.setTimeout(throttleChange, 10)
       });
 
       $resizer.draggable({
@@ -2252,7 +2258,6 @@
 
         },
         stop: function () {
-          console.log('stop');
           if (isRightPanel) {
             $.totalStorage(options.appName + "_right_panel_width", rightPanelWidth);
           } else {

+ 6 - 0
desktop/core/src/desktop/static/desktop/less/components/hue-tables.less

@@ -164,6 +164,12 @@ table.display td.center {
 
 .table-huedatatable {
   margin-bottom: 0!important;
+  thead {
+    th {
+      color: @cui-gray-700!important;
+      background-color: @cui-white;
+    }
+  }
 }
 
 .table-huedatatable td.stripe {

Some files were not shown because too many files changed in this diff