feat(save_as): imporved save as dialog, now auto focus, and enter key to submit works, closes #2426

This commit is contained in:
Torkel Ödegaard 2015-08-03 10:46:07 +02:00
parent dd6a34e60a
commit 0586dbaf8b
3 changed files with 8 additions and 1 deletions

View File

@ -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>

View File

@ -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") {

View File

@ -17,6 +17,7 @@
label.cr1 {
margin-left: 5px;
}
padding: 8px 7px;
}
.submenu-item {