You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (id) {
var data = $(item).children('div').data();
var itemObj = $.extend( data, {
"id":id[2],
"parent_id":pid,
"depth":depth,
"left":_left,
"right":right
} );
ret.push( itemObj );
}
`
The problem here is the expression and the usage of id[2]. Because of id[2], you always have to define a prefix, because if you don't, you can only access id[1] and not id[2], which is not existing. The expression "(/(.+)-=_/)" should be "(/.+-=_/)". And instead of using id[2], you should use id[1]. This would allow me to use another attribute like "data-id" with the id as a value, without an "item-" prefix.
Sorry fot not pulling a request, but at the moment I not not have capacity for this.
The text was updated successfully, but these errors were encountered:
Line 775 - 797
`
id = ($(item).attr(o.attribute || "id") || "").match(o.expression || (/(.+)-=_/));
if (depth === sDepth) {
pid = o.rootID;
} else {
parentItem = ($(item).parent(o.listType)
.parent(o.items)
.attr(o.attribute || "id"))
.match(o.expression || (/(.+)-=_/));
pid = parentItem[2];
}
if (id) {
var data = $(item).children('div').data();
var itemObj = $.extend( data, {
"id":id[2],
"parent_id":pid,
"depth":depth,
"left":_left,
"right":right
} );
ret.push( itemObj );
}
`
The problem here is the expression and the usage of id[2]. Because of id[2], you always have to define a prefix, because if you don't, you can only access id[1] and not id[2], which is not existing. The expression "(/(.+)-=_/)" should be "(/.+-=_/)". And instead of using id[2], you should use id[1]. This would allow me to use another attribute like "data-id" with the id as a value, without an "item-" prefix.
Sorry fot not pulling a request, but at the moment I not not have capacity for this.
The text was updated successfully, but these errors were encountered: