From f2b4b56aed9c5448aaf37dcf2a50471f20f0a991 Mon Sep 17 00:00:00 2001 From: RubaXa Date: Tue, 15 Jul 2014 09:38:35 +0400 Subject: [PATCH] * cancel; * dialog --- src/Ply.ui.es6 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Ply.ui.es6 b/src/Ply.ui.es6 index 835e698..4fa0d7c 100644 --- a/src/Ply.ui.es6 +++ b/src/Ply.ui.es6 @@ -216,7 +216,7 @@ : { el: data.text || data }, ctrls: { ok: data.ok || defaults.ok, - cancel: data.cancel || defaults.cancel + cancel: data.cancel === false ? null : (data.cancel || defaults.cancel) } }; } @@ -405,7 +405,9 @@ return Ply.open(name, options, data).then((layer) => { return _promise((resolve) => { - layer.options.callback = resolve; + layer.options.close = () => { + resolve(layer.result); + }; }); }); }