Implement "href" options in menu config
This commit is contained in:
parent
9d2e1ca35d
commit
2ad27897fe
|
@ -29,7 +29,7 @@ app.menus = {
|
|||
maxwidth: 35,
|
||||
items: [
|
||||
{ text: 's:nav.profile', fa: 'user',
|
||||
onclick: "alert('user')" },
|
||||
href: "settings/profile" },
|
||||
{ separator: true },
|
||||
],
|
||||
},
|
||||
|
|
|
@ -52,6 +52,8 @@ app.menu = {
|
|||
item.isItem = item.separator === undefined;
|
||||
item.isSep = item.separator === true;
|
||||
item.class = item.class || '';
|
||||
if (item.href !== undefined && item.onclick === undefined)
|
||||
item.onclick = "hashredir('"+item.href+"')";
|
||||
content += app.template.fill(item, v);
|
||||
}
|
||||
return content;
|
||||
|
|
Loading…
Reference in New Issue