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

HUE-6236 [core] Add expand icon to the table extender fixed first column

Enrico Berti 8 жил өмнө
parent
commit
928a7794c6

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


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


+ 7 - 4
desktop/core/src/desktop/static/desktop/js/jquery.tableextender2.js

@@ -414,12 +414,15 @@
     }
     clonedTBody.html(h);
     if (self.options.lockSelectedRow) {
-      clonedTBody.find('td').each(function(){
+      clonedTBody.find('td').each(function(idx){
         var cell = $(this);
-        cell.attr('title', self.options.labels.LOCK).addClass('lockable pointer').on('click', function(){
-          self.drawLockedRow($(this).text()*1);
+        cell.attr('title', self.options.labels.LOCK).addClass('lockable');
+        $('<i>').addClass('fa fa-lock pointer muted').prependTo(cell).on('click', function(){
+          self.drawLockedRow($(this).parent().text()*1);
+        });
+        $('<i>').addClass('fa fa-expand pointer muted').prependTo(cell).on('click', function(){
+          huePubSub.publish('table.row.dblclick', {idx: idx, table: self.$element});
         });
-        $('<i>').addClass('fa fa-lock muted').prependTo(cell);
       });
     }
     clonedTable.find("thead>tr th:eq(0)").width(originalTh.width()).css("background-color", "#FFFFFF");

+ 16 - 5
desktop/core/src/desktop/static/desktop/less/components/hue-tables.less

@@ -457,18 +457,29 @@ div.box {
   position: relative;
 }
 
-.table tr.locked td.unlockable .fa-unlock, .table tr td.lockable .fa-lock {
+.table tr.locked td.unlockable .fa, .table tr td.lockable .fa {
   display: none;
   position: absolute;
-  right: 4px;
-  margin-top: 3px;
+  margin-top: 6px;
+}
+
+.table tr td.lockable .fa-lock {
+  right: 12px;
+}
+
+.table tr.locked td.unlockable .fa-unlock {
+  right: 8px;
+}
+
+.table tr td.lockable .fa-expand {
+  right: 28px;
 }
 
 .table tr.locked td.unlockable:hover, .table tr td.lockable:hover {
-  color: #CCC;
+  color: transparent;
 }
 
-.table tr.locked td.unlockable:hover .fa-unlock, .table tr td.lockable:hover .fa-lock {
+.table tr.locked td.unlockable:hover .fa, .table tr td.lockable:hover .fa {
   color: @cui-gray-800;
   display: block;
 }

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