diff --git a/javascript/src/FileDelete.js b/javascript/src/FileDelete.js index 40324659593e1a7cd41618aaebe2fd3551470d3c..bf699d593149a1393d7f60481ca8ae81bc43b8ec 100644 --- a/javascript/src/FileDelete.js +++ b/javascript/src/FileDelete.js @@ -27,7 +27,9 @@ var QfqNS = QfqNS || {}; n.FileDelete.prototype.buttonClicked = function (event) { event.preventDefault(); - var alert = new n.Alert("Do you want to delete the file?", "warning", "okcancel"); + var alert = new n.Alert("Do you want to delete the file?", + "warning", + [{label: "OK", eventName: "ok"}, {label: "Cancel", eventName: "cancel"}]); alert.on('alert.ok', function () { this.performFileDelete(event); }.bind(this)); diff --git a/javascript/src/QfqForm.js b/javascript/src/QfqForm.js index 96ea6e862c73b888b38662a867c9d7ff25883309..04a548259dbd8244953af72ed0343b5e7fb1145f 100644 --- a/javascript/src/QfqForm.js +++ b/javascript/src/QfqForm.js @@ -93,7 +93,6 @@ var QfqNS = QfqNS || {}; }; - /** * * @private @@ -291,7 +290,11 @@ var QfqNS = QfqNS || {}; n.QfqForm.prototype.handleCloseClick = function () { this.lastButtonPress = "close"; if (this.form.getFormChanged()) { - var alert = new n.Alert("You have unsaved changes. Do you want to close?", "warning", "yesnosave"); + var alert = new n.Alert("You have unsaved changes. Do you want to close?", "warning", + [{label: "Yes", eventName: "ok"}, {label: "No", eventName: "no"}, { + label: "Save & Close", + eventName: "save" + }]); var that = this; alert.on('alert.save', function () { that.submit(); @@ -333,7 +336,12 @@ var QfqNS = QfqNS || {}; this.lastButtonPress = "new"; if (this.form.getFormChanged()) { - var alert = new n.Alert("You have unsaved changes. Do you want to close?", "warning", "yesnosave"); + var alert = new n.Alert("You have unsaved changes. Do you want to close?", "warning", + [ + {label: "Yes", eventName: "ok"}, + {label: "No", eventName: "cancel"}, + {label: "Save & Close", eventName: "save"} + ]); var that = this; alert.on('alert.save', function () { that.submit(); @@ -356,7 +364,11 @@ var QfqNS = QfqNS || {}; n.QfqForm.prototype.handleDeleteClick = function () { this.lastButtonPress = "delete"; n.Log.debug("delete click"); - var alert = new n.Alert("Do you really want to delete the record?", "warning", "yesno"); + var alert = new n.Alert("Do you really want to delete the record?", "warning", + [ + {label: "Yes", eventName: "ok"}, + {label: "No", eventName: "cancel"} + ]); var that = this; alert.on('alert.ok', function () { $.post(that.deleteUrl) diff --git a/javascript/src/QfqRecordList.js b/javascript/src/QfqRecordList.js index 18ea78a6f8a20ee521b5c269c7488829cf6cbe03..0dba04fe40ac4e67d15db0dbcf7150fa40880fc9 100644 --- a/javascript/src/QfqRecordList.js +++ b/javascript/src/QfqRecordList.js @@ -40,7 +40,11 @@ var QfqNS = QfqNS || {}; } - var alert = new n.Alert("Do you really want to delete the record?", "warning", "yesno"); + var alert = new n.Alert("Do you really want to delete the record?", "warning", + [ + {label: "Yes", eventName: "ok"}, + {label: "No", eventName: "cancel"} + ]); var that = this; alert.on('alert.ok', function () { $.post(that.deleteUrl + "?s=" + sip)