Skip to content

Commit 175f8be

Browse files
authored
Merge pull request #527 from iyilm4z/ng-adminlte-migration
Angular UI migration to AdminLTE 3
2 parents 884b945 + 00303ed commit 175f8be

File tree

175 files changed

+6618
-18659
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+6618
-18659
lines changed

angular/angular.json

Lines changed: 25 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,14 @@
3131
}
3232
],
3333
"styles": [
34-
"node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
35-
"src/assets/fonts/roboto/roboto.css",
36-
"node_modules/bootstrap/dist/css/bootstrap.min.css",
37-
"node_modules/simple-line-icons/css/simple-line-icons.css",
38-
"node_modules/font-awesome/css/font-awesome.css",
3934
"node_modules/famfamfam-flags/dist/sprite/famfamfam-flags.css",
4035
"node_modules/toastr/build/toastr.css",
41-
"node_modules/node-waves/dist/waves.css",
42-
"src/bsb-theme/css/materialize.css",
43-
"src/bsb-theme/css/style.css",
44-
"src/bsb-theme/css/themes/all-themes.css",
36+
"node_modules/@fortawesome/fontawesome-free/css/all.min.css",
37+
"node_modules/admin-lte-css-only/css/adminlte.min.css",
4538
"src/shared/core.less"
4639
],
4740
"scripts": [
4841
"node_modules/jquery/dist/jquery.min.js",
49-
"node_modules/jquery-migrate/dist/jquery-migrate.min.js",
50-
"node_modules/js-cookie/src/js.cookie.js",
51-
"node_modules/bootstrap/dist/js/bootstrap.js",
52-
"node_modules/lodash/lodash.min.js",
5342
"node_modules/moment/min/moment.min.js",
5443
"node_modules/@aspnet/signalr/dist/browser/signalr.min.js",
5544
"node_modules/toastr/toastr.js",
@@ -58,28 +47,13 @@
5847
"node_modules/spin.js/spin.min.js",
5948
"node_modules/spin.js/jquery.spin.js",
6049
"node_modules/push.js/bin/push.min.js",
61-
"node_modules/jquery-slimscroll/jquery.slimscroll.min.js",
62-
"node_modules/node-waves/dist/waves.min.js",
63-
"node_modules/jquery-countto/jquery.countTo.js",
64-
"node_modules/raphael/raphael.min.js",
65-
"node_modules/morris.js/morris.min.js",
66-
"node_modules/chart.js/dist/Chart.bundle.min.js",
67-
"node_modules/flot/jquery.flot.js",
68-
"node_modules/flot/jquery.flot.resize.js",
69-
"node_modules/flot/jquery.flot.pie.js",
70-
"node_modules/flot/jquery.flot.categories.js",
71-
"node_modules/flot/jquery.flot.time.js",
72-
"node_modules/jquery-sparkline/jquery.sparkline.min.js",
7350
"node_modules/abp-web-resources/Abp/Framework/scripts/abp.js",
7451
"node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.jquery.js",
7552
"node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.toastr.js",
7653
"node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.blockUI.js",
7754
"node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.spin.js",
7855
"node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.sweet-alert.js",
79-
"node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.moment.js",
80-
"src/bsb-theme/js/admin.js",
81-
"src/bsb-theme/js/demo.js",
82-
"src/bsb-theme/js/jquery.validate.js"
56+
"node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.moment.js"
8357
]
8458
},
8559
"configurations": {
@@ -136,12 +110,29 @@
136110
"main": "src/test.ts",
137111
"karmaConfig": "./karma.conf.js",
138112
"polyfills": "src/polyfills.ts",
113+
"assets": [
114+
"src/assets",
115+
"src/favicon.ico",
116+
{
117+
"glob": "abp.signalr.js",
118+
"input": "node_modules/abp-web-resources/Abp/Framework/scripts/libs",
119+
"output": "/assets/abp"
120+
},
121+
{
122+
"glob": "abp.signalr-client.js",
123+
"input": "node_modules/abp-web-resources/Abp/Framework/scripts/libs",
124+
"output": "/assets/abp"
125+
}
126+
],
127+
"styles": [
128+
"node_modules/famfamfam-flags/dist/sprite/famfamfam-flags.css",
129+
"node_modules/toastr/build/toastr.css",
130+
"node_modules/@fortawesome/fontawesome-free/css/all.min.css",
131+
"node_modules/admin-lte-css-only/css/adminlte.min.css",
132+
"src/shared/core.less"
133+
],
139134
"scripts": [
140135
"node_modules/jquery/dist/jquery.min.js",
141-
"node_modules/jquery-migrate/dist/jquery-migrate.min.js",
142-
"node_modules/js-cookie/src/js.cookie.js",
143-
"node_modules/bootstrap/dist/js/bootstrap.js",
144-
"node_modules/lodash/lodash.min.js",
145136
"node_modules/moment/min/moment.min.js",
146137
"node_modules/@aspnet/signalr/dist/browser/signalr.min.js",
147138
"node_modules/toastr/toastr.js",
@@ -150,55 +141,13 @@
150141
"node_modules/spin.js/spin.min.js",
151142
"node_modules/spin.js/jquery.spin.js",
152143
"node_modules/push.js/bin/push.min.js",
153-
"node_modules/jquery-slimscroll/jquery.slimscroll.min.js",
154-
"node_modules/node-waves/dist/waves.min.js",
155-
"node_modules/jquery-countto/jquery.countTo.js",
156-
"node_modules/raphael/raphael.min.js",
157-
"node_modules/morris.js/morris.min.js",
158-
"node_modules/chart.js/dist/Chart.bundle.min.js",
159-
"node_modules/flot/jquery.flot.js",
160-
"node_modules/flot/jquery.flot.resize.js",
161-
"node_modules/flot/jquery.flot.pie.js",
162-
"node_modules/flot/jquery.flot.categories.js",
163-
"node_modules/flot/jquery.flot.time.js",
164-
"node_modules/jquery-sparkline/jquery.sparkline.min.js",
165144
"node_modules/abp-web-resources/Abp/Framework/scripts/abp.js",
166145
"node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.jquery.js",
167146
"node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.toastr.js",
168147
"node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.blockUI.js",
169148
"node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.spin.js",
170149
"node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.sweet-alert.js",
171-
"node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.moment.js",
172-
"src/bsb-theme/js/admin.js",
173-
"src/bsb-theme/js/demo.js",
174-
"src/bsb-theme/js/jquery.validate.js"
175-
],
176-
"styles": [
177-
"src/assets/fonts/roboto/roboto.css",
178-
"node_modules/bootstrap/dist/css/bootstrap.min.css",
179-
"node_modules/simple-line-icons/css/simple-line-icons.css",
180-
"node_modules/font-awesome/css/font-awesome.css",
181-
"node_modules/famfamfam-flags/dist/sprite/famfamfam-flags.css",
182-
"node_modules/toastr/build/toastr.css",
183-
"node_modules/node-waves/dist/waves.css",
184-
"src/bsb-theme/css/materialize.css",
185-
"src/bsb-theme/css/style.css",
186-
"src/bsb-theme/css/themes/all-themes.css",
187-
"src/shared/core.less"
188-
],
189-
"assets": [
190-
"src/assets",
191-
"src/favicon.ico",
192-
{
193-
"glob": "abp.signalr.js",
194-
"input": "node_modules/abp-web-resources/Abp/Framework/scripts/libs",
195-
"output": "/assets/abp"
196-
},
197-
{
198-
"glob": "abp.signalr-client.js",
199-
"input": "node_modules/abp-web-resources/Abp/Framework/scripts/libs",
200-
"output": "/assets/abp"
201-
}
150+
"node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.moment.js"
202151
]
203152
}
204153
},

angular/package.json

Lines changed: 16 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,42 @@
11
{
22
"name": "AbpProjectName",
33
"version": "4.7.1",
4+
"private": true,
45
"license": "MIT",
5-
"angular-cli": {},
66
"scripts": {
7-
"ng": "ng",
8-
"start": "ng serve --host 0.0.0.0 --port 4200",
9-
"hmr": "ng serve --host 0.0.0.0 --port 4200 --hmr",
10-
"test": "ng test",
117
"pree2e": "webdriver-manager update --standalone false --gecko false",
128
"e2e": "protractor",
13-
"lint": "tslint --force --project src/tsconfig.json src/**/*.ts -t verbose"
9+
"hmr": "ng serve --host 0.0.0.0 --port 4200 --hmr",
10+
"lint": "tslint --force --project src/tsconfig.json src/**/*.ts -t verbose",
11+
"ng": "ng",
12+
"start": "ng serve --host 0.0.0.0 --port 4200",
13+
"test": "ng test"
1414
},
15-
"private": true,
1615
"dependencies": {
1716
"@angular/animations": "^8.2.4",
18-
"@angular/cdk": "^8.1.4",
1917
"@angular/common": "^8.2.4",
2018
"@angular/compiler": "^8.2.4",
2119
"@angular/core": "^8.2.4",
2220
"@angular/forms": "^8.2.4",
23-
"@angular/material": "^8.1.4",
2421
"@angular/platform-browser": "^8.2.4",
2522
"@angular/platform-browser-dynamic": "^8.2.4",
2623
"@angular/router": "^8.2.4",
2724
"@aspnet/signalr": "^1.1.4",
28-
"@types/bootstrap": "^3.3.33",
29-
"@types/jquery": "^3.3.31",
30-
"@types/jquery.blockui": "0.0.28",
31-
"@types/jquery.validation": "^1.16.3",
32-
"@types/lodash": "^4.14.62",
33-
"@types/moment": "^2.13.0",
34-
"@types/moment-timezone": "^0.5.12",
35-
"@types/toastr": "^2.1.33",
25+
"@fortawesome/fontawesome-free": "^5.13.0",
3626
"abp-ng2-module": "^5.1.1",
3727
"abp-web-resources": "^5.1.1",
38-
"animate.css": "^3.5.2",
28+
"admin-lte-css-only": "^3.0.4",
3929
"block-ui": "^2.70.1",
40-
"bootstrap": "^3.3.7",
41-
"bootstrap-select": "^1.12.2",
42-
"chart.js": "^2.6.0",
4330
"core-js": "^3.2.1",
4431
"famfamfam-flags": "^1.0.0",
45-
"flot": "^0.8.0-alpha",
46-
"font-awesome": "^4.7.0",
47-
"hammerjs": "^2.0.8",
48-
"jquery": "^3.1.1",
49-
"jquery-countto": "^1.2.0",
50-
"jquery-migrate": "^3.0.0",
51-
"jquery-slimscroll": "^1.3.8",
52-
"jquery-sparkline": "^2.4.0",
53-
"js-cookie": "^2.1.4",
32+
"jquery": "^3.4.1",
5433
"lodash": "^4.17.4",
5534
"moment": "^2.18.1",
5635
"moment-timezone": "^0.5.13",
57-
"morris.js": "^0.5.0",
58-
"ngx-bootstrap": "^5.1.1",
36+
"ngx-bootstrap": "^5.6.1",
5937
"ngx-pagination": "^4.1.0",
60-
"node-waves": "^0.7.5",
6138
"push.js": "1.0.9",
62-
"raphael": "^2.2.7",
6339
"rxjs": "^6.4.0",
64-
"simple-line-icons": "^2.4.1",
6540
"spin.js": "^2.3.2",
6641
"sweetalert": "^2.0.8",
6742
"toastr": "^2.1.2",
@@ -75,6 +50,10 @@
7550
"@angular/compiler-cli": "^8.2.4",
7651
"@angularclass/hmr": "^2.1.3",
7752
"@types/jasmine": "^3.4.0",
53+
"@types/jquery": "^3.3.34",
54+
"@types/jquery.blockui": "0.0.28",
55+
"@types/lodash": "^4.14.62",
56+
"@types/moment-timezone": "^0.5.12",
7857
"@types/node": "^12.7.3",
7958
"codelyzer": "^5.0.1",
8059
"jasmine-core": "^3.3.0",
@@ -91,5 +70,6 @@
9170
"tslint": "^5.19.0",
9271
"typescript": "3.4.5",
9372
"webpack-bundle-analyzer": "^3.0.3"
94-
}
73+
},
74+
"angular-cli": {}
9575
}
Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
<div class="login-box">
2-
<div class="logo">
3-
<a href="javascript:void(0);">AbpProjectName</a>
2+
<account-header></account-header>
3+
<div class="card">
4+
<div *ngIf="showTenantChange()" class="card-header">
5+
<tenant-change></tenant-change>
46
</div>
5-
6-
<div *ngIf="showTenantChange()" class="tenant-change-box">
7-
<tenant-change></tenant-change>
7+
<div class="card-body login-card-body">
8+
<router-outlet></router-outlet>
89
</div>
9-
10-
<router-outlet></router-outlet>
11-
12-
<account-languages></account-languages>
13-
14-
<div class="row">
15-
<div class="col-xs-12 text-center" style="color: #e9e9e9">
16-
<small>&copy; {{currentYear}} AbpProjectName. <b>{{ "Version" | localize }} </b> {{versionText}}</small>
17-
</div>
10+
<div class="card-footer">
11+
<account-languages></account-languages>
1812
</div>
19-
20-
</div>
13+
</div>
14+
<account-footer></account-footer>
15+
</div>

