Commit 6e785237 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge remote-tracking branch 'origin/feature_4144'

parents b5fa5ea3 d5863522
......@@ -216,11 +216,19 @@ var QfqNS = QfqNS || {};
n.QfqForm.prototype.dirtyNotifyDenied = function (obj) {
var messageType;
var isModal = false;
var messageButtons = [];
var message;
var that = this;
switch (obj.data.status) {
case "conflict":
messageType = "error";
isModal = true;
messageButtons.push({
label: "Reload",
eventName: 'reload'
});
this.setButtonEnabled(this.getSaveButton(), false);
this.getSaveButton().removeClass(this.getSaveButtonAttentionClass());
this.setButtonEnabled(this.getDeleteButton(), false);
......@@ -249,7 +257,13 @@ var QfqNS = QfqNS || {};
message = new n.Alert({
message: obj.data.message,
type: messageType,
timeout: n.Alert.constants.NO_TIMEOUT
timeout: n.Alert.constants.NO_TIMEOUT,
modal: isModal,
buttons: messageButtons
});
message.on('alert.reload', function () {
that.eventEmitter.emitEvent('qfqform.close-intentional', n.EventEmitter.makePayload(that, null));
window.location.reload(true);
});
message.show();
};
......
Supports Markdown
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