Skip to content

Commit 83b46fa

Browse files
authored
Merge pull request #23 from lprichar/misc-cleanup
Misc cleanup
2 parents 0b4a89b + ca71072 commit 83b46fa

File tree

11 files changed

+47
-191
lines changed

11 files changed

+47
-191
lines changed

angular/src/app/layout/topbar.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="search-icon">
44
<i class="material-icons">search</i>
55
</div>
6-
<input materialInput type="text" placeholder="START TYPING...">
6+
<input matInput type="text" placeholder="START TYPING...">
77
<div class="close-search">
88
<i class="material-icons">close</i>
99
</div>

angular/src/app/roles/create-role/create-role-dialog.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<h1 mat-dialog-title>{{ "CreateNewRole" | localize }}</h1>
33
<mat-dialog-content style="width:600px;height:300px;">
44
<mat-tab-group>
5-
<mat-tab [label]="'RoleDetails' | localize">
5+
<mat-tab [label]="'Details' | localize">
66
<br />
77
<div class="row-fluid">
88
<div class="col-md-12">
@@ -39,7 +39,7 @@ <h1 mat-dialog-title>{{ "CreateNewRole" | localize }}</h1>
3939
</div>
4040
</div>
4141
</mat-tab>
42-
<mat-tab [label]="'RolePermissions' | localize">
42+
<mat-tab [label]="'Permissions' | localize">
4343
<br />
4444
<div class="row-fluid">
4545
<ng-template ngFor let-permission [ngForOf]="permissions">

angular/src/app/roles/edit-role/edit-role-dialog.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<h1 mat-dialog-title>{{ "EditRole" | localize }}</h1>
33
<mat-dialog-content style="width:600px;height:300px;">
44
<mat-tab-group>
5-
<mat-tab [label]="'RoleDetails' | localize">
5+
<mat-tab [label]="'Details' | localize">
66
<br />
77
<div class="row-fluid">
88
<div class="col-md-12">
@@ -39,7 +39,7 @@ <h1 mat-dialog-title>{{ "EditRole" | localize }}</h1>
3939
</div>
4040
</div>
4141
</mat-tab>
42-
<mat-tab [label]="'RolePermissions' | localize">
42+
<mat-tab [label]="'Permissions' | localize">
4343
<br />
4444
<div class="row-fluid">
4545
<ng-template ngFor let-permission [ngForOf]="permissions">

angular/src/app/roles/roles.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ <h2>{{ "Roles" | localize }}</h2>
2525
<table class="table table-hover table-striped" [busy]="isTableLoading">
2626
<thead>
2727
<tr>
28-
<th>{{ "Actions" | localize }}</th>
2928
<th>{{ "RoleName" | localize }}</th>
3029
<th>{{ "DisplayName" | localize }}</th>
30+
<th>{{ "Actions" | localize }}</th>
3131
</tr>
3232
</thead>
3333
<tbody>
@@ -43,8 +43,10 @@ <h2>{{ "Roles" | localize }}</h2>
4343
})
4444
"
4545
>
46+
<td>{{ role.name }}</td>
47+
<td>{{ role.displayName }}</td>
4648
<td>
47-
<button mat-icon-button [matMenuTriggerFor]="actionsMenu">
49+
<button class="action-button" mat-icon-button [matMenuTriggerFor]="actionsMenu">
4850
<mat-icon>menu</mat-icon>
4951
</button>
5052
<mat-menu #actionsMenu="matMenu">
@@ -58,8 +60,6 @@ <h2>{{ "Roles" | localize }}</h2>
5860
</button>
5961
</mat-menu>
6062
</td>
61-
<td>{{ role.name }}</td>
62-
<td>{{ role.displayName }}</td>
6363
</tr>
6464
</tbody>
6565
</table>

