From 4469a2c25a6b63b603348a7fb05a54b8fd49519a Mon Sep 17 00:00:00 2001 From: Sercan Yemen Date: Mon, 23 Oct 2017 10:51:28 +0300 Subject: [PATCH 01/11] Fix: iOS10 scrolling issue in dashboard --- .../content/apps/dashboards/project/project.component.html | 2 +- .../content/apps/dashboards/project/project.component.scss | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/main/content/apps/dashboards/project/project.component.html b/src/app/main/content/apps/dashboards/project/project.component.html index ed4df3b1..c395c2b6 100644 --- a/src/app/main/content/apps/dashboards/project/project.component.html +++ b/src/app/main/content/apps/dashboards/project/project.component.html @@ -3,7 +3,7 @@ -
+
diff --git a/src/app/main/content/apps/dashboards/project/project.component.scss b/src/app/main/content/apps/dashboards/project/project.component.scss index ad0d5dda..75e7b0a1 100644 --- a/src/app/main/content/apps/dashboards/project/project.component.scss +++ b/src/app/main/content/apps/dashboards/project/project.component.scss @@ -2,6 +2,11 @@ mat-sidenav-container { + .mat-drawer-content, + .mat-sidenav-content { + flex: 1 1 100%; + } + .center { > .header { From ca8ed939aefb1f95ab549da1e7a5a0404fd2c9c9 Mon Sep 17 00:00:00 2001 From: Sercan Yemen Date: Mon, 23 Oct 2017 14:39:44 +0300 Subject: [PATCH 02/11] Added new tabbed versions of the carded sidenav layouts + Small tweaks on other carded sidenav layouts --- package-lock.json | 74 ++++----- package.json | 22 +-- src/app/core/scss/partials/_page-layouts.scss | 56 +++++++ .../left-sidenav-2-tabbed.component.html | 151 ++++++++++++++++++ .../left-sidenav-2-tabbed.component.scss | 0 .../left-sidenav-2-tabbed.component.ts | 14 ++ .../left-sidenav-2.component.html | 6 +- .../left-sidenav-tabbed.component.html | 151 ++++++++++++++++++ .../left-sidenav-tabbed.component.scss | 0 .../left-sidenav-tabbed.component.ts | 14 ++ .../left-sidenav/left-sidenav.component.html | 2 +- .../right-sidenav-2-tabbed.component.html | 151 ++++++++++++++++++ .../right-sidenav-2-tabbed.component.scss | 0 .../right-sidenav-2-tabbed.component.ts | 14 ++ .../right-sidenav-2.component.html | 4 +- .../right-sidenav-tabbed.component.html | 151 ++++++++++++++++++ .../right-sidenav-tabbed.component.scss | 0 .../right-sidenav-tabbed.component.ts | 14 ++ .../right-sidenav.component.html | 4 +- .../ui/page-layouts/page-layouts.module.ts | 24 +++ src/app/navigation.model.ts | 24 +++ 21 files changed, 823 insertions(+), 53 deletions(-) create mode 100644 src/app/main/content/ui/page-layouts/carded/left-sidenav-2-tabbed/left-sidenav-2-tabbed.component.html create mode 100644 src/app/main/content/ui/page-layouts/carded/left-sidenav-2-tabbed/left-sidenav-2-tabbed.component.scss create mode 100644 src/app/main/content/ui/page-layouts/carded/left-sidenav-2-tabbed/left-sidenav-2-tabbed.component.ts create mode 100644 src/app/main/content/ui/page-layouts/carded/left-sidenav-tabbed/left-sidenav-tabbed.component.html create mode 100644 src/app/main/content/ui/page-layouts/carded/left-sidenav-tabbed/left-sidenav-tabbed.component.scss create mode 100644 src/app/main/content/ui/page-layouts/carded/left-sidenav-tabbed/left-sidenav-tabbed.component.ts create mode 100644 src/app/main/content/ui/page-layouts/carded/right-sidenav-2-tabbed/right-sidenav-2-tabbed.component.html create mode 100644 src/app/main/content/ui/page-layouts/carded/right-sidenav-2-tabbed/right-sidenav-2-tabbed.component.scss create mode 100644 src/app/main/content/ui/page-layouts/carded/right-sidenav-2-tabbed/right-sidenav-2-tabbed.component.ts create mode 100644 src/app/main/content/ui/page-layouts/carded/right-sidenav-tabbed/right-sidenav-tabbed.component.html create mode 100644 src/app/main/content/ui/page-layouts/carded/right-sidenav-tabbed/right-sidenav-tabbed.component.scss create mode 100644 src/app/main/content/ui/page-layouts/carded/right-sidenav-tabbed/right-sidenav-tabbed.component.ts diff --git a/package-lock.json b/package-lock.json index d9effc80..8136dfed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -51,9 +51,9 @@ } }, "@angular/animations": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-4.4.5.tgz", - "integrity": "sha1-WlpVHXV+WlVgCY9vhTXBAtk5VNc=", + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-4.4.6.tgz", + "integrity": "sha1-+mYYmaik44y3xYPHpcl85l1ZKjU=", "requires": { "tslib": "1.7.1" } @@ -143,28 +143,28 @@ } }, "@angular/common": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-4.4.5.tgz", - "integrity": "sha1-vVF53JIq2/TD6m37Gec8uEn/3Dc=", + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-4.4.6.tgz", + "integrity": "sha1-S4FCByTggooOg5uVpV6xp+g5GPI=", "requires": { "tslib": "1.7.1" } }, "@angular/compiler": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-4.4.5.tgz", - "integrity": "sha1-hyGlkQ8rtS8J4tQEytJk817eWQI=", + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-4.4.6.tgz", + "integrity": "sha1-LuH68lt1fh0SiXkHS+f65SmzvCA=", "requires": { "tslib": "1.7.1" } }, "@angular/compiler-cli": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-4.4.5.tgz", - "integrity": "sha1-YfoDNqzRogjF8cXG1N9nnpmVMkg=", + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-4.4.6.tgz", + "integrity": "sha1-uv09HiYOmQh+uajPdTLb1gOrubE=", "dev": true, "requires": { - "@angular/tsc-wrapped": "4.4.5", + "@angular/tsc-wrapped": "4.4.6", "minimist": "1.2.0", "reflect-metadata": "0.1.10" }, @@ -178,9 +178,9 @@ } }, "@angular/core": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-4.4.5.tgz", - "integrity": "sha1-VKy8vaEXGfiDx4apBpdKvrEy8aA=", + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-4.4.6.tgz", + "integrity": "sha1-EwMf0Q3P5DiHVBmzjyESCVi8I1Q=", "requires": { "tslib": "1.7.1" } @@ -194,25 +194,25 @@ } }, "@angular/forms": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-4.4.5.tgz", - "integrity": "sha1-6VUghiMqqyzh0I7xmLYiBOoTxDs=", + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-4.4.6.tgz", + "integrity": "sha1-/mSs5CQ1wbgPSQNLfEHOjK8UpEo=", "requires": { "tslib": "1.7.1" } }, "@angular/http": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/@angular/http/-/http-4.4.5.tgz", - "integrity": "sha1-LHNe2EJAH8I1ZBkmjiiNzyOW6E8=", + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@angular/http/-/http-4.4.6.tgz", + "integrity": "sha1-CvaAxnEL3AJtlA4iXP0PalwAXQw=", "requires": { "tslib": "1.7.1" } }, "@angular/language-service": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-4.4.5.tgz", - "integrity": "sha1-zO8Tm40+FoSwGvo1xvvyFy4rtnY=", + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-4.4.6.tgz", + "integrity": "sha1-SY7OlcX2BmQDv5/TxYMa9CtFYYs=", "dev": true }, "@angular/material": { @@ -224,33 +224,33 @@ } }, "@angular/platform-browser": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-4.4.5.tgz", - "integrity": "sha1-dOuRwLdYEm8m1T7lbHz0ZovZysU=", + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-4.4.6.tgz", + "integrity": "sha1-qYOcVH4bZU+h0kqJeAyLpquNzOA=", "requires": { "tslib": "1.7.1" } }, "@angular/platform-browser-dynamic": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-4.4.5.tgz", - "integrity": "sha1-d029wdkPd12/HjGfbtQrJgYjth8=", + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-4.4.6.tgz", + "integrity": "sha1-TT2aanvyzz3kBYphWuBZ7/ZB+jY=", "requires": { "tslib": "1.7.1" } }, "@angular/router": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-4.4.5.tgz", - "integrity": "sha1-9zEwz0h9mjLMGYiv2llmX0Siiok=", + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-4.4.6.tgz", + "integrity": "sha1-D2rSmuD/jSyeo3m9MgRHIXt+yGY=", "requires": { "tslib": "1.7.1" } }, "@angular/tsc-wrapped": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/@angular/tsc-wrapped/-/tsc-wrapped-4.4.5.tgz", - "integrity": "sha1-MKDLtDpmOqddyphIlL5IE3eN3Jw=", + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@angular/tsc-wrapped/-/tsc-wrapped-4.4.6.tgz", + "integrity": "sha1-Fnh8u/UL3H5zgSOxnDJSfyROF40=", "dev": true, "requires": { "tsickle": "0.21.6" diff --git a/package.json b/package.json index 3d044b82..98d73d90 100644 --- a/package.json +++ b/package.json @@ -16,18 +16,18 @@ "private": true, "dependencies": { "@agm/core": "1.0.0-beta.1", - "@angular/animations": "4.4.5", + "@angular/animations": "4.4.6", "@angular/cdk": "2.0.0-beta.12", - "@angular/common": "4.4.5", - "@angular/compiler": "4.4.5", - "@angular/core": "4.4.5", + "@angular/common": "4.4.6", + "@angular/compiler": "4.4.6", + "@angular/core": "4.4.6", "@angular/flex-layout": "2.0.0-beta.9", - "@angular/forms": "4.4.5", - "@angular/http": "4.4.5", + "@angular/forms": "4.4.6", + "@angular/http": "4.4.6", "@angular/material": "2.0.0-beta.12", - "@angular/platform-browser": "4.4.5", - "@angular/platform-browser-dynamic": "4.4.5", - "@angular/router": "4.4.5", + "@angular/platform-browser": "4.4.6", + "@angular/platform-browser-dynamic": "4.4.6", + "@angular/router": "4.4.6", "@swimlane/ngx-charts": "6.0.2", "@swimlane/ngx-datatable": "9.3.1", "@swimlane/ngx-dnd": "3.0.0", @@ -50,8 +50,8 @@ }, "devDependencies": { "@angular/cli": "1.4.7", - "@angular/compiler-cli": "4.4.5", - "@angular/language-service": "4.4.5", + "@angular/compiler-cli": "4.4.6", + "@angular/language-service": "4.4.6", "@angularclass/hmr": "2.1.3", "@types/jasmine": "2.6.0", "@types/jasminewd2": "2.0.2", diff --git a/src/app/core/scss/partials/_page-layouts.scss b/src/app/core/scss/partials/_page-layouts.scss index 29d66d7f..083e0f80 100644 --- a/src/app/core/scss/partials/_page-layouts.scss +++ b/src/app/core/scss/partials/_page-layouts.scss @@ -222,6 +222,62 @@ $top-bg-image: url('assets/images/backgrounds/header-bg.png'); } } } + + // Tabbed + &.tabbed { + + > mat-sidenav-container { + + > .mat-sidenav-content, + > .mat-drawer-content { + width: calc(100% - 240px); + + .center { + width: calc(100% - 32px); + + @include media-breakpoint-down('md') { + width: calc(100% - 64px); + } + + .header { + flex: 1; + } + + .content-card { + + .content { + + .mat-tab-group { + overflow: hidden; + + .mat-tab-header { + + .mat-tab-label { + height: 64px; + } + } + + .mat-tab-body { + overflow: hidden; + + .mat-tab-body-content { + overflow: hidden; + + .tab-content { + position: relative; + width: 100%; + height: 100%; + overflow: auto; + } + } + } + } + } + } + } + } + } + } } // Left sidenav diff --git a/src/app/main/content/ui/page-layouts/carded/left-sidenav-2-tabbed/left-sidenav-2-tabbed.component.html b/src/app/main/content/ui/page-layouts/carded/left-sidenav-2-tabbed/left-sidenav-2-tabbed.component.html new file mode 100644 index 00000000..b6ec0879 --- /dev/null +++ b/src/app/main/content/ui/page-layouts/carded/left-sidenav-2-tabbed/left-sidenav-2-tabbed.component.html @@ -0,0 +1,151 @@ +
+ + +
+ + + + + + + + +
+

Sidenav header

+
+ + + +
+ + + +
+ + +
+ + + +
+ + +
+ +
+ + + +

Left sidenav with tabs and page scroll

+ +
+ +
+ + + +
+ + +
+ + + + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ +
+ +
+ + +
+ + +
+ + +
+ +
\ No newline at end of file diff --git a/src/app/main/content/ui/page-layouts/carded/left-sidenav-2-tabbed/left-sidenav-2-tabbed.component.scss b/src/app/main/content/ui/page-layouts/carded/left-sidenav-2-tabbed/left-sidenav-2-tabbed.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/src/app/main/content/ui/page-layouts/carded/left-sidenav-2-tabbed/left-sidenav-2-tabbed.component.ts b/src/app/main/content/ui/page-layouts/carded/left-sidenav-2-tabbed/left-sidenav-2-tabbed.component.ts new file mode 100644 index 00000000..8c03df33 --- /dev/null +++ b/src/app/main/content/ui/page-layouts/carded/left-sidenav-2-tabbed/left-sidenav-2-tabbed.component.ts @@ -0,0 +1,14 @@ +import { Component } from '@angular/core'; + +@Component({ + selector : 'fuse-carded-left-sidenav-2-tabbed', + templateUrl: './left-sidenav-2-tabbed.component.html', + styleUrls : ['./left-sidenav-2-tabbed.component.scss'] +}) +export class FuseCardedLeftSidenav2TabbedComponent +{ + constructor() + { + } + +} diff --git a/src/app/main/content/ui/page-layouts/carded/left-sidenav-2/left-sidenav-2.component.html b/src/app/main/content/ui/page-layouts/carded/left-sidenav-2/left-sidenav-2.component.html index 4c3029cc..40568699 100644 --- a/src/app/main/content/ui/page-layouts/carded/left-sidenav-2/left-sidenav-2.component.html +++ b/src/app/main/content/ui/page-layouts/carded/left-sidenav-2/left-sidenav-2.component.html @@ -11,14 +11,16 @@ fuseMatSidenavHelper="carded-left-sidenav" mat-is-locked-open="gt-md"> -
+

Sidenav header

+ +
@@ -65,4 +67,4 @@ -
+
\ No newline at end of file diff --git a/src/app/main/content/ui/page-layouts/carded/left-sidenav-tabbed/left-sidenav-tabbed.component.html b/src/app/main/content/ui/page-layouts/carded/left-sidenav-tabbed/left-sidenav-tabbed.component.html new file mode 100644 index 00000000..ab227d64 --- /dev/null +++ b/src/app/main/content/ui/page-layouts/carded/left-sidenav-tabbed/left-sidenav-tabbed.component.html @@ -0,0 +1,151 @@ +
+ + +
+ + + + + + + + +
+

Sidenav header

+
+ + + +
+ + + +
+ + +
+ + + +
+ + +
+ +
+ + + +

Left sidenav with tabs and content scroll

+ +
+ +
+ + + +
+ + +
+ + + + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ +
+ +
+ + +
+ + +
+ + +
+ +
diff --git a/src/app/main/content/ui/page-layouts/carded/left-sidenav-tabbed/left-sidenav-tabbed.component.scss b/src/app/main/content/ui/page-layouts/carded/left-sidenav-tabbed/left-sidenav-tabbed.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/src/app/main/content/ui/page-layouts/carded/left-sidenav-tabbed/left-sidenav-tabbed.component.ts b/src/app/main/content/ui/page-layouts/carded/left-sidenav-tabbed/left-sidenav-tabbed.component.ts new file mode 100644 index 00000000..0a44a54a --- /dev/null +++ b/src/app/main/content/ui/page-layouts/carded/left-sidenav-tabbed/left-sidenav-tabbed.component.ts @@ -0,0 +1,14 @@ +import { Component } from '@angular/core'; + +@Component({ + selector : 'fuse-carded-left-sidenav-tabbed', + templateUrl: './left-sidenav-tabbed.component.html', + styleUrls : ['./left-sidenav-tabbed.component.scss'] +}) +export class FuseCardedLeftSidenavTabbedComponent +{ + constructor() + { + } + +} diff --git a/src/app/main/content/ui/page-layouts/carded/left-sidenav/left-sidenav.component.html b/src/app/main/content/ui/page-layouts/carded/left-sidenav/left-sidenav.component.html index 703115a6..7fc494b8 100644 --- a/src/app/main/content/ui/page-layouts/carded/left-sidenav/left-sidenav.component.html +++ b/src/app/main/content/ui/page-layouts/carded/left-sidenav/left-sidenav.component.html @@ -11,7 +11,7 @@ fuseMatSidenavHelper="carded-left-sidenav" mat-is-locked-open="gt-md"> -
+

Sidenav header

diff --git a/src/app/main/content/ui/page-layouts/carded/right-sidenav-2-tabbed/right-sidenav-2-tabbed.component.html b/src/app/main/content/ui/page-layouts/carded/right-sidenav-2-tabbed/right-sidenav-2-tabbed.component.html new file mode 100644 index 00000000..fe4395a4 --- /dev/null +++ b/src/app/main/content/ui/page-layouts/carded/right-sidenav-2-tabbed/right-sidenav-2-tabbed.component.html @@ -0,0 +1,151 @@ +
+ + +
+ + + + + +
+ + +
+ +
+ + + +

Right sidenav with tabs and page scroll

+ +
+ +
+ + + +
+ + +
+ + + + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ +
+ +
+ + +
+ + +
+ + + + + + +
+

Sidenav header

+
+ + + +
+ + + +
+ + +
+ + +
+ +
diff --git a/src/app/main/content/ui/page-layouts/carded/right-sidenav-2-tabbed/right-sidenav-2-tabbed.component.scss b/src/app/main/content/ui/page-layouts/carded/right-sidenav-2-tabbed/right-sidenav-2-tabbed.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/src/app/main/content/ui/page-layouts/carded/right-sidenav-2-tabbed/right-sidenav-2-tabbed.component.ts b/src/app/main/content/ui/page-layouts/carded/right-sidenav-2-tabbed/right-sidenav-2-tabbed.component.ts new file mode 100644 index 00000000..ceaec07f --- /dev/null +++ b/src/app/main/content/ui/page-layouts/carded/right-sidenav-2-tabbed/right-sidenav-2-tabbed.component.ts @@ -0,0 +1,14 @@ +import { Component } from '@angular/core'; + +@Component({ + selector : 'fuse-carded-right-sidenav-2-tabbed', + templateUrl: './right-sidenav-2-tabbed.component.html', + styleUrls : ['./right-sidenav-2-tabbed.component.scss'] +}) +export class FuseCardedRightSidenav2TabbedComponent +{ + constructor() + { + } + +} diff --git a/src/app/main/content/ui/page-layouts/carded/right-sidenav-2/right-sidenav-2.component.html b/src/app/main/content/ui/page-layouts/carded/right-sidenav-2/right-sidenav-2.component.html index bcaf7676..3031463a 100644 --- a/src/app/main/content/ui/page-layouts/carded/right-sidenav-2/right-sidenav-2.component.html +++ b/src/app/main/content/ui/page-layouts/carded/right-sidenav-2/right-sidenav-2.component.html @@ -49,14 +49,16 @@ fuseMatSidenavHelper="carded-right-sidenav" mat-is-locked-open="gt-md"> -
+

Sidenav header

+ +
diff --git a/src/app/main/content/ui/page-layouts/carded/right-sidenav-tabbed/right-sidenav-tabbed.component.html b/src/app/main/content/ui/page-layouts/carded/right-sidenav-tabbed/right-sidenav-tabbed.component.html new file mode 100644 index 00000000..98bfbf91 --- /dev/null +++ b/src/app/main/content/ui/page-layouts/carded/right-sidenav-tabbed/right-sidenav-tabbed.component.html @@ -0,0 +1,151 @@ +
+ + +
+ + + + + +
+ + +
+ +
+ + + +

Right sidenav with tabs and content scroll

+ +
+ +
+ + + +
+ + +
+ + + + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ + +
+ + + +
+
+ +
+ +
+ + +
+ + +
+ + + + + + +
+

Sidenav header

+
+ + + +
+ + + +
+ + +
+ + +
+ +
diff --git a/src/app/main/content/ui/page-layouts/carded/right-sidenav-tabbed/right-sidenav-tabbed.component.scss b/src/app/main/content/ui/page-layouts/carded/right-sidenav-tabbed/right-sidenav-tabbed.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/src/app/main/content/ui/page-layouts/carded/right-sidenav-tabbed/right-sidenav-tabbed.component.ts b/src/app/main/content/ui/page-layouts/carded/right-sidenav-tabbed/right-sidenav-tabbed.component.ts new file mode 100644 index 00000000..371cb1ef --- /dev/null +++ b/src/app/main/content/ui/page-layouts/carded/right-sidenav-tabbed/right-sidenav-tabbed.component.ts @@ -0,0 +1,14 @@ +import { Component } from '@angular/core'; + +@Component({ + selector : 'fuse-carded-right-sidenav-tabbed', + templateUrl: './right-sidenav-tabbed.component.html', + styleUrls : ['./right-sidenav-tabbed.component.scss'] +}) +export class FuseCardedRightSidenavTabbedComponent +{ + constructor() + { + } + +} diff --git a/src/app/main/content/ui/page-layouts/carded/right-sidenav/right-sidenav.component.html b/src/app/main/content/ui/page-layouts/carded/right-sidenav/right-sidenav.component.html index 167b0927..f123fa23 100644 --- a/src/app/main/content/ui/page-layouts/carded/right-sidenav/right-sidenav.component.html +++ b/src/app/main/content/ui/page-layouts/carded/right-sidenav/right-sidenav.component.html @@ -49,14 +49,16 @@ fuseMatSidenavHelper="carded-right-sidenav" mat-is-locked-open="gt-md"> -
+

Sidenav header

+ +
diff --git a/src/app/main/content/ui/page-layouts/page-layouts.module.ts b/src/app/main/content/ui/page-layouts/page-layouts.module.ts index 12416e2d..e11436dd 100644 --- a/src/app/main/content/ui/page-layouts/page-layouts.module.ts +++ b/src/app/main/content/ui/page-layouts/page-layouts.module.ts @@ -5,9 +5,13 @@ import { FuseDemoModule } from '../../../../core/components/demo/demo.module'; import { FuseCardedFullWidthComponent } from './carded/fullwidth/fullwidth.component'; import { FuseCardedFullWidth2Component } from './carded/fullwidth-2/fullwidth-2.component'; import { FuseCardedLeftSidenavComponent } from './carded/left-sidenav/left-sidenav.component'; +import { FuseCardedLeftSidenavTabbedComponent } from './carded/left-sidenav-tabbed/left-sidenav-tabbed.component'; import { FuseCardedLeftSidenav2Component } from './carded/left-sidenav-2/left-sidenav-2.component'; +import { FuseCardedLeftSidenav2TabbedComponent } from './carded/left-sidenav-2-tabbed/left-sidenav-2-tabbed.component'; import { FuseCardedRightSidenavComponent } from './carded/right-sidenav/right-sidenav.component'; +import { FuseCardedRightSidenavTabbedComponent } from './carded/right-sidenav-tabbed/right-sidenav-tabbed.component'; import { FuseCardedRightSidenav2Component } from './carded/right-sidenav-2/right-sidenav-2.component'; +import { FuseCardedRightSidenav2TabbedComponent } from './carded/right-sidenav-2-tabbed/right-sidenav-2-tabbed.component'; import { FuseSimpleFullWidthComponent } from './simple/fullwidth/fullwidth.component'; import { FuseSimpleLeftSidenavComponent } from './simple/left-sidenav/left-sidenav.component'; import { FuseSimpleLeftSidenav2Component } from './simple/left-sidenav-2/left-sidenav-2.component'; @@ -31,18 +35,34 @@ const routes: Routes = [ path : 'ui/page-layouts/carded/left-sidenav', component: FuseCardedLeftSidenavComponent }, + { + path : 'ui/page-layouts/carded/left-sidenav-tabbed', + component: FuseCardedLeftSidenavTabbedComponent + }, { path : 'ui/page-layouts/carded/left-sidenav-2', component: FuseCardedLeftSidenav2Component }, + { + path : 'ui/page-layouts/carded/left-sidenav-2-tabbed', + component: FuseCardedLeftSidenav2TabbedComponent + }, { path : 'ui/page-layouts/carded/right-sidenav', component: FuseCardedRightSidenavComponent }, + { + path : 'ui/page-layouts/carded/right-sidenav-tabbed', + component: FuseCardedRightSidenavTabbedComponent + }, { path : 'ui/page-layouts/carded/right-sidenav-2', component: FuseCardedRightSidenav2Component }, + { + path : 'ui/page-layouts/carded/right-sidenav-2-tabbed', + component: FuseCardedRightSidenav2TabbedComponent + }, { path : 'ui/page-layouts/simple/full-width', component: FuseSimpleFullWidthComponent @@ -91,9 +111,13 @@ const routes: Routes = [ FuseCardedFullWidthComponent, FuseCardedFullWidth2Component, FuseCardedLeftSidenavComponent, + FuseCardedLeftSidenavTabbedComponent, FuseCardedLeftSidenav2Component, + FuseCardedLeftSidenav2TabbedComponent, FuseCardedRightSidenavComponent, + FuseCardedRightSidenavTabbedComponent, FuseCardedRightSidenav2Component, + FuseCardedRightSidenav2TabbedComponent, FuseSimpleFullWidthComponent, FuseSimpleLeftSidenavComponent, FuseSimpleLeftSidenav2Component, diff --git a/src/app/navigation.model.ts b/src/app/navigation.model.ts index 6bb0f384..231d9b9b 100644 --- a/src/app/navigation.model.ts +++ b/src/app/navigation.model.ts @@ -330,23 +330,47 @@ export class NavigationModel 'type' : 'item', 'url' : '/ui/page-layouts/carded/left-sidenav' }, + { + 'id' : 'left-sidenav-tabbed', + 'title': 'Left Sidenav Tabbed', + 'type' : 'item', + 'url' : '/ui/page-layouts/carded/left-sidenav-tabbed' + }, { 'id' : 'left-sidenav-2', 'title': 'Left Sidenav 2', 'type' : 'item', 'url' : '/ui/page-layouts/carded/left-sidenav-2' }, + { + 'id' : 'left-sidenav-2-tabbed', + 'title': 'Left Sidenav 2 Tabbed', + 'type' : 'item', + 'url' : '/ui/page-layouts/carded/left-sidenav-2-tabbed' + }, { 'id' : 'right-sidenav', 'title': 'Right Sidenav', 'type' : 'item', 'url' : '/ui/page-layouts/carded/right-sidenav' }, + { + 'id' : 'right-sidenav-tabbed', + 'title': 'Right Sidenav Tabbed', + 'type' : 'item', + 'url' : '/ui/page-layouts/carded/right-sidenav-tabbed' + }, { 'id' : 'right-sidenav-2', 'title': 'Right Sidenav 2', 'type' : 'item', 'url' : '/ui/page-layouts/carded/right-sidenav-2' + }, + { + 'id' : 'right-sidenav-2-tabbed', + 'title': 'Right Sidenav 2 Tabbed', + 'type' : 'item', + 'url' : '/ui/page-layouts/carded/right-sidenav-2-tabbed' } ] }, From fe8b44b14cfd2816a37b01c42918b0fb18c37148 Mon Sep 17 00:00:00 2001 From: Sercan Yemen Date: Tue, 24 Oct 2017 10:19:17 +0300 Subject: [PATCH 03/11] Fixed: FAQ page header shrinks on small heights --- src/app/main/content/pages/faq/faq.component.html | 3 +-- src/app/main/content/pages/faq/faq.component.scss | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/main/content/pages/faq/faq.component.html b/src/app/main/content/pages/faq/faq.component.html index eea80bd4..4ccb44cd 100644 --- a/src/app/main/content/pages/faq/faq.component.html +++ b/src/app/main/content/pages/faq/faq.component.html @@ -1,8 +1,7 @@
-
+