angular/src/account/account.component.less

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,26 @@
1-
import { Component, ViewContainerRef, OnInit, ViewEncapsulation, Injector } from '@angular/core';
2-
import { LoginService } from './login/login.service';
1+
import {
2+
Component,
3+
OnInit,
4+
ViewEncapsulation,
5+
Injector,
6+
Renderer2
7+
} from '@angular/core';
38
import { AppComponentBase } from '@shared/app-component-base';
49

510
@Component({
6-
templateUrl: './account.component.html',
7-
styleUrls: [
8-
'./account.component.less'
9-
],
10-
encapsulation: ViewEncapsulation.None
11+
templateUrl: './account.component.html',
12+
encapsulation: ViewEncapsulation.None
1113
})
1214
export class AccountComponent extends AppComponentBase implements OnInit {
15+
constructor(injector: Injector, private renderer: Renderer2) {
16+
super(injector);
17+
}
1318

14-
versionText: string;
15-
currentYear: number;
19+
showTenantChange(): boolean {
20+
return abp.multiTenancy.isEnabled;
21+
}
1622

17-
private viewContainerRef: ViewContainerRef;
18-
19-
public constructor(
20-
injector: Injector,
21-
private _loginService: LoginService
22-
) {
23-
super(injector);
24-
25-
this.currentYear = new Date().getFullYear();
26-
this.versionText = this.appSession.application.version + ' [' + this.appSession.application.releaseDate.format('YYYYDDMM') + ']';
27-
}
28-
29-
showTenantChange(): boolean {
30-
return abp.multiTenancy.isEnabled;
31-
}
32-
33-
ngOnInit(): void {
34-
$('body').addClass('login-page');
35-
}
23+
ngOnInit(): void {
24+
this.renderer.addClass(document.body, 'login-page');
25+
}
3626
}