angular/src/app/tenants/tenants.component.html

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ <h2>{{ "Tenants" | localize }}</h2>
2525
<table class="table table-hover table-striped" [busy]="isTableLoading">
2626
<thead>
2727
<tr>
28-
<th>{{ "Actions" | localize }}</th>
2928
<th>{{ "TenancyName" | localize }}</th>
3029
<th>{{ "Name" | localize }}</th>
3130
<th>
3231
<div style="text-align:center">{{ "IsActive" | localize }}</div>
3332
</th>
33+
<th>{{ "Actions" | localize }}</th>
3434
</tr>
3535
</thead>
3636
<tbody>
@@ -46,21 +46,6 @@ <h2>{{ "Tenants" | localize }}</h2>
4646
})
4747
"
4848
>
49-
<td>
50-
<button mat-icon-button [matMenuTriggerFor]="actionsMenu">
51-
<mat-icon>menu</mat-icon>
52-
</button>
53-
<mat-menu #actionsMenu="matMenu">
54-
<button mat-menu-item (click)="editTenant(tenant)">
55-
<mat-icon>edit</mat-icon>
56-
<span>{{ "Edit" | localize }}</span>
57-
</button>
58-
<button mat-menu-item (click)="delete(tenant)">
59-
<mat-icon>delete</mat-icon>
60-
<span>{{ "Delete" | localize }}</span>
61-
</button>
62-
</mat-menu>
63-
</td>
6449
<td>{{ tenant.tenancyName }}</td>
6550
<td>{{ tenant.name }}</td>
6651
<td align="center">
@@ -79,6 +64,21 @@ <h2>{{ "Tenants" | localize }}</h2>
7964
indeterminate_check_box
8065
</i>
8166
</td>
67+
<td>
68+
<button class="action-button" mat-icon-button [matMenuTriggerFor]="actionsMenu">
69+
<mat-icon>menu</mat-icon>
70+
</button>
71+
<mat-menu #actionsMenu="matMenu">
72+
<button mat-menu-item (click)="editTenant(tenant)">
73+
<mat-icon>edit</mat-icon>
74+
<span>{{ "Edit" | localize }}</span>
75+
</button>
76+
<button mat-menu-item (click)="delete(tenant)">
77+
<mat-icon>delete</mat-icon>
78+
<span>{{ "Delete" | localize }}</span>
79+
</button>
80+
</mat-menu>
81+
</td>
8282
</tr>
8383
</tbody>
8484
</table>

angular/src/app/users/users.component.html

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ <h2>{{ "Users" | localize }}</h2>
2525
<table class="table table-hover table-striped" [busy]="isTableLoading">
2626
<thead>
2727
<tr>
28-
<th>{{ "Actions" | localize }}</th>
2928
<th>{{ "UserName" | localize }}</th>
3029
<th>{{ "FullName" | localize }}</th>
3130
<th>{{ "EmailAddress" | localize }}</th>
3231
<th>
3332
<div style="text-align:center">{{ "IsActive" | localize }}</div>
3433
</th>
34+
<th>{{ "Actions" | localize }}</th>
3535
</tr>
3636
</thead>
3737
<tbody>
@@ -47,21 +47,6 @@ <h2>{{ "Users" | localize }}</h2>
4747
})
4848
"
4949
>
50-
<td>
51-
<button mat-icon-button [matMenuTriggerFor]="actionsMenu">
52-
<mat-icon>menu</mat-icon>
53-
</button>
54-
<mat-menu #actionsMenu="matMenu">
55-
<button mat-menu-item (click)="editUser(user)">
56-
<mat-icon>edit</mat-icon>
57-
<span>{{ "Edit" | localize }}</span>
58-
</button>
59-
<button mat-menu-item (click)="delete(user)">
60-
<mat-icon>delete</mat-icon>
61-
<span>{{ "Delete" | localize }}</span>
62-
</button>
63-
</mat-menu>
64-
</td>
6550
<td>{{ user.userName }}</td>
6651
<td>{{ user.fullName }}</td>
6752
<td>{{ user.emailAddress }}</td>
@@ -81,6 +66,21 @@ <h2>{{ "Users" | localize }}</h2>
8166
indeterminate_check_box
8267
</i>
8368
</td>
69+
<td>
70+
<button class="action-button" mat-icon-button [matMenuTriggerFor]="actionsMenu">
71+
<mat-icon>menu</mat-icon>
72+
</button>
73+
<mat-menu #actionsMenu="matMenu">
74+
<button mat-menu-item (click)="editUser(user)">
75+
<mat-icon>edit</mat-icon>
76+
<span>{{ "Edit" | localize }}</span>
77+
</button>
78+
<button mat-menu-item (click)="delete(user)">
79+
<mat-icon>delete</mat-icon>
80+
<span>{{ "Delete" | localize }}</span>
81+
</button>
82+
</mat-menu>
83+
</td>
8484
</tr>
8585
</tbody>
8686
</table>

