Commit 68466b10 authored by Boris Kocherov's avatar Boris Kocherov

[erp5_only_office] olap_wizard form refactor before multi level implement

parent 8b5d0953
...@@ -195,6 +195,10 @@ ...@@ -195,6 +195,10 @@
} }
if (arr[2] && arr[2].length !== 0) { if (arr[2] && arr[2].length !== 0) {
schema.properties.level = { schema.properties.level = {
// type: "array",
// items: {
// oneOf: arr[2]
// }
title: " ", title: " ",
oneOf: arr[2] oneOf: arr[2]
}; };
...@@ -202,7 +206,8 @@ ...@@ -202,7 +206,8 @@
return schema; return schema;
}) })
.push(undefined, function () { .push(undefined, function (err) {
console.error(err);
return schema; return schema;
}); });
} }
...@@ -258,6 +263,7 @@ ...@@ -258,6 +263,7 @@
used_hierarchy, used_hierarchy,
url = arr[0].ref, url = arr[0].ref,
allRerender, allRerender,
q,
y; y;
function rerender(sub_scope) { function rerender(sub_scope) {
...@@ -324,39 +330,40 @@ ...@@ -324,39 +330,40 @@
return RSVP.all(g.props.choices.map(function (q) { return RSVP.all(g.props.choices.map(function (q) {
return rerender(q); return rerender(q);
})); }));
})
.push(function () {
return g.notifyChange();
}); });
}; };
if ("urn:jio:remote_connections.json" === url) {
return allRerender();
}
if (action === "render") { if (action === "render") {
if ("urn:jio:choice.json" === url) { if ("urn:jio:choice.json" === url) {
g.props.choices.push(scope); g.props.choices.push(scope);
} }
// action `render` fake change so do nothing // XXX action `render` fake change so do nothing
return; } else if ("urn:jio:remote_connections.json" === url) {
} q = allRerender();
for (y = 0; y < g.props.choices.length; y += 1) { } else {
s = g.props.choices[y]; for (y = 0; y < g.props.choices.length; y += 1) {
if (scope.startsWith(s)) { s = g.props.choices[y];
if (action === "delete") { if (scope.startsWith(s)) {
g.props.choices.splice(y, 1); if (action === "delete") {
return allRerender(); g.props.choices.splice(y, 1);
} q = allRerender();
if (relPath === "/hierarchy") { } else if (relPath === "/hierarchy") {
return allRerender(); q = allRerender();
} else {
q = rerender(s);
}
} }
return rerender(s)
.push(function () {
return g.notifyChange();
});
} }
} }
return g.notifyChange(); if (q) {
return q
.push(function () {
return g.notifyChange();
})
.push(undefined, function (err) {
console.log(err);
});
}
}) })
.allowPublicAcquisition("resolveExternalReference", function (arr) { .allowPublicAcquisition("resolveExternalReference", function (arr) {
var g = this, var g = this,
......
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