mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(save_as): imporved save as dialog, now auto focus, and enter key to submit works, closes #2426
This commit is contained in:
parent
dd6a34e60a
commit
0586dbaf8b
@ -14,7 +14,7 @@
|
||||
<div class="text-center">
|
||||
<h4>New title</h4>
|
||||
|
||||
<input type="text" class="input input-fluid" ng-model="clone.title">
|
||||
<input type="text" class="input input-fluid" ng-model="clone.title" give-focus="clone" ng-keydown="keyDown($event)">
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
@ -25,6 +25,12 @@ function (angular) {
|
||||
});
|
||||
}
|
||||
|
||||
$scope.keyDown = function (evt) {
|
||||
if (evt.keyCode === 13) {
|
||||
$scope.saveClone();
|
||||
}
|
||||
};
|
||||
|
||||
$scope.saveClone = function() {
|
||||
saveDashboard({overwrite: false}).then(null, function(err) {
|
||||
if (err.data && err.data.status === "name-exists") {
|
||||
|
@ -17,6 +17,7 @@
|
||||
label.cr1 {
|
||||
margin-left: 5px;
|
||||
}
|
||||
padding: 8px 7px;
|
||||
}
|
||||
|
||||
.submenu-item {
|
||||
|
Loading…
Reference in New Issue
Block a user