Bug Fix #80 - Prompt for attachment comment

This commit is contained in:
Gary Sharp
2016-09-29 18:32:52 +10:00
parent 3c521541fd
commit 5fcb81e9e8
@@ -162,8 +162,10 @@
var comments = dialog.find('input.comments')
.keypress(function (e) {
if (e.which === 13) {
result = true;
dialog.dialog("close");
if (!!comments.val()) {
result = true;
dialog.dialog("close");
}
}
});
@@ -174,8 +176,15 @@
autoOpen: true,
buttons: {
"Upload": function () {
result = true;
dialog.dialog("close");
if (!!comments.val()) {
result = true;
dialog.dialog("close");
window.setTimeout(function () {
comments.focus();
}, 1);
} else {
alert('Please provide a comment for this attachment.');
}
},
Cancel: function () {
dialog.dialog("close");