angular/src/bsb-theme/css/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4608,7 +4608,7 @@ section.content {
46084608

46094609
/* Tables ====================================== */
46104610
.table tbody tr td, .table tbody tr th {
4611-
padding: 10px;
4611+
padding: 18px 10px 0 10px;
46124612
border-top: 1px solid #eee;
46134613
border-bottom: 1px solid #eee; }
46144614

angular/src/bsb-theme/js/admin.js

Lines changed: 0 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -259,134 +259,7 @@
259259
});
260260
}
261261
}
262-
//==========================================================================================================================
263-
264-
/* Input - Function ========================================================================================================
265-
* You can manage the inputs(also textareas) with name of class 'form-control'
266-
*
267-
*/
268-
$.AdminBSB.input = {
269-
activate: function ($parentSelector) {
270-
$parentSelector = $parentSelector || $('body');
271-
272-
//On focus event
273-
$parentSelector.find('.form-control').focus(function () {
274-
$(this).parent().addClass('focused');
275-
});
276-
277-
//On focusout event
278-
$parentSelector.find('.form-control').focusout(function () {
279-
var $this = $(this);
280-
if ($this.parents('.form-group').hasClass('form-float')) {
281-
if ($this.val() == '') { $this.parents('.form-line').removeClass('focused'); }
282-
}
283-
else {
284-
$this.parents('.form-line').removeClass('focused');
285-
}
286-
});
287-
288-
//On label click
289-
$parentSelector.on('click', '.form-float .form-line .form-label', function () {
290-
$(this).parent().find('input').focus();
291-
});
292262

293-
//Not blank form
294-
$parentSelector.find('.form-control').each(function () {
295-
if ($(this).val() !== '') {
296-
$(this).parents('.form-line').addClass('focused');
297-
}
298-
});
299-
}
300-
}
301-
//==========================================================================================================================
302-
303-
/* Form - Select - Function ================================================================================================
304-
* You can manage the 'select' of form elements
305-
*
306-
*/
307-
$.AdminBSB.select = {
308-
activate: function () {
309-
if ($.fn.selectpicker) { $('select:not(.ms)').selectpicker(); }
310-
}
311-
}
312-
//==========================================================================================================================
313-
314-
/* DropdownMenu - Function =================================================================================================
315-
* You can manage the dropdown menu
316-
*
317-
*/
318-
319-
$.AdminBSB.dropdownMenu = {
320-
activate: function () {
321-
var _this = this;
322-
323-
$('.dropdown, .dropup, .btn-group').on({
324-
"show.bs.dropdown": function () {
325-
var dropdown = _this.dropdownEffect(this);
326-
_this.dropdownEffectStart(dropdown, dropdown.effectIn);
327-
},
328-
"shown.bs.dropdown": function () {
329-
var dropdown = _this.dropdownEffect(this);
330-
if (dropdown.effectIn && dropdown.effectOut) {
331-
_this.dropdownEffectEnd(dropdown, function () { });
332-
}
333-
},
334-
"hide.bs.dropdown": function (e) {
335-
var dropdown = _this.dropdownEffect(this);
336-
if (dropdown.effectOut) {
337-
e.preventDefault();
338-
_this.dropdownEffectStart(dropdown, dropdown.effectOut);
339-
_this.dropdownEffectEnd(dropdown, function () {
340-
dropdown.dropdown.removeClass('open');
341-
});
342-
}
343-
}
344-
});
345-
346-
//Set Waves
347-
Waves.attach('.dropdown-menu li a', ['waves-block']);
348-
Waves.init();
349-
},
350-
dropdownEffect: function (target) {
351-
var effectIn = $.AdminBSB.options.dropdownMenu.effectIn, effectOut = $.AdminBSB.options.dropdownMenu.effectOut;
352-
var dropdown = $(target), dropdownMenu = $('.dropdown-menu', target);
353-
354-
if (dropdown.length > 0) {
355-
var udEffectIn = dropdown.data('effect-in');
356-
var udEffectOut = dropdown.data('effect-out');
357-
if (udEffectIn !== undefined) { effectIn = udEffectIn; }
358-
if (udEffectOut !== undefined) { effectOut = udEffectOut; }
359-
}
360-
361-
return {
362-
target: target,
363-
dropdown: dropdown,
364-
dropdownMenu: dropdownMenu,
365-
effectIn: effectIn,
366-
effectOut: effectOut
367-
};
368-
},
369-
dropdownEffectStart: function (data, effectToStart) {
370-
if (effectToStart) {
371-
data.dropdown.addClass('dropdown-animating');
372-
data.dropdownMenu.addClass('animated dropdown-animated');
373-
data.dropdownMenu.addClass(effectToStart);
374-
}
375-
},
376-
dropdownEffectEnd: function (data, callback) {
377-
var animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
378-
data.dropdown.one(animationEnd, function () {
379-
data.dropdown.removeClass('dropdown-animating');
380-
data.dropdownMenu.removeClass('animated dropdown-animated');
381-
data.dropdownMenu.removeClass(data.effectIn);
382-
data.dropdownMenu.removeClass(data.effectOut);
383-
384-
if (typeof callback == 'function') {
385-
callback();
386-
}
387-
});
388-
}
389-
}
390263
//==========================================================================================================================
391264

392265
/* Browser - Function ======================================================================================================
@@ -458,9 +331,6 @@
458331
$.AdminBSB.leftSideBar.activate();
459332
$.AdminBSB.rightSideBar.activate();
460333
$.AdminBSB.navbar.activate();
461-
//$.AdminBSB.dropdownMenu.activate(); //Breaks drop downs, so disabled it!
462-
$.AdminBSB.input.activate();
463-
$.AdminBSB.select.activate();
464334
$.AdminBSB.search.activate();
465335
}
466336

angular/src/shared/core.less

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,11 @@ topbar-languageswitch {
237237
.abp-pagination-controls-wrapper {
238238
text-align: center;
239239
}
240-
240+
241241
.header-dropdown-mat-icon-button {
242242
bottom: 10px;
243+
}
244+
245+
.action-button {
246+
top: -9px;
243247
}

angular/src/shared/directives/material-input.directive.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)