dashboard: slightly better admin notes edit handling

This commit is contained in:
Johannes Zellner
2024-06-13 15:48:35 +02:00
parent c3f9d688f1
commit d688f5e080
3 changed files with 10 additions and 9 deletions

View File

@@ -141,14 +141,17 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
hasOldChecklist: false,
notes: {
busy: false,
busy: true,
editing: false,
content: '',
placeholder: 'Add admin notes here...',
edit: function () {
$scope.info.notes.busy = false;
$scope.info.notes.content = $scope.app.notes;
$scope.info.notes.editing = true;
setTimeout(function () { document.getElementById('adminNotesTextarea').focus(); }, 1);
},
dismiss: function () {
@@ -166,8 +169,8 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
refreshApp($scope.app.id, function (error) {
if (error) return Client.error(error);
$scope.info.notes.busy = false;
$scope.info.notes.editing = false;
$scope.info.notes.busy = false;
});
});
}