Commit 6ab12aae authored by Boris Kocherov's avatar Boris Kocherov

rerender can use scope and path

 in this case subgadget calculate as gadget inside gadget (scope) by path
parent 95a9a3d8
...@@ -967,22 +967,25 @@ ...@@ -967,22 +967,25 @@
var g = this, var g = this,
gadget, gadget,
queue = RSVP.Queue(); queue = RSVP.Queue();
if (opt.path) { if (opt.scope) {
queue queue
.push(function () { .push(function () {
return g.props.form_gadget.getGadgetByPath(opt.path); return g.props.form_gadget.getDeclaredGadget(opt.scope);
}) })
.push(function (ret) { .push(function (ret) {
gadget = ret.gadget; gadget = ret;
}); });
} }
if (opt.scope) { if (opt.path) {
queue queue
.push(function () { .push(function () {
return g.props.form_gadget.getDeclaredGadget(opt.scope); if (!gadget) {
gadget = g.props.form_gadget;
}
return gadget.getGadgetByPath(opt.path);
}) })
.push(function (ret) { .push(function (ret) {
gadget = ret; gadget = ret.gadget;
}); });
} }
return queue return queue
......
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