Эх сурвалжийг харах

HUE-7938 [dashboard] Improve dimensions editing UX

Enrico Berti 7 жил өмнө
parent
commit
49b398b

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue-embedded.css


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue.css


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue3-extra.css


+ 7 - 1
desktop/core/src/desktop/static/desktop/less/components/hue-gridster.less

@@ -33,13 +33,19 @@
       }
     }
     & > li:hover {
-      border-color: @cui-gray-100;
+
       .grid-left-bar {
         opacity: 1;
       }
     }
   }
 
+  & > ul.is-adding {
+    & > li:hover {
+      border-color: @cui-gray-100;
+    }
+  }
+
   .card-widget {
     width: 100% !important;
     margin: 0 !important;

+ 1 - 1
desktop/core/src/desktop/templates/common_dashboard.mako

@@ -177,7 +177,7 @@
   <!-- ko if: $root.isGridster -->
     <div class="gridster">
       <!-- ko if: typeof gridItems !== 'undefined' -->
-      <ul class="unstyled" data-bind="css: { 'is-editing': $root.isEditing }, gridster: { items: gridItems, template: 'widget-template-gridster${ suffix }' }"></ul>
+      <ul class="unstyled" data-bind="css: { 'is-adding': $root.isToolbarVisible }, gridster: { items: gridItems, template: 'widget-template-gridster${ suffix }' }"></ul>
       <!-- /ko -->
     </div>
   <!-- /ko -->

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/libs/dashboard/src/dashboard/static/dashboard/css/common_dashboard.css


+ 0 - 1
desktop/libs/dashboard/src/dashboard/static/dashboard/less/common_dashboard.less

@@ -504,7 +504,6 @@
 
   .edit-dimensions {
     padding: 6px;
-    margin-bottom: 20px;
     .ui-sortable {
       min-height: 0 !important;
       background-color: transparent !important;

+ 19 - 0
desktop/libs/dashboard/src/dashboard/templates/common_search.mako

@@ -4212,6 +4212,19 @@ $(document).ready(function () {
     }
   }, 'dashboard');
 
+  huePubSub.subscribe('dashboard.hide.dimensions', function (event) {
+    if (!event || (event && !$(event.target).parents('.edit-dimensions').length)) {
+      searchViewModel.collection.facets().forEach(function (facet) {
+        facet.isAdding(false);
+        if (facet.properties && facet.properties.facets()) {
+          facet.properties.facets().forEach(function (dimension) {
+            dimension.isEditing(false);
+          });
+        }
+      });
+    }
+  }, 'dashboard');
+
 
   $(document).on("click", ".widget-settings-pill", function(){
     $(this).parents(".card-body").find(".widget-section").hide();
@@ -4244,6 +4257,10 @@ $(document).ready(function () {
     $(this).parent().addClass("active");
   });
 
+  $('.dashboard-container').on('click', function (e) {
+    huePubSub.publish('dashboard.hide.dimensions', e);
+  });
+
   $(document).on("magicSearchLayout", function(){
     resizeFieldsList();
   });
@@ -4309,10 +4326,12 @@ $(document).ready(function () {
     return false;
   });
   % endif
+
   $(window).bind("keydown.search", "esc", function () {
     if ($(".demi-modal.fade.in").length > 0) {
       $(".demi-modal.fade.in .demi-modal-chevron").click();
     }
+    huePubSub.publish('dashboard.hide.dimensions');
   });
 
   $("#newqname").bind("keydown.search", "return", function (e) {

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно