|
|
@@ -9,35 +9,51 @@ exports[`ko.sidebar.js should render component 1`] = `
|
|
|
<div class=\\"icon\\" data-bind=\\"hueAppIcon: icon\\"></div><span data-bind=\\"text: displayName\\"></span>
|
|
|
<!-- /ko -->
|
|
|
</script><script type=\\"text/html\\" id=\\"sidebar-sub-menu\\">
|
|
|
- <div class=\\"sidebar-menu\\" data-bind=\\"css: { 'open' : open }\\">
|
|
|
- <div class=\\"menu\\">
|
|
|
- <ul class=\\"sidebar-nav-list\\" data-bind=\\"foreach: children\\">
|
|
|
- <li data-bind=\\"css: { 'divider': isDivider }\\">
|
|
|
- <!-- ko if: isDivider -->
|
|
|
-
|
|
|
- <!-- /ko -->
|
|
|
- <!-- ko ifnot: isDivider -->
|
|
|
- <!-- ko if: children && children.length -->
|
|
|
- <a href=\\"javascript:void(0);\\" data-bind=\\"toggle: open, text: displayName\\"></a>
|
|
|
- <!-- ko template: { name: 'sidebar-sub-menu' } --><!-- /ko -->
|
|
|
- <!-- /ko -->
|
|
|
- <!-- ko if: !children && url -->
|
|
|
- <a href=\\"javascript:void(0);\\" data-bind=\\"hueLink: url, text: displayName\\"></a>
|
|
|
+ <div class=\\"sidebar-menu\\" data-bind=\\"
|
|
|
+ css: {
|
|
|
+ 'open' : open() || hoverOpen(),
|
|
|
+ 'fixed-bottom': fixedBottom
|
|
|
+ },
|
|
|
+ event: {
|
|
|
+ mouseenter: mouseEnter
|
|
|
+ }
|
|
|
+ \\">
|
|
|
+ <div class=\\"inner\\">
|
|
|
+ <div class=\\"menu\\">
|
|
|
+ <!-- ko if: headerTemplate -->
|
|
|
+ <div class=\\"menu-header\\" data-bind=\\"template: headerTemplate\\"></div>
|
|
|
+ <!-- /ko -->
|
|
|
+
|
|
|
+ <ul class=\\"sidebar-nav-list\\" data-bind=\\"foreach: children\\">
|
|
|
+ <li data-bind=\\"css: { 'divider': isDivider }\\">
|
|
|
+ <!-- ko if: isDivider -->
|
|
|
+
|
|
|
<!-- /ko -->
|
|
|
- <!-- ko if: !children && href -->
|
|
|
- <a href=\\"javascript:void(0);\\" target=\\"_blank\\" data-bind=\\"attr: { 'href': href }, text: displayName\\"></a>
|
|
|
+ <!-- ko ifnot: isDivider -->
|
|
|
+ <!-- ko if: children && children.length -->
|
|
|
+ <a href=\\"javascript:void(0);\\" data-bind=\\"toggle: open, text: displayName\\"></a>
|
|
|
+ <!-- ko template: { name: 'sidebar-sub-menu' } --><!-- /ko -->
|
|
|
+ <!-- /ko -->
|
|
|
+ <!-- ko if: !children && url -->
|
|
|
+ <a href=\\"javascript:void(0);\\" data-bind=\\"hueLink: url, text: displayName\\"></a>
|
|
|
+ <!-- /ko -->
|
|
|
+ <!-- ko if: !children && href -->
|
|
|
+ <a href=\\"javascript:void(0);\\" target=\\"_blank\\" data-bind=\\"attr: { 'href': href }, text: displayName\\"></a>
|
|
|
+ <!-- /ko -->
|
|
|
+ <!-- ko if: !children && click -->
|
|
|
+ <a href=\\"javascript:void(0);\\" target=\\"_blank\\" data-bind=\\"click: click.bind($data), text: displayName\\"></a>
|
|
|
+ <!-- /ko -->
|
|
|
<!-- /ko -->
|
|
|
- <!-- /ko -->
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</script><script type=\\"text/html\\" id=\\"sidebar-item\\">
|
|
|
- <div class=\\"item-wrapper\\" data-bind=\\"css: itemClass\\">
|
|
|
+ <div class=\\"item-wrapper\\" data-bind=\\"css: itemClass, event: { mouseenter: mouseEnter, mouseleave: mouseLeave }\\">
|
|
|
<!-- ko if: children && children.length -->
|
|
|
<a href=\\"javascript: void(0);\\" data-bind=\\"
|
|
|
toggle: open,
|
|
|
- attr: { 'aria-label': displayName, 'data-tooltip': displayName },
|
|
|
css: { 'active': active },
|
|
|
template: 'sidebar-inner-item'
|
|
|
\\" class=\\"item\\"></a>
|
|
|
@@ -61,46 +77,12 @@ exports[`ko.sidebar.js should render component 1`] = `
|
|
|
template: 'sidebar-inner-item'
|
|
|
\\" class=\\"item\\"></a>
|
|
|
<!-- /ko -->
|
|
|
- <!-- ko if: subMenuTemplate -->
|
|
|
- <!-- ko template: subMenuTemplate --><!-- /ko -->
|
|
|
- <!-- /ko -->
|
|
|
<!-- /ko -->
|
|
|
</div>
|
|
|
- </script><script type=\\"text/html\\" id=\\"user-sub-menu-template\\">
|
|
|
- <div class=\\"sidebar-menu user-menu\\" data-bind=\\"css: { 'open' : $component.userMenuOpen }\\">
|
|
|
- <div class=\\"menu\\">
|
|
|
- <div class=\\"menu-header\\">
|
|
|
- <div class=\\"user-icon\\" style=\\"background-color: #fff\\">F</div>
|
|
|
- <div>
|
|
|
- <div>foo</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <ul class=\\"sidebar-nav-list\\">
|
|
|
- <!-- ko if: window.USER_VIEW_EDIT_USER_ENABLED -->
|
|
|
- <li><a href=\\"javascript:void(0);\\" data-bind=\\"
|
|
|
- hueLink: '/useradmin/users/edit/foo',
|
|
|
- attr: {
|
|
|
- 'title': window.IS_LDAP_SETUP ? 'View Profile' : 'Edit Profile'
|
|
|
- }
|
|
|
- \\">My Profile</a></li>
|
|
|
- <!-- /ko -->
|
|
|
- <!-- ko if: window.USER_IS_ADMIN || window.USER_IS_ORG_ADMIN -->
|
|
|
- <li><a href=\\"javascript: void(0);\\" data-bind=\\"hueLink: '/useradmin/users/'\\">Manage Users</a></li>
|
|
|
- <li><a href=\\"javascript: void(0);\\" data-bind=\\"hueLink: '/about/'\\">Administration</a></li>
|
|
|
- <!-- /ko -->
|
|
|
- <li><a href=\\"javascript: void(0);\\" data-bind=\\"hueLink: '/accounts/logout'\\" title=\\"Sign out\\" >Sign out</a></li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </script><script type=\\"text/html\\" id=\\"support-sub-menu-template\\">
|
|
|
- <div class=\\"sidebar-menu support-menu\\" data-bind=\\"css: { 'open' : $component.supportMenuOpen }\\">
|
|
|
- <div class=\\"menu\\">
|
|
|
- <ul class=\\"sidebar-nav-list\\">
|
|
|
- <li><a href=\\"https://docs.gethue.com\\" target=\\"_blank\\">Documentation</a></li>
|
|
|
- <li><a href=\\"javascript:void(0)\\" data-bind=\\"publish: 'show.welcome.tour'\\">Welcome Tour</a></li>
|
|
|
- <li><a href=\\"http://gethue.com\\" target=\\"_blank\\">Gethue.com</a></li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
+ </script><script type=\\"text/html\\" id=\\"user-header-template\\">
|
|
|
+ <div class=\\"user-icon\\" style=\\"background-color: #fff\\">F</div>
|
|
|
+ <div>
|
|
|
+ <div>foo</div>
|
|
|
</div>
|
|
|
</script><div class=\\"hue-sidebar-header\\" data-bind=\\"css: { 'hue-sidebar-custom-logo' : window.CUSTOM_LOGO }\\">
|
|
|
<a data-bind=\\"hueLink: '/home/'\\" href=\\"javascript: void(0);\\" title=\\"Documents\\">
|
|
|
@@ -111,78 +93,131 @@ exports[`ko.sidebar.js should render component 1`] = `
|
|
|
</div><div class=\\"hue-sidebar-footer\\">
|
|
|
<!-- ko foreach: footerItems -->
|
|
|
<!-- ko template: { name: 'sidebar-item' } -->
|
|
|
- <div class=\\"item-wrapper\\" data-bind=\\"css: itemClass\\">
|
|
|
- <!-- ko if: children && children.length --><!-- /ko -->
|
|
|
- <!-- ko if: !children || !children.length -->
|
|
|
- <!-- ko if: click -->
|
|
|
- <a href=\\"javascript: void(0);\\" data-bind=\\"
|
|
|
- click: click,
|
|
|
- attr: { 'aria-label': displayName, 'data-tooltip': displayName },
|
|
|
- css: { 'active': active },
|
|
|
- template: 'sidebar-inner-item'
|
|
|
- \\" class=\\"item\\" aria-label=\\"Support\\" data-tooltip=\\"Support\\">
|
|
|
+ <div class=\\"item-wrapper\\" data-bind=\\"css: itemClass, event: { mouseenter: mouseEnter, mouseleave: mouseLeave }\\">
|
|
|
+ <!-- ko if: children && children.length -->
|
|
|
+ <a href=\\"javascript: void(0);\\" data-bind=\\"
|
|
|
+ toggle: open,
|
|
|
+ css: { 'active': active },
|
|
|
+ template: 'sidebar-inner-item'
|
|
|
+ \\" class=\\"item\\">
|
|
|
<!-- ko if: iconHtml --><!-- /ko -->
|
|
|
<!-- ko ifnot: iconHtml -->
|
|
|
<div class=\\"icon\\" data-bind=\\"hueAppIcon: icon\\"></div><span data-bind=\\"text: displayName\\">Support</span>
|
|
|
<!-- /ko -->
|
|
|
</a>
|
|
|
- <!-- /ko -->
|
|
|
- <!-- ko ifnot: click --><!-- /ko -->
|
|
|
- <!-- ko if: subMenuTemplate -->
|
|
|
- <!-- ko template: subMenuTemplate -->
|
|
|
- <div class=\\"sidebar-menu support-menu\\" data-bind=\\"css: { 'open' : $component.supportMenuOpen }\\">
|
|
|
- <div class=\\"menu\\">
|
|
|
- <ul class=\\"sidebar-nav-list\\">
|
|
|
- <li><a href=\\"https://docs.gethue.com\\" target=\\"_blank\\">Documentation</a></li>
|
|
|
- <li><a href=\\"javascript:void(0)\\" data-bind=\\"publish: 'show.welcome.tour'\\">Welcome Tour</a></li>
|
|
|
- <li><a href=\\"http://gethue.com\\" target=\\"_blank\\">Gethue.com</a></li>
|
|
|
- </ul>
|
|
|
+ <!-- ko template: 'sidebar-sub-menu' -->
|
|
|
+ <div class=\\"sidebar-menu fixed-bottom\\" data-bind=\\"
|
|
|
+ css: {
|
|
|
+ 'open' : open() || hoverOpen(),
|
|
|
+ 'fixed-bottom': fixedBottom
|
|
|
+ },
|
|
|
+ event: {
|
|
|
+ mouseenter: mouseEnter
|
|
|
+ }
|
|
|
+ \\">
|
|
|
+ <div class=\\"inner\\">
|
|
|
+ <div class=\\"menu\\">
|
|
|
+ <!-- ko if: headerTemplate --><!-- /ko -->
|
|
|
+
|
|
|
+ <ul class=\\"sidebar-nav-list\\" data-bind=\\"foreach: children\\">
|
|
|
+ <li data-bind=\\"css: { 'divider': isDivider }\\">
|
|
|
+ <!-- ko if: isDivider --><!-- /ko -->
|
|
|
+ <!-- ko ifnot: isDivider -->
|
|
|
+ <!-- ko if: children && children.length --><!-- /ko -->
|
|
|
+ <!-- ko if: !children && url --><!-- /ko -->
|
|
|
+ <!-- ko if: !children && href -->
|
|
|
+ <a href=\\"https://docs.gethue.com\\" target=\\"_blank\\" data-bind=\\"attr: { 'href': href }, text: displayName\\">Documentation</a>
|
|
|
+ <!-- /ko -->
|
|
|
+ <!-- ko if: !children && click --><!-- /ko -->
|
|
|
+ <!-- /ko -->
|
|
|
+ </li>
|
|
|
+
|
|
|
+ <li data-bind=\\"css: { 'divider': isDivider }\\">
|
|
|
+ <!-- ko if: isDivider --><!-- /ko -->
|
|
|
+ <!-- ko ifnot: isDivider -->
|
|
|
+ <!-- ko if: children && children.length --><!-- /ko -->
|
|
|
+ <!-- ko if: !children && url --><!-- /ko -->
|
|
|
+ <!-- ko if: !children && href --><!-- /ko -->
|
|
|
+ <!-- ko if: !children && click -->
|
|
|
+ <a href=\\"javascript:void(0);\\" target=\\"_blank\\" data-bind=\\"click: click.bind($data), text: displayName\\">Welcome Tour</a>
|
|
|
+ <!-- /ko -->
|
|
|
+ <!-- /ko -->
|
|
|
+ </li>
|
|
|
+
|
|
|
+ <li data-bind=\\"css: { 'divider': isDivider }\\">
|
|
|
+ <!-- ko if: isDivider --><!-- /ko -->
|
|
|
+ <!-- ko ifnot: isDivider -->
|
|
|
+ <!-- ko if: children && children.length --><!-- /ko -->
|
|
|
+ <!-- ko if: !children && url --><!-- /ko -->
|
|
|
+ <!-- ko if: !children && href -->
|
|
|
+ <a href=\\"https://gethue.com\\" target=\\"_blank\\" data-bind=\\"attr: { 'href': href }, text: displayName\\">Gethue.com</a>
|
|
|
+ <!-- /ko -->
|
|
|
+ <!-- ko if: !children && click --><!-- /ko -->
|
|
|
+ <!-- /ko -->
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- /ko -->
|
|
|
- <!-- /ko -->
|
|
|
<!-- /ko -->
|
|
|
+ <!-- ko if: !children || !children.length --><!-- /ko -->
|
|
|
</div>
|
|
|
<!-- /ko -->
|
|
|
|
|
|
<!-- ko template: { name: 'sidebar-item' } -->
|
|
|
- <div class=\\"item-wrapper shepherd-user-menu\\" data-bind=\\"css: itemClass\\">
|
|
|
- <!-- ko if: children && children.length --><!-- /ko -->
|
|
|
- <!-- ko if: !children || !children.length -->
|
|
|
- <!-- ko if: click -->
|
|
|
- <a href=\\"javascript: void(0);\\" data-bind=\\"
|
|
|
- click: click,
|
|
|
- attr: { 'aria-label': displayName, 'data-tooltip': displayName },
|
|
|
- css: { 'active': active },
|
|
|
- template: 'sidebar-inner-item'
|
|
|
- \\" class=\\"item\\" aria-label=\\"foo\\" data-tooltip=\\"foo\\">
|
|
|
+ <div class=\\"item-wrapper shepherd-user-menu\\" data-bind=\\"css: itemClass, event: { mouseenter: mouseEnter, mouseleave: mouseLeave }\\">
|
|
|
+ <!-- ko if: children && children.length -->
|
|
|
+ <a href=\\"javascript: void(0);\\" data-bind=\\"
|
|
|
+ toggle: open,
|
|
|
+ css: { 'active': active },
|
|
|
+ template: 'sidebar-inner-item'
|
|
|
+ \\" class=\\"item\\">
|
|
|
<!-- ko if: iconHtml -->
|
|
|
<div class=\\"icon\\" data-bind=\\"html: iconHtml\\"><div class=\\"user-icon\\">F</div></div><span data-bind=\\"text: displayName\\">foo</span>
|
|
|
<!-- /ko -->
|
|
|
<!-- ko ifnot: iconHtml --><!-- /ko -->
|
|
|
</a>
|
|
|
- <!-- /ko -->
|
|
|
- <!-- ko ifnot: click --><!-- /ko -->
|
|
|
- <!-- ko if: subMenuTemplate -->
|
|
|
- <!-- ko template: subMenuTemplate -->
|
|
|
- <div class=\\"sidebar-menu user-menu\\" data-bind=\\"css: { 'open' : $component.userMenuOpen }\\">
|
|
|
- <div class=\\"menu\\">
|
|
|
- <div class=\\"menu-header\\">
|
|
|
- <div class=\\"user-icon\\" style=\\"background-color: #fff\\">F</div>
|
|
|
- <div>
|
|
|
- <div>foo</div>
|
|
|
- </div>
|
|
|
+ <!-- ko template: 'sidebar-sub-menu' -->
|
|
|
+ <div class=\\"sidebar-menu fixed-bottom\\" data-bind=\\"
|
|
|
+ css: {
|
|
|
+ 'open' : open() || hoverOpen(),
|
|
|
+ 'fixed-bottom': fixedBottom
|
|
|
+ },
|
|
|
+ event: {
|
|
|
+ mouseenter: mouseEnter
|
|
|
+ }
|
|
|
+ \\">
|
|
|
+ <div class=\\"inner\\">
|
|
|
+ <div class=\\"menu\\">
|
|
|
+ <!-- ko if: headerTemplate -->
|
|
|
+ <div class=\\"menu-header\\" data-bind=\\"template: headerTemplate\\">
|
|
|
+ <div class=\\"user-icon\\" style=\\"background-color: #fff\\">F</div>
|
|
|
+ <div>
|
|
|
+ <div>foo</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- /ko -->
|
|
|
+
|
|
|
+ <ul class=\\"sidebar-nav-list\\" data-bind=\\"foreach: children\\">
|
|
|
+ <li data-bind=\\"css: { 'divider': isDivider }\\">
|
|
|
+ <!-- ko if: isDivider --><!-- /ko -->
|
|
|
+ <!-- ko ifnot: isDivider -->
|
|
|
+ <!-- ko if: children && children.length --><!-- /ko -->
|
|
|
+ <!-- ko if: !children && url -->
|
|
|
+ <a href=\\"javascript:void(0);\\" data-bind=\\"hueLink: url, text: displayName\\">Sign out</a>
|
|
|
+ <!-- /ko -->
|
|
|
+ <!-- ko if: !children && href --><!-- /ko -->
|
|
|
+ <!-- ko if: !children && click --><!-- /ko -->
|
|
|
+ <!-- /ko -->
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
</div>
|
|
|
- <ul class=\\"sidebar-nav-list\\">
|
|
|
- <!-- ko if: window.USER_VIEW_EDIT_USER_ENABLED --><!-- /ko -->
|
|
|
- <!-- ko if: window.USER_IS_ADMIN || window.USER_IS_ORG_ADMIN --><!-- /ko -->
|
|
|
- <li><a href=\\"javascript: void(0);\\" data-bind=\\"hueLink: '/accounts/logout'\\" title=\\"Sign out\\">Sign out</a></li>
|
|
|
- </ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- /ko -->
|
|
|
- <!-- /ko -->
|
|
|
<!-- /ko -->
|
|
|
+ <!-- ko if: !children || !children.length --><!-- /ko -->
|
|
|
</div>
|
|
|
<!-- /ko -->
|
|
|
<!-- /ko -->
|