Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Commit

Permalink
#360: Change the tree selected item on iframe change
Browse files Browse the repository at this point in the history
  • Loading branch information
allanpilarca committed Jun 1, 2018
1 parent be12e40 commit 6bdb8eb
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,13 @@ function(event) {
});
// might be usable for changing the tree selected item on iframe change
var iframeChangeScript = function(location) {
console.log(location.href.substr(location.href.lastIndexOf('=') + 1));
// kQuery('#k-jqtree').tree('selectNode', 2);
var url = location.href.substr(location.href.indexOf('administrator/') + 14);
var node = kQuery('#k-jqtree').tree('getNodeByCallback', function(node) {
if (node.url == url) {
return true;
}
});
kQuery('#k-jqtree').tree('selectNode', node)
}
</script>

Expand Down

0 comments on commit 6bdb8eb

Please sign in to comment.