瀏覽代碼

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', () => {
     this.bind('d r', () => {
       scope.broadcastRefresh();
       scope.broadcastRefresh();
     });
     });