mirror of
https://github.com/valitydev/redash.git
synced 2024-11-06 17:15:17 +00:00
Save query when pressing Cmd+S.
This commit is contained in:
parent
7282f61133
commit
fd1acd6533
@ -101,6 +101,8 @@
|
||||
<script src="/bower_components/angular-growl/build/angular-growl.js"></script>
|
||||
<script src="/bower_components/pivottable/examples/pivot.js"></script>
|
||||
<script src="/bower_components/cornelius/src/cornelius.js"></script>
|
||||
<script src="/bower_components/mousetrap/mousetrap.js"></script>
|
||||
<script src="/bower_components/mousetrap/plugins/global-bind/mousetrap-global-bind.js"></script>
|
||||
<!-- endbuild -->
|
||||
|
||||
<!-- build:js({.tmp,app}) /scripts/scripts.js -->
|
||||
|
@ -39,6 +39,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
Mousetrap.bindGlobal("meta+s", function(e) {
|
||||
e.preventDefault();
|
||||
$scope.saveQuery();
|
||||
});
|
||||
|
||||
$scope.$on('$locationChangeStart', function(event, next, current) {
|
||||
if (next.split("#")[0] == current.split("#")[0]) {
|
||||
return;
|
||||
@ -48,6 +53,8 @@
|
||||
!confirm(leavingPageText + "\n\nAre you sure you want to leave this page?")) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
Mousetrap.unbind("meta+s");
|
||||
});
|
||||
|
||||
$scope.$parent.pageTitle = "Query Fiddle";
|
||||
|
@ -17,7 +17,8 @@
|
||||
"angular-growl": "0.3.1",
|
||||
"pivottable": "git@github.com:arikfr/pivottable.git#master",
|
||||
"cornelius": "git@github.com:restorando/cornelius.git",
|
||||
"gridster": "0.2.0"
|
||||
"gridster": "0.2.0",
|
||||
"mousetrap": "~1.4.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"angular-mocks": "~1.0.7",
|
||||
|
Loading…
Reference in New Issue
Block a user