Select root-level non-expandable nodes
This commit is contained in:
Родитель
f06d46c44b
Коммит
d2d8870f06
|
@ -3,17 +3,21 @@ function expandNavigation(url) {
|
|||
var segments = url.split("/");
|
||||
var page = segments[segments.length - 1];
|
||||
|
||||
this.expandPath(segments, function() {
|
||||
var dataSource = this.dataSource;
|
||||
var node;
|
||||
if (segments.length > 1) {
|
||||
this.expandPath(segments, function() {
|
||||
var dataSource = this.dataSource;
|
||||
var node;
|
||||
|
||||
for (var idx = 0; idx < segments.length; idx++) {
|
||||
node = dataSource.get(segments[idx]);
|
||||
dataSource = node.children;
|
||||
}
|
||||
for (var idx = 0; idx < segments.length; idx++) {
|
||||
node = dataSource.get(segments[idx]);
|
||||
dataSource = node.children;
|
||||
}
|
||||
|
||||
node.set("selected", true);
|
||||
});
|
||||
node.set("selected", true);
|
||||
});
|
||||
} else {
|
||||
this.dataSource.get(page).set("selected", true);
|
||||
}
|
||||
|
||||
this.unbind("dataBound", arguments.callee);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче