Browse Source

* cancel; * dialog

modules
RubaXa 11 years ago
parent
commit
f2b4b56aed
  1. 6
      src/Ply.ui.es6

6
src/Ply.ui.es6

@ -216,7 +216,7 @@
: { el: data.text || data }, : { el: data.text || data },
ctrls: { ctrls: {
ok: data.ok || defaults.ok, 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 Ply.open(name, options, data).then((layer) => {
return _promise((resolve) => { return _promise((resolve) => {
layer.options.callback = resolve; layer.options.close = () => {
resolve(layer.result);
};
}); });
}); });
} }

Loading…
Cancel
Save