Skip to content

Commit 1d3e48a

Browse files
committed
Remove old menus.
1 parent df23f2b commit 1d3e48a

File tree

2 files changed

+10
-19
lines changed

2 files changed

+10
-19
lines changed

angular/src/app/layout/sidebar-nav.component.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ export class SideBarNavComponent extends AppComponentBase {
2222
new MenuItem("Home", "", "", "https://aspnetboilerplate.com"),
2323
new MenuItem("Templates", "", "", "https://aspnetboilerplate.com/Templates"),
2424
new MenuItem("Samples", "", "", "https://aspnetboilerplate.com/Samples"),
25-
new MenuItem("Documents", "", "", "https://aspnetboilerplate.com/Pages/Documents"),
26-
new MenuItem("Forum", "", "", "https://forum.aspnetboilerplate.com/"),
27-
new MenuItem("About", "", "", "https://aspnetboilerplate.com/About")
25+
new MenuItem("Documents", "", "", "https://aspnetboilerplate.com/Pages/Documents")
2826
]),
2927
new MenuItem("ASP.NET Zero", "", "", "", [
3028
new MenuItem("Home", "", "", "https://aspnetzero.com?ref=abptmpl"),

angular/src/app/roles/create-role/create-role.component.ts

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component, ViewChild, Injector, Output, EventEmitter, ElementRef, OnInit } from '@angular/core';
22
import { ModalDirective } from 'ngx-bootstrap';
3-
import { RoleServiceProxy, CreateRoleDto, RoleDto, ListResultDtoOfPermissionDto } from '@shared/service-proxies/service-proxies';
3+
import { RoleServiceProxy, CreateRoleDto, ListResultDtoOfPermissionDto } from '@shared/service-proxies/service-proxies';
44
import { AppComponentBase } from '@shared/app-component-base';
55

66
@Component({
@@ -35,29 +35,22 @@ export class CreateRoleComponent extends AppComponentBase implements OnInit {
3535

3636
show(): void {
3737
this.active = true;
38-
this.modal.show();
39-
this.role = new CreateRoleDto({isStatic:false,
40-
description:'',
41-
isActive:false,
42-
name:''});
38+
this.role = new CreateRoleDto({ isActive: true, isStatic: false });
4339

44-
// // shouldn't have to do this!
45-
// this.role.description = "";
46-
// this.role.isActive = false;
47-
// this.role.name = "";
40+
this.modal.show();
4841
}
4942

5043
onShown(): void {
5144
($ as any).AdminBSB.input.activate($(this.modalContent.nativeElement));
5245

5346
$('#frm_create_role').validate({
54-
highlight: function (input) {
47+
highlight: input => {
5548
$(input).parents('.form-line').addClass('error');
5649
},
57-
unhighlight: function (input) {
50+
unhighlight: input => {
5851
$(input).parents('.form-line').removeClass('error');
5952
},
60-
errorPlacement: function (error, element) {
53+
errorPlacement: (error, element) => {
6154
$(element).parents('.form-group').append(error);
6255
}
6356
});
@@ -66,12 +59,12 @@ export class CreateRoleComponent extends AppComponentBase implements OnInit {
6659
save(): void {
6760
var permissions = [];
6861
$(this.modalContent.nativeElement).find("[name=permission]").each(
69-
function( index:number, elem: Element){
70-
if($(elem).is(":checked") == true){
62+
(index: number, elem: Element) => {
63+
if ($(elem).is(":checked") == true) {
7164
permissions.push(elem.getAttribute("value").valueOf());
7265
}
7366
}
74-
)
67+
);
7568

7669
this.role.permissions = permissions;
7770
this.saving = true;

0 commit comments

Comments
 (0)