Aufgrund einer Wartung wird GitLab am 21.09. zwischen 8:00 und 9:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 21.09. between 8:00 and 9:00 am.

Commit 040a0772 authored by Benjamin Fischer's avatar Benjamin Fischer
Browse files

DialogPrompt: added abort method (callback gets called with *null*)

parent e5426a8e
......@@ -5,4 +5,5 @@
:type="password ? 'password' : 'text'"
:placeholder="placeholder"
@keypress.13="close"
@keydown.27="abort"
>
......@@ -277,9 +277,15 @@ define([
},
beforeDestroy: function() {
if (this.callback) {
this.callback.call(this, this.value);
this.callback.call(this, this.aborted ? null : this.value);
}
},
methods: {
abort: function() {
this.aborted = true;
this.close();
},
},
partials: {
body: tPrompt.trim(),
},
......@@ -411,7 +417,7 @@ define([
cancel: {
label: opts.cancelLabel || "Cancel",
callback: function() {
this.value = null;
this.aborted = true;
},
},
ok: {
......
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