angular/src/account/account.module.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { FormsModule } from '@angular/forms';
44
import { HttpClientJsonpModule } from '@angular/common/http';
55
import { HttpClientModule } from '@angular/common/http';
66

7-
import { ModalModule } from 'ngx-bootstrap';
7+
import { ModalModule } from 'ngx-bootstrap/modal';
88

99
import { AbpModule } from '@abp/abp.module';
1010

@@ -18,6 +18,8 @@ import { AccountComponent } from './account.component';
1818
import { LoginComponent } from './login/login.component';
1919
import { RegisterComponent } from './register/register.component';
2020
import { AccountLanguagesComponent } from './layout/account-languages.component';
21+
import { AccountHeaderComponent } from './layout/account-header.component';
22+
import { AccountFooterComponent } from './layout/account-footer.component';
2123

2224
import { LoginService } from './login/login.service';
2325

@@ -35,13 +37,15 @@ import { TenantChangeDialogComponent } from './tenant/tenant-change-dialog.compo
3537
SharedModule,
3638
ServiceProxyModule,
3739
AccountRoutingModule,
38-
ModalModule.forRoot()
40+
ModalModule.forChild()
3941
],
4042
declarations: [
4143
AccountComponent,
4244
LoginComponent,
4345
RegisterComponent,
4446
AccountLanguagesComponent,
47+
AccountHeaderComponent,
48+
AccountFooterComponent,
4549
// tenant
4650
TenantChangeComponent,
4751
TenantChangeDialogComponent,
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<div class="row">
2+
<div class="col-md-12 text-center">
3+
<small>
4+
Copyright &copy; {{ currentYear }}
5+
<b class="ml-2">{{ "Version" | localize }}</b>
6+
{{ versionText }}
7+
</small>
8+
</div>
9+
</div>

0 commit comments

Comments
 (0)