We're here to help

diff --git a/src/app/main/content/pages/faq/faq.component.scss b/src/app/main/content/pages/faq/faq.component.scss index 131f21d7..ea7db673 100644 --- a/src/app/main/content/pages/faq/faq.component.scss +++ b/src/app/main/content/pages/faq/faq.component.scss @@ -3,6 +3,7 @@ :host { .header { + flex: 1 0 auto; height: 360px; background: #1A237E; background: linear-gradient(to right, #0E2A3B 0%, #34306B 100%); From b7cb09b087135fb88f17279a90bc96737e034b0b Mon Sep 17 00:00:00 2001 From: Sercan Yemen Date: Tue, 24 Oct 2017 11:02:40 +0300 Subject: [PATCH 04/11] Small adjustment on the layout mode setting --- src/app/main/main.component.scss | 12 ++++++------ src/app/main/main.component.ts | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/main/main.component.scss b/src/app/main/main.component.scss index 85dcb0f1..2c1b6977 100644 --- a/src/app/main/main.component.scss +++ b/src/app/main/main.component.scss @@ -6,12 +6,6 @@ fuse-main { width: 100%; height: 100%; - &.boxed { - max-width: 1200px; - margin: 0 auto; - @include mat-elevation(8); - } - > .mat-sidenav-container { display: flex; flex: 1; @@ -72,4 +66,10 @@ fuse-main { } } } + + &[fuse-layout-mode="boxed"] { + max-width: 1200px; + margin: 0 auto; + @include mat-elevation(8); + } } diff --git a/src/app/main/main.component.ts b/src/app/main/main.component.ts index c7896e3c..a8a7ce5c 100644 --- a/src/app/main/main.component.ts +++ b/src/app/main/main.component.ts @@ -14,7 +14,7 @@ export class FuseMainComponent implements OnInit, OnDestroy { onSettingsChanged: Subscription; fuseSettings: any; - @HostBinding('class.boxed') boxed; + @HostBinding('attr.fuse-layout-mode') layoutMode; constructor( private _renderer: Renderer2, @@ -29,7 +29,7 @@ export class FuseMainComponent implements OnInit, OnDestroy .subscribe( (newSettings) => { this.fuseSettings = newSettings; - this.boxed = this.fuseSettings.layout.mode === 'boxed'; + this.layoutMode = this.fuseSettings.layout.mode; } ); From 98e2ff0e1e6242fe392a59d2189dcf459194677f Mon Sep 17 00:00:00 2001 From: Sercan Yemen Date: Tue, 24 Oct 2017 11:47:10 +0300 Subject: [PATCH 05/11] Small adjustment on the FAQ page header --- src/app/main/content/pages/faq/faq.component.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/main/content/pages/faq/faq.component.scss b/src/app/main/content/pages/faq/faq.component.scss index ea7db673..2bf54830 100644 --- a/src/app/main/content/pages/faq/faq.component.scss +++ b/src/app/main/content/pages/faq/faq.component.scss @@ -5,6 +5,7 @@ .header { flex: 1 0 auto; height: 360px; + max-height: 360px; background: #1A237E; background: linear-gradient(to right, #0E2A3B 0%, #34306B 100%); From 9ecd921722e48ad876ef6ef7f2480f6f16c75427 Mon Sep 17 00:00:00 2001 From: Sercan Yemen Date: Tue, 24 Oct 2017 15:41:44 +0300 Subject: [PATCH 06/11] File based translations - multi language + Example in the Mail app + Component/doc page for translations --- package-lock.json | 5 + package.json | 1 + src/app/app.component.ts | 14 +- src/app/app.module.ts | 2 + src/app/core/modules/shared.module.ts | 8 +- .../services/translation-loader.service.ts | 27 ++++ src/app/main/content/apps/mail/i18n/en.ts | 14 ++ src/app/main/content/apps/mail/i18n/tr.ts | 14 ++ .../mail-details/mail-details.component.html | 8 +- .../mail/mail-list/mail-list.component.html | 2 +- .../content/apps/mail/mail.component.html | 2 +- .../main/content/apps/mail/mail.component.ts | 9 +- .../sidenavs/main/main-sidenav.component.html | 8 +- .../content/components/components.module.ts | 6 + .../multi-language.component.html | 138 ++++++++++++++++++ .../multi-language.component.scss | 13 ++ .../multi-language.component.ts | 13 ++ src/app/main/toolbar/toolbar.component.html | 2 +- src/app/main/toolbar/toolbar.component.ts | 18 ++- src/app/navigation.model.ts | 7 + 20 files changed, 292 insertions(+), 19 deletions(-) create mode 100644 src/app/core/services/translation-loader.service.ts create mode 100644 src/app/main/content/apps/mail/i18n/en.ts create mode 100644 src/app/main/content/apps/mail/i18n/tr.ts create mode 100644 src/app/main/content/components/multi-language/multi-language.component.html create mode 100644 src/app/main/content/components/multi-language/multi-language.component.scss create mode 100644 src/app/main/content/components/multi-language/multi-language.component.ts diff --git a/package-lock.json b/package-lock.json index 8136dfed..7c1c84de 100644 --- a/package-lock.json +++ b/package-lock.json @@ -268,6 +268,11 @@ "integrity": "sha1-w6DFRNYjkqzCgTpCyKDcb1j4aSI=", "dev": true }, + "@ngx-translate/core": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@ngx-translate/core/-/core-8.0.0.tgz", + "integrity": "sha1-dR/WtRLYDzp0jS3o38lt/vopr+A=" + }, "@schematics/angular": { "version": "0.0.45", "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-0.0.45.tgz", diff --git a/package.json b/package.json index 98d73d90..c7bae3e7 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "@angular/platform-browser": "4.4.6", "@angular/platform-browser-dynamic": "4.4.6", "@angular/router": "4.4.6", + "@ngx-translate/core": "8.0.0", "@swimlane/ngx-charts": "6.0.2", "@swimlane/ngx-datatable": "9.3.1", "@swimlane/ngx-dnd": "3.0.0", diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 491dd3a0..29e2809f 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,5 +1,6 @@ import { Component } from '@angular/core'; import { FuseSplashScreenService } from './core/services/splash-screen.service'; +import { TranslateService } from '@ngx-translate/core'; @Component({ selector : 'fuse-root', @@ -8,7 +9,18 @@ import { FuseSplashScreenService } from './core/services/splash-screen.service'; }) export class AppComponent { - constructor(private fuseSplashScreen: FuseSplashScreenService) + constructor( + private fuseSplashScreen: FuseSplashScreenService, + private translate: TranslateService + ) { + // Add languages + this.translate.addLangs(['en', 'tr']); + + // Set the default language + this.translate.setDefaultLang('en'); + + // Use a language + this.translate.use('en'); } } diff --git a/src/app/app.module.ts b/src/app/app.module.ts index ad6fbdb6..c125b9bd 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -21,6 +21,7 @@ import { ComponentsThirdPartyModule } from './main/content/components-third-part import { ServicesModule } from './main/content/services/services.module'; import { FuseAngularMaterialModule } from './main/content/components/angular-material/angular-material.module'; import { MarkdownModule } from 'angular2-markdown'; +import { TranslateModule } from '@ngx-translate/core'; const appRoutes: Routes = [ { @@ -69,6 +70,7 @@ const appRoutes: Routes = [ RouterModule.forRoot(appRoutes), SharedModule, MarkdownModule.forRoot(), + TranslateModule.forRoot(), InMemoryWebApiModule.forRoot(FuseFakeDbService, { delay : 0, diff --git a/src/app/core/modules/shared.module.ts b/src/app/core/modules/shared.module.ts index fe2787f2..bec7938c 100644 --- a/src/app/core/modules/shared.module.ts +++ b/src/app/core/modules/shared.module.ts @@ -19,8 +19,10 @@ import { FuseHljsComponent } from '../components/hljs/hljs.component'; import { FusePerfectScrollbarDirective } from '../directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive'; import { FuseIfOnDomDirective } from '../directives/fuse-if-on-dom/fuse-if-on-dom.directive'; import { FuseMaterialColorPickerComponent } from '../components/material-color-picker/material-color-picker.component'; +import { FuseTranslationLoaderService } from '../services/translation-loader.service'; import { CookieService } from 'ngx-cookie-service'; import { MarkdownModule } from 'angular2-markdown'; +import { TranslateModule } from '@ngx-translate/core'; @NgModule({ declarations : [ @@ -62,7 +64,8 @@ import { MarkdownModule } from 'angular2-markdown'; NgxDatatableModule, FuseIfOnDomDirective, FuseMaterialColorPickerComponent, - MarkdownModule + MarkdownModule, + TranslateModule ], entryComponents: [ FuseConfirmDialogComponent @@ -71,7 +74,8 @@ import { MarkdownModule } from 'angular2-markdown'; CookieService, FuseMatchMedia, FuseNavbarVerticalService, - FuseMatSidenavHelperService + FuseMatSidenavHelperService, + FuseTranslationLoaderService ] }) diff --git a/src/app/core/services/translation-loader.service.ts b/src/app/core/services/translation-loader.service.ts new file mode 100644 index 00000000..27283713 --- /dev/null +++ b/src/app/core/services/translation-loader.service.ts @@ -0,0 +1,27 @@ +import { Injectable } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; + +export interface Locale +{ + lang: string; + data: Object; +} + +@Injectable() +export class FuseTranslationLoaderService +{ + constructor(private translate: TranslateService) + { + } + + public loadTranslations(...args: Locale[]): void + { + const locales = [...args]; + + locales.forEach((locale) => { + // use setTranslation() with the third argument set to true + // to append translations instead of replacing them + this.translate.setTranslation(locale.lang, locale.data, true); + }); + } +} diff --git a/src/app/main/content/apps/mail/i18n/en.ts b/src/app/main/content/apps/mail/i18n/en.ts new file mode 100644 index 00000000..1e3b4b34 --- /dev/null +++ b/src/app/main/content/apps/mail/i18n/en.ts @@ -0,0 +1,14 @@ +export const locale = { + lang: 'en', + data: { + 'MAIL': { + 'COMPOSE' : 'COMPOSE', + 'FOLDERS' : 'FOLDERS', + 'FILTERS' : 'FILTERS', + 'LABELS' : 'LABELS', + 'NO_MESSAGES' : 'There are no messages!', + 'SELECT_A_MESSAGE_TO_READ': 'Select a message to read', + 'SEARCH_PLACEHOLDER': 'Search for an e-mail or contact' + } + } +}; diff --git a/src/app/main/content/apps/mail/i18n/tr.ts b/src/app/main/content/apps/mail/i18n/tr.ts new file mode 100644 index 00000000..03a524de --- /dev/null +++ b/src/app/main/content/apps/mail/i18n/tr.ts @@ -0,0 +1,14 @@ +export const locale = { + lang: 'tr', + data: { + 'MAIL': { + 'COMPOSE' : 'YENİ E-POSTA', + 'FOLDERS' : 'KLASÖRLER', + 'FILTERS' : 'FİLTRELER', + 'LABELS' : 'ETİKETLER', + 'NO_MESSAGES' : 'Mesajiniz bulunmamakta!', + 'SELECT_A_MESSAGE_TO_READ': 'Okumak için bir mesaj seçin', + 'SEARCH_PLACEHOLDER' : 'E-mail yada bir kişi arayın' + } + } +}; diff --git a/src/app/main/content/apps/mail/mail-details/mail-details.component.html b/src/app/main/content/apps/mail/mail-details/mail-details.component.html index c85a005f..87b785b2 100644 --- a/src/app/main/content/apps/mail/mail-details/mail-details.component.html +++ b/src/app/main/content/apps/mail/mail-details/mail-details.component.html @@ -1,6 +1,10 @@
- email - Select a message to read + + email + + + {{ 'MAIL.SELECT_A_MESSAGE_TO_READ' | translate }} +
diff --git a/src/app/main/content/apps/mail/mail-list/mail-list.component.html b/src/app/main/content/apps/mail/mail-list/mail-list.component.html index 4fbf9b80..0873a1fd 100644 --- a/src/app/main/content/apps/mail/mail-list/mail-list.component.html +++ b/src/app/main/content/apps/mail/mail-list/mail-list.component.html @@ -1,5 +1,5 @@
- There are no messages! + {{ 'MAIL.NO_MESSAGES' | translate }}
diff --git a/src/app/main/content/apps/mail/mail.component.html b/src/app/main/content/apps/mail/mail.component.html index 2ade9fd3..e68bc7e2 100644 --- a/src/app/main/content/apps/mail/mail.component.html +++ b/src/app/main/content/apps/mail/mail.component.html @@ -29,7 +29,7 @@
diff --git a/src/app/main/content/apps/mail/mail.component.ts b/src/app/main/content/apps/mail/mail.component.ts index cbee6a70..f8c04d9c 100644 --- a/src/app/main/content/apps/mail/mail.component.ts +++ b/src/app/main/content/apps/mail/mail.component.ts @@ -3,6 +3,9 @@ import { MailService } from './mail.service'; import { Subscription } from 'rxjs/Subscription'; import { FormControl } from '@angular/forms'; import { Mail } from './mail.model'; +import { FuseTranslationLoaderService } from '../../../../core/services/translation-loader.service'; +import { locale as english } from './i18n/en'; +import { locale as turkish } from './i18n/tr'; @Component({ selector : 'fuse-mail', @@ -25,9 +28,13 @@ export class FuseMailComponent implements OnInit, OnDestroy onLabelsChanged: Subscription; onCurrentMailChanged: Subscription; - constructor(private mailService: MailService) + constructor( + private mailService: MailService, + private translationLoader: FuseTranslationLoaderService + ) { this.searchInput = new FormControl(''); + this.translationLoader.loadTranslations(english, turkish); } ngOnInit() diff --git a/src/app/main/content/apps/mail/sidenavs/main/main-sidenav.component.html b/src/app/main/content/apps/mail/sidenavs/main/main-sidenav.component.html index b967b4cc..52a74963 100644 --- a/src/app/main/content/apps/mail/sidenavs/main/main-sidenav.component.html +++ b/src/app/main/content/apps/mail/sidenavs/main/main-sidenav.component.html @@ -30,13 +30,13 @@ class="mat-accent compose-dialog-button" (click)="composeDialog()" aria-label="Compose"> - COMPOSE + {{ 'MAIL.COMPOSE' | translate }}