Commit 0586dbaf by Torkel Ödegaard

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

parent dd6a34e6
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment