Commit 95a9a3d8 authored by Boris Kocherov's avatar Boris Kocherov

use parent scope as prefix so we can filter all sub_gadgets target gadget

parent 5ea34b6f
......@@ -278,6 +278,14 @@
return input;
}
function generateUid(g) {
// generate scope use parent scope as prefix so
// we can filter all sub_gadgets target gadget
// XXX size?
var z = g.element.getAttribute('data-gadget-scope');
return z + '_' + Math.random().toString(36).substr(2, 5);
}
function addSubForm(options) {
var input_element = options.element,
g = options.gadget,
......@@ -285,7 +293,7 @@
parent_path,
scope;
scope = "j" + Math.random().toString(36).substr(2, 9);
scope = generateUid(g);
parent_path = options.parent_path;
if (options.parent_type !== "array") {
property_name = options.property_name;
......
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