summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
48739a9)
Auto open/close logic in xds.layout.ts file seems buggy resulting to
a flicking sidebar. So disable this feature for now.
Change-Id: I1df6cd0af9f1b60cd54b48d763a870ef69a5fbe9
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
<nb-sidebar-header (click)="pinSidebar()">
<!-- left sidebar -->
<nb-sidebar-header (click)="pinSidebar()">
<!-- left sidebar -->
+ <!-- FIXME - bug flicking menu
<nb-actions *ngIf="sidebar.id === 'left'" size="small" class="header-container right">
<nb-action id="pin-sidebar" [icon]="(!sidebarPinned || sidebarCompact) ? 'fa fa-angle-double-right':'fa fa-angle-double-left'"
[ngbTooltip]="sidebarPinned ? 'Undock the sidebar so it is hidden when no being focused':'Dock the sidebar so you can always see it'" placement="bottom">
</nb-action>
</nb-actions>
<nb-actions *ngIf="sidebar.id === 'left'" size="small" class="header-container right">
<nb-action id="pin-sidebar" [icon]="(!sidebarPinned || sidebarCompact) ? 'fa fa-angle-double-right':'fa fa-angle-double-left'"
[ngbTooltip]="sidebarPinned ? 'Undock the sidebar so it is hidden when no being focused':'Dock the sidebar so you can always see it'" placement="bottom">
</nb-action>
</nb-actions>
+ -->
+ <nb-actions *ngIf="sidebar.id === 'left'" size="small" class="header-container right">
+ <nb-action id="pin-sidebar" icon="fa fa-angle-double-left" placement="bottom" (click)="closeSidebar()">
+ </nb-action>
+ </nb-actions>
+ <!-- FIXME - bug flicking menu
<nb-actions *ngIf="sidebar.id === 'right'" size="small" class="header-container left">
<nb-action id="pin-sidebar" [icon]="(!sidebarPinned || sidebarCompact) ? 'fa fa-angle-double-left':'fa fa-angle-double-right'"
[ngbTooltip]="sidebarPinned ? 'Undock the sidebar so it is hidden when no being focused':'Dock the sidebar so you can always see it'" placement="bottom">
</nb-action>
</nb-actions>
<nb-actions *ngIf="sidebar.id === 'right'" size="small" class="header-container left">
<nb-action id="pin-sidebar" [icon]="(!sidebarPinned || sidebarCompact) ? 'fa fa-angle-double-left':'fa fa-angle-double-right'"
[ngbTooltip]="sidebarPinned ? 'Undock the sidebar so it is hidden when no being focused':'Dock the sidebar so you can always see it'" placement="bottom">
</nb-action>
</nb-actions>
+ -->
+ <nb-actions *ngIf="sidebar.id === 'right'" size="small" class="header-container left">
+ <nb-action id="pin-sidebar" icon="fa fa-angle-double-right" placement="bottom" (click)="closeSidebar()">
+ </nb-action>
+ </nb-actions>
</nb-sidebar-header>
<ng-content select="nb-menu"></ng-content>
</nb-sidebar-header>
<ng-content select="nb-menu"></ng-content>
this.sidebarService.onExpand().subscribe(s => s.tag === 'menu-sidebar' && (this.sidebarCompact = false));
this.menuService.onSubmenuToggle().subscribe(i => i.item && i.item.expanded && (this.sidebarCompact = false));
this.sidebarService.onExpand().subscribe(s => s.tag === 'menu-sidebar' && (this.sidebarCompact = false));
this.menuService.onSubmenuToggle().subscribe(i => i.item && i.item.expanded && (this.sidebarCompact = false));
+ // FIXME: bug flicking menu - disable it for now
+ /*
// Automatically expand sidebar on mouse over
this._mouseEnterStream.flatMap(e => {
return Observable
.of(e)
.delay(100)
.takeUntil(this._mouseLeaveStream);
// Automatically expand sidebar on mouse over
this._mouseEnterStream.flatMap(e => {
return Observable
.of(e)
.delay(100)
.takeUntil(this._mouseLeaveStream);
if (this.sidebarPinned || !this.sidebarCompact) {
return;
}
if (this.sidebarPinned || !this.sidebarCompact) {
return;
}
.of(e)
.delay(100)
.takeUntil(this._mouseEnterStream);
.of(e)
.delay(100)
.takeUntil(this._mouseEnterStream);
if (this.sidebarPinned || this.sidebarCompact) {
return;
}
// this._mouseEnterStream.emit(null);
this.sidebarService.toggle(true, 'menu-sidebar');
});
if (this.sidebarPinned || this.sidebarCompact) {
return;
}
// this._mouseEnterStream.emit(null);
this.sidebarService.toggle(true, 'menu-sidebar');
});
- this._mouseEnterStream.emit($event);
+ // FIXME: bug flicking menu - disable it for now
+ // this._mouseEnterStream.emit($event);
- this._mouseLeaveStream.emit($event);
+ // FIXME: bug flicking menu - disable it for now
+ // this._mouseLeaveStream.emit($event);
}
pinSidebar() {
this.sidebarPinned = !this.sidebarPinned;
}
}
pinSidebar() {
this.sidebarPinned = !this.sidebarPinned;
}
+
+ closeSidebar() {
+ this.sidebarService.toggle(true, 'menu-sidebar');
+ }
<div class="col-12">
<div class="offset-sm-4 col-sm-6">
<button class="btn btn-md btn-secondary" (click)="cancelAction=true; closeModal()"> Cancel </button>
<div class="col-12">
<div class="offset-sm-4 col-sm-6">
<button class="btn btn-md btn-secondary" (click)="cancelAction=true; closeModal()"> Cancel </button>
- <button class="btn btn-md btn-primary" (click)="onSubmit()" [disabled]="!addTargetForm.valid">Add Folder</button>
+ <button class="btn btn-md btn-primary" (click)="onSubmit()" [disabled]="!addTargetForm.valid">Add Target</button>