navigation MDL-20557 Made navigation icons part of the link for that item so it is clickable
This commit is contained in:
@@ -771,26 +771,33 @@ navigation_tree_branch.prototype.inject_into_dom = function (element, gntinstanc
|
||||
if (this.myid != null) {
|
||||
branchp.setAttribute('id',this.myid);
|
||||
}
|
||||
var branchicon = false;
|
||||
if (this.myicon != null) {
|
||||
var branchicon = document.createElement('img');
|
||||
branchicon = document.createElement('img');
|
||||
branchicon.setAttribute('src',this.myicon);
|
||||
branchicon.setAttribute('alt','');
|
||||
branchp.appendChild(branchicon);
|
||||
this.myname = ' '+this.myname;
|
||||
}
|
||||
if (this.mylink === null) {
|
||||
branchp.innerHTML = this.myname.replace(/\n/g, '<br />');
|
||||
if (branchicon !== false) {
|
||||
branchp.appendChild(branchicon);
|
||||
}
|
||||
branchp.appendChild(document.createTextNode(this.myname.replace(/\n/g, '<br />')));
|
||||
} else {
|
||||
var branchlink = document.createElement('a');
|
||||
branchlink.setAttribute('title', this.mytitle);
|
||||
branchlink.setAttribute('href', this.mylink);
|
||||
branchlink.innerHTML = this.myname.replace(/\n/g, '<br />');
|
||||
if (branchicon !== false) {
|
||||
branchlink.appendChild(branchicon);
|
||||
}
|
||||
branchlink.appendChild(document.createTextNode(this.myname.replace(/\n/g, '<br />')));
|
||||
if (this.myhidden) {
|
||||
YAHOO.util.Dom.addClass(branchlink, 'dimmed');
|
||||
}
|
||||
branchp.appendChild(branchlink);
|
||||
}
|
||||
branchli.appendChild(branchp);
|
||||
alert(branchli.innerHTML);
|
||||
element.appendChild(branchli);
|
||||
return branchli;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user