-
- /**
- * get the current node by Hash (reserve)
- * @returns {boolean} success?
- */
- function getCurrentNodeByHash() {
- var ret = false;
- var hash = window.location.hash;
- if (hash.substr(0, 6) == "#tree-") {
- hash = $.base64.decode(hash.substr(6));
- tree = hash.split("|");
- $(".main > .main-left > .nav > .slide > .menu").each(function () {
- var that = $(this);
- if (trimText(that.data("title")) == tree[0]) {
- that.click();
- that.next().find("a").each(function () {
- var that = $(this);
- if (trimText(that.data("title")) == tree[1]) {
- lastNode = that.parent();
- lastNode.addClass("active");
- ret = true;
- return true;
- }
- });
- }
- });
- }
- return ret;
- }