- for (var i = 0; i < this.leftParentData.length; i++) {
- var parentItem = {
- name: null,
- imageSrc: null,
- href: null,
- menuItems: [],
- state: null
- }
- if (this.showOnlyParentMenu) {
- parentItem.name = this.leftParentData[i].name;
- parentItem.imageSrc = this.leftParentData[i].imageSrc;
- parentItem.state = '/'+this.leftParentData[i].state;
- } else {
- parentItem.name = this.leftParentData[i].label;
- parentItem.imageSrc = this.leftParentData[i].imageSrc;
- }
- // Add link to items with no subitems
- if (!this.showOnlyParentMenu) {
- if (this.leftChildData[i].length == 0)
- parentItem.href = this.leftParentData[i].action;
-
- for (var j = 0; j < this.leftChildData[i].length; j++) {
-
- var childItem = {
- name: null,
- href: null
- };
- if (this.leftChildData[i][j].label != null && this.leftChildData[i][j].label.length > 0) {
-
- childItem.name = this.leftChildData[i][j].label;
- childItem.href = this.leftChildData[i][j].action;
- parentItem.menuItems.push(childItem);
- }
+ for (var j = 0; j < this.leftChildData[i].length; j++) {
+
+ var childItem = {
+ name: null,
+ href: null
+ };
+ if (this.leftChildData[i][j].label != null && this.leftChildData[i][j].label.length > 0) {
+
+ childItem.name = this.leftChildData[i][j].label;
+ childItem.href = this.leftChildData[i][j].action;
+ parentItem.menuItems.push(childItem);