浏览代码

HUE-6077 [oozie] Improved draggable bar resize loop

Enrico Berti 8 年之前
父节点
当前提交
03db1dcd8a

+ 2 - 11
apps/oozie/src/oozie/templates/editor2/workflow_editor.mako

@@ -839,19 +839,10 @@ ${ dashboard.import_bindings() }
     });
 
     function resizeToolbar() {
-      $('.draggable-widget').css('width', '');
-      $('.draggable-widget img').css({
-        'width': '',
-        'height': ''
-      });
-      $('.draggable-widget .draggable-icon').css('fontSize', '');
+      $('.card-toolbar-content').width(100).css('marginLeft', '0');
       if ($('.card-toolbar').height() > 60) {
-        var width = $('.draggable-widget').width();
         while ($('.card-toolbar').height() > 60) {
-          width -= 1;
-          $('.draggable-widget').width(width);
-          $('.draggable-widget img').width(width / 2).height(width / 2);
-          $('.draggable-widget .draggable-icon').css('fontSize', width / 2);
+          $('.card-toolbar-content').width($('.card-toolbar-content').width() + 10);
         }
       }
       var marginLeft = $('.card-toolbar').width() / 2 - $('.card-toolbar-content').width() / 2;

+ 3 - 24
desktop/core/src/desktop/static/desktop/css/common_dashboard.css

@@ -148,7 +148,7 @@
 }
 
 .draggable-widget {
-  width: 60px;
+  width: 40px;
   text-align: center;
   float: left;
   border: 1px solid #CCC;
@@ -162,8 +162,8 @@
 }
 
 .draggable-widget a {
-  font-size: 28px;
-  line-height: 46px;
+  font-size: 20px;
+  line-height: 40px;
 }
 
 .draggable-widget.disabled a {
@@ -171,27 +171,6 @@
   color: #CCC;
 }
 
-@media (max-width: 1438px) {
-  .draggable-widget {
-    width: 50px;
-  }
-
-  .draggable-widget a {
-    font-size: 24px;
-  }
-}
-
-@media (max-width: 1300px) {
-  .draggable-widget {
-    width: 40px;
-  }
-
-  .draggable-widget a {
-    font-size: 20px;
-  }
-}
-
-
 .layout-container {
   width: 100px;
   float: left;