Преглед изворни кода

add keyboard shotcuts for collapse/expand rows

Mitsuhiro Tanda пре 9 година
родитељ
комит
5a30b08b14
1 измењених фајлова са 14 додато и 0 уклоњено
  1. 14 0
      public/app/core/services/keybindingSrv.ts

+ 14 - 0
public/app/core/services/keybindingSrv.ts

@@ -187,6 +187,20 @@ export class KeybindingSrv {
       }
     });
 
+    // collapse all rows
+    this.bind('r C', () => {
+      _.each(dashboard.rows, function(row) {
+        row.collapse = true;
+      });
+    });
+
+    // expand all rows
+    this.bind('r E', () => {
+      _.each(dashboard.rows, function(row) {
+        row.collapse = false;
+      });
+    });
+
     this.bind('d r', () => {
       scope.broadcastRefresh();
     });