Merge branch 'release/v1.5.2' of hardi/opt-cc into master

pull/13/head v1.5.2
hardi 2017-10-07 21:13:10 +02:00 committed by HardiReady
commit 8799a1cdcd
38 changed files with 120 additions and 191 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "opt-cc", "name": "opt-cc",
"version": "1.5.1", "version": "1.5.2",
"license": "MIT", "license": "MIT",
"private": true, "private": true,
"scripts": { "scripts": {

View File

@ -1,13 +1,5 @@
.overview { .overview {
position: fixed; padding: 80px 0 0 10%!important;
overflow-y: scroll;
overflow-x: hidden;
bottom: 20px;
width: 100%;
padding-left: 50px;
padding-top: 190px;
margin-left: 10px;
height: 100vh;
} }
.trash { .trash {
@ -22,6 +14,7 @@
.table-container { .table-container {
margin-top: 10px; margin-top: 10px;
overflow-x: auto; overflow-x: auto;
padding: 5px;
} }
.table-head { .table-head {

View File

@ -3,8 +3,7 @@
<h2>Admin Panel</h2> <h2>Admin Panel</h2>
<span *ngIf="showSuccessLabel" <span *ngIf="showSuccessLabel"
class="label label-success label-small" class="absolute-label label label-success label-small">
style="margin-left: inherit">
Erfolgreich gespeichert Erfolgreich gespeichert
</span> </span>

View File

@ -8,7 +8,7 @@ import {SquadService} from "../services/squad-service/squad.service";
@Component({ @Component({
selector: 'admin-panel', selector: 'admin-panel',
templateUrl: './admin.component.html', templateUrl: './admin.component.html',
styleUrls: ['./admin.component.css'] styleUrls: ['./admin.component.css', '../style/overview.css']
}) })
export class AdminComponent { export class AdminComponent {

View File

@ -1,14 +1,14 @@
.overview { .army-member-view {
height: 100vh;
width: 90%; width: 90%;
height: 100vh;
padding: 5px; padding: 5px;
margin: auto; margin: auto;
position: relative;
left: -1%;
} }
:host /deep/ #right { .army-member-view-container {
padding-left: 0; width: 90%;
min-width: 870px;
margin:auto
} }
.return-button { .return-button {

View File

@ -1,5 +1,5 @@
<div class="overview"> <div class="army-member-view">
<div style="width: 90%; min-width: 870px; margin:auto"> <div class="army-member-view-container">
<div class="return-button"> <div class="return-button">
<span class="btn btn-default" style="position:absolute;" (click)="backToOverview()">< zurück zur Übersicht</span> <span class="btn btn-default" style="position:absolute;" (click)="backToOverview()">< zurück zur Übersicht</span>
<h3 class="text-center" [ngClass]="user.squad?.fraction === 'BLUFOR' ? 'blufor' : 'opfor'"> <h3 class="text-center" [ngClass]="user.squad?.fraction === 'BLUFOR' ? 'blufor' : 'opfor'">

View File

@ -55,7 +55,6 @@ img {
.member-link { .member-link {
cursor: pointer; cursor: pointer;
display: block;
text-decoration: underline; text-decoration: underline;
} }

View File

@ -11,10 +11,13 @@
</div> </div>
<div class="row middle-row"> <div class="row middle-row">
<div class="squad-cell name-cell"> <div class="squad-cell name-cell">
<span class="member-link text-blufor" <span class="text-blufor"
*ngFor="let member of squad.members" style="display: block"
(click)="select(member._id)"> *ngFor="let member of squad.members">
{{member.rank}} {{member.username}} <span class="member-link"
(click)="select(member._id)">
{{member.rank}} {{member.username}}
</span>
</span> </span>
</div> </div>
</div> </div>
@ -37,10 +40,13 @@
</div> </div>
<div class="row middle-row"> <div class="row middle-row">
<div class="squad-cell name-cell"> <div class="squad-cell name-cell">
<span class="member-link text-opfor" <span class="text-opfor"
*ngFor="let member of squad.members" style="display: block"
(click)="select(member._id)"> *ngFor="let member of squad.members">
{{member.rank}} {{member.username}} <span class="member-link"
(click)="select(member._id)">
{{member.rank}} {{member.username}}
</span>
</span> </span>
</div> </div>
</div> </div>

View File

@ -7,7 +7,7 @@ import {Subscription} from "rxjs/Subscription";
@Component({ @Component({
templateUrl: './edit-decoration.component.html', templateUrl: './edit-decoration.component.html',
styleUrls: ['./edit-decoration.component.css', '../../style/entry-form.css'] styleUrls: ['./edit-decoration.component.css', '../../style/entry-form.css', '../../style/overview.css']
}) })
export class EditDecorationComponent { export class EditDecorationComponent {

View File

@ -8,7 +8,7 @@ import {Subscription} from "rxjs/Subscription";
@Component({ @Component({
templateUrl: './edit-rank.component.html', templateUrl: './edit-rank.component.html',
styleUrls: ['./edit-rank.component.css', '../../style/entry-form.css'] styleUrls: ['./edit-rank.component.css', '../../style/entry-form.css', '../../style/overview.css']
}) })
export class EditRankComponent { export class EditRankComponent {

View File

@ -1,3 +1,8 @@
.overview {
width: 100%!important;
margin-left: 25px!important;
}
.decoration-preview { .decoration-preview {
padding: 5px; padding: 5px;
} }
@ -14,30 +19,16 @@
.table-container { .table-container {
margin-top: 40px; margin-top: 40px;
overflow-x: auto; overflow-x: auto;
width: 65%; width: 75%;
} min-width: 800px;
padding: 5px;
/* enable scrolling for long list of awardings */
.overview {
position: fixed;
overflow-y: scroll;
overflow-x: hidden;
width: 100%;
border-left: thin solid lightgrey;
padding: 20px 0 0 50px;
margin-left: 10px;
height: 100vh;
bottom: 10px;
} }
.form-group { .form-group {
width: 25%; width: 25%;
min-width: 300px;
} }
h3 { h3 {
margin: 80px 0 20px -20px; margin: 80px 0 20px -20px;
} }
label {
display: block;
}

View File

@ -17,7 +17,6 @@
</select> </select>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="decoration">Auszeichnung</label> <label for="decoration">Auszeichnung</label>
<select class="form-control" <select class="form-control"
@ -64,8 +63,7 @@
</button> </button>
<span *ngIf="showSuccessLabel" <span *ngIf="showSuccessLabel"
class="label label-success label-small" class="absolute-label label label-success label-small">
style="margin-left: inherit">
Erfolgreich gespeichert Erfolgreich gespeichert
</span> </span>

View File

@ -10,7 +10,7 @@ import {LoginService} from "../../services/login-service/login-service";
@Component({ @Component({
templateUrl: './req-award.component.html', templateUrl: './req-award.component.html',
styleUrls: ['./req-award.component.css'], styleUrls: ['./req-award.component.css', '../../style/overview.css'],
}) })
export class RequestAwardComponent { export class RequestAwardComponent {

View File

@ -1,3 +1,7 @@
.overview {
margin-left: 25px!important;
}
.decoration-preview { .decoration-preview {
padding: 5px; padding: 5px;
} }
@ -15,19 +19,7 @@
margin-top: 40px; margin-top: 40px;
overflow-x: auto; overflow-x: auto;
width: 75%; width: 75%;
} padding: 5px;
/* enable scrolling for long list of awardings */
.overview {
position: fixed;
overflow-y: scroll;
overflow-x: hidden;
width: 100%;
border-left: thin solid lightgrey;
padding: 20px 0 0 50px;
margin-left: 10px;
height: 100vh;
bottom: 10px;
} }
.form-group { .form-group {
@ -37,7 +29,3 @@
h3 { h3 {
margin: 80px 0 20px -20px; margin: 80px 0 20px -20px;
} }
label {
display: block;
}

View File

@ -2,8 +2,7 @@
<h3>Offene Anträge - Auszeichnungen</h3> <h3>Offene Anträge - Auszeichnungen</h3>
<span *ngIf="showSuccessLabel" <span *ngIf="showSuccessLabel"
class="label label-success label-small" class="absolute-label label label-success label-small">
style="margin-left: inherit">
Erfolgreich gespeichert Erfolgreich gespeichert
</span> </span>

View File

@ -6,7 +6,7 @@ import {LoginService} from "../../services/login-service/login-service";
@Component({ @Component({
templateUrl: './confirm-award.component.html', templateUrl: './confirm-award.component.html',
styleUrls: ['./confirm-award.component.css'], styleUrls: ['./confirm-award.component.css', '../../style/overview.css'],
}) })
export class ConfirmAwardComponent { export class ConfirmAwardComponent {

View File

@ -1,3 +1,7 @@
.overview {
margin-left: 25px!important;
}
.decoration-preview { .decoration-preview {
padding: 5px; padding: 5px;
} }
@ -15,19 +19,7 @@
margin-top: 40px; margin-top: 40px;
overflow-x: auto; overflow-x: auto;
width: 65%; width: 65%;
} padding: 5px;
/* enable scrolling for long list of awardings */
.overview {
position: fixed;
overflow-y: scroll;
overflow-x: hidden;
width: 100%;
border-left: thin solid lightgrey;
padding: 20px 0 0 50px;
margin-left: 10px;
height: 100vh;
bottom: 10px;
} }
.form-group { .form-group {
@ -37,7 +29,3 @@
h3 { h3 {
margin: 80px 0 20px -20px; margin: 80px 0 20px -20px;
} }
label {
display: block;
}

View File

@ -2,8 +2,7 @@
<h3>Offene Anträge - Beförderung</h3> <h3>Offene Anträge - Beförderung</h3>
<span *ngIf="showSuccessLabel" <span *ngIf="showSuccessLabel"
class="label label-success label-small" class="absolute-label label label-success label-small">
style="margin-left: inherit">
Erfolgreich gespeichert Erfolgreich gespeichert
</span> </span>

View File

@ -7,7 +7,7 @@ import {LoginService} from "../../services/login-service/login-service";
@Component({ @Component({
templateUrl: './confirm-promotion.component.html', templateUrl: './confirm-promotion.component.html',
styleUrls: ['./confirm-promotion.component.css'], styleUrls: ['./confirm-promotion.component.css', '../../style/overview.css'],
}) })
export class ConfirmPromotionComponent { export class ConfirmPromotionComponent {

View File

@ -1,3 +1,7 @@
.overview {
margin-left: 25px!important;
}
.decoration-preview { .decoration-preview {
padding: 5px; padding: 5px;
} }
@ -15,29 +19,15 @@
margin-top: 40px; margin-top: 40px;
overflow-x: auto; overflow-x: auto;
width: 65%; width: 65%;
} min-width: 800px;
padding: 5px;
/* enable scrolling for long list of awardings */
.overview {
position: fixed;
overflow-y: scroll;
overflow-x: hidden;
width: 100%;
border-left: thin solid lightgrey;
padding: 20px 0 0 50px;
margin-left: 10px;
height: 100vh;
bottom: 10px;
} }
.form-group { .form-group {
width: 25%; width: 25%;
min-width: 300px;
} }
h3 { h3 {
margin: 80px 0 20px -20px; margin: 80px 0 20px -20px;
} }
label {
display: block;
}

View File

@ -58,8 +58,7 @@
</button> </button>
<span *ngIf="showSuccessLabel" <span *ngIf="showSuccessLabel"
class="label label-success label-small" class="absolute-label label label-success label-small">
style="margin-left: inherit">
Erfolgreich gespeichert Erfolgreich gespeichert
</span> </span>

View File

@ -10,7 +10,7 @@ import {LoginService} from "../../services/login-service/login-service";
@Component({ @Component({
templateUrl: './req-promotion.component.html', templateUrl: './req-promotion.component.html',
styleUrls: ['./req-promotion.component.css'], styleUrls: ['./req-promotion.component.css', '../../style/overview.css'],
}) })
export class RequestPromotionComponent { export class RequestPromotionComponent {

View File

@ -8,7 +8,7 @@ import {Subscription} from "rxjs/Subscription";
@Component({ @Component({
templateUrl: './edit-squad.component.html', templateUrl: './edit-squad.component.html',
styleUrls: ['./edit-squad.component.css', '../../style/entry-form.css'] styleUrls: ['./edit-squad.component.css', '../../style/entry-form.css', '../../style/overview.css']
}) })
export class EditSquadComponent { export class EditSquadComponent {

View File

@ -1,13 +1,3 @@
.overview {
position: fixed;
overflow-y: scroll;
overflow-x: hidden;
border-left: thin solid lightgrey;
bottom: 20px;
padding: 70px 1% 0 1%;
height: 100vh;
}
h2 { h2 {
padding: 10px; padding: 10px;
} }

View File

@ -1,4 +1,4 @@
<div class="overview fade-in" xmlns="http://www.w3.org/1999/html"> <div class="overview fade-in" style="padding: 70px 1% 0 1%;" xmlns="http://www.w3.org/1999/html">
<h2 class="pull-left">Spielerstatistik - {{campaignPlayer.name}}</h2> <h2 class="pull-left">Spielerstatistik - {{campaignPlayer.name}}</h2>
<h2 class="pull-right">{{campaignPlayer.campaign.title}} Kampagne</h2> <h2 class="pull-right">{{campaignPlayer.campaign.title}} Kampagne</h2>

View File

@ -9,7 +9,8 @@ import {Location} from '@angular/common';
@Component({ @Component({
selector: 'campaign-player-detail', selector: 'campaign-player-detail',
templateUrl: './campaign-player-detail.component.html', templateUrl: './campaign-player-detail.component.html',
styleUrls: ['./campaign-player-detail.component.css', '../../style/list-entry.css', '../../style/hide-scrollbar.css'] styleUrls: ['./campaign-player-detail.component.css', '../../style/list-entry.css',
'../../style/hide-scrollbar.css', '../../style/overview.css']
}) })
export class CampaignPlayerDetailComponent { export class CampaignPlayerDetailComponent {

View File

@ -1,8 +0,0 @@
.overview {
position: fixed;
width: 25%;
min-width: 300px;
padding-left: 50px;
padding-top: 70px;
margin-left: 10px;
}

View File

@ -8,7 +8,7 @@ import {CampaignService} from "../../services/campaign-service/campaign.service"
@Component({ @Component({
selector: 'campaign-submit', selector: 'campaign-submit',
templateUrl: './campaign-submit.component.html', templateUrl: './campaign-submit.component.html',
styleUrls: ['./campaign-submit.component.css'] styleUrls: ['./campaign-submit.component.css', '../../style/entry-form.css', '../../style/overview.css']
}) })
export class CampaignSubmitComponent { export class CampaignSubmitComponent {

View File

@ -1,15 +1,15 @@
<div class="slide-chart-container" style="height: 150px;"> <div class="slide-chart-container" style="height: 150px;">
<h2 style="margin-bottom: 20px">{{title}}</h2> <h2 style="margin-bottom: 20px">{{title}}</h2>
<div class="btn btn-default" [style.background]="isActiveSlide(0)" <div class="btn btn-default" [style.background]="isActiveSlide(0)"
(click)="goToSlide(0)" *ngIf="id != 'all'">Gesamtpunktzahl (click)="goToSlide(0)" *ngIf="id != 'all'">Gesamtpunktzahl
</div> </div>
<div class="btn btn-default" [style.background]="isActiveSlide(1)" <div class="btn btn-default" [style.background]="isActiveSlide(1)"
(click)="goToSlide(1)">Punkte je Schlacht (click)="goToSlide(1)">Punkte je Schlacht
</div> </div>
<div class="btn btn-default" [style.background]="isActiveSlide(2)" <div class="btn btn-default" [style.background]="isActiveSlide(2)"
(click)="goToSlide(2)">Spielerzahlen (click)="goToSlide(2)">Spielerzahlen
</div> </div>
</div> </div>
<div class="fade-in"> <div class="fade-in">
<div class="slide-chart-container"> <div class="slide-chart-container">
@ -25,7 +25,8 @@
[showYAxisLabel]="showYAxisLabel" [showYAxisLabel]="showYAxisLabel"
[yAxisLabel]="yAxisLabel" [yAxisLabel]="yAxisLabel"
[autoScale]="autoscale" [autoScale]="autoscale"
[timeline]="timeline"> [timeline]="timeline"
[roundDomains]="roundDomains">
</ngx-charts-line-chart> </ngx-charts-line-chart>
</div> </div>
</div> </div>

View File

@ -8,7 +8,7 @@ import {ChartUtils} from "../../utils/chart-utils";
@Component({ @Component({
selector: 'stats-overview', selector: 'stats-overview',
templateUrl: './stats-overview.component.html', templateUrl: './stats-overview.component.html',
styleUrls: ['./stats-overview.component.css', '../../style/list-entry.css'], styleUrls: ['./stats-overview.component.css', '../../style/list-entry.css', '../../style/overview.css'],
inputs: ['campaigns'], inputs: ['campaigns'],
providers: [{provide: CarouselConfig, useValue: {interval: false}}] providers: [{provide: CarouselConfig, useValue: {interval: false}}]
}) })
@ -38,7 +38,6 @@ export class StatisticOverviewComponent {
autoscale = true; autoscale = true;
timeline = false; timeline = false;
constructor(private route: ActivatedRoute, constructor(private route: ActivatedRoute,
private campaignService: CampaignService) { private campaignService: CampaignService) {
} }
@ -63,14 +62,20 @@ export class StatisticOverviewComponent {
let itemsProcessed = 0; let itemsProcessed = 0;
campaigns = campaigns.filter(campaign => this.id === 'all' || campaign._id === this.id); campaigns = campaigns.filter(campaign => this.id === 'all' || campaign._id === this.id);
campaigns.forEach(campaign => { campaigns.forEach(campaign => {
if (this.id === 'all') {
this.title = "Gesamtübersicht";
} else {
this.title = campaign.title;
}
wars = wars.concat(campaign.wars); wars = wars.concat(campaign.wars);
itemsProcessed++; itemsProcessed++;
if (itemsProcessed === campaigns.length) { if (itemsProcessed === campaigns.length) {
if (this.id === 'all') {
this.title = "Gesamtübersicht";
wars.sort((a, b) => {
// sort by dates, because older campaign can contain newer war
if (a['date'] > (b['date'])) return -1;
if (a['date'] < (b['date'])) return 1;
return 0;
})
} else {
this.title = campaign.title;
}
this.initChart(wars); this.initChart(wars);
} }
}) })

View File

@ -1,8 +0,0 @@
.overview {
position: fixed;
width: 25%;
min-width: 300px;
padding-left: 50px;
padding-top: 70px;
margin-left: 10px;
}

View File

@ -9,7 +9,8 @@ import {CampaignService} from "../../services/campaign-service/campaign.service"
@Component({ @Component({
selector: 'war-submit', selector: 'war-submit',
templateUrl: './war-submit.component.html', templateUrl: './war-submit.component.html',
styleUrls: ['./war-submit.component.css', '../../style/load-indicator.css'] styleUrls: ['./war-submit.component.css', '../../style/load-indicator.css',
'../../style/entry-form.css', '../../style/overview.css']
}) })
export class WarSubmitComponent { export class WarSubmitComponent {

View File

@ -1,3 +1,10 @@
.overview {
overflow: hidden!important;
padding-top: 80px!important;
width: 20%;
min-width: 280px;
}
h3 { h3 {
margin-left: -20px; margin-left: -20px;
} }
@ -10,17 +17,6 @@ label {
border-color: red; border-color: red;
} }
.overview {
position: fixed;
width: 25%;
min-width: 500px;
border-left: thin solid lightgrey;
padding-left: 50px;
padding-top: 20px;
margin-left: 10px;
height: 100vh;
}
.preview-image { .preview-image {
margin: 10px; margin: 10px;
} }

View File

@ -1,9 +1,7 @@
.load-indicator { .load-indicator {
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 48.5%;
transform: translate(-50%, -50%);
width: 50%;
z-index: 1; z-index: 1;
} }

View File

@ -0,0 +1,17 @@
.overview {
position: fixed;
overflow-y: scroll;
overflow-x: hidden;
border-left: thin solid lightgrey;
padding: 20px 0 0 50px;
height: 100vh;
bottom: 10px;
}
.absolute-label {
display: block;
position: absolute;
font-size: 12px;
padding: 5px;
margin-left: 25%;
}

View File

@ -18,19 +18,6 @@
width: 50%; width: 50%;
} }
/* enable scrolling for long list of awardings */
.overview {
position: fixed;
overflow-y: scroll;
overflow-x: hidden;
width: 100%;
border-left: thin solid lightgrey;
padding: 20px 0 0 50px;
margin-left: 10px;
height: 100vh;
bottom: 10px;
}
.form-group { .form-group {
width: 25%; width: 25%;
} }

View File

@ -8,7 +8,7 @@ import {DecorationService} from "../../services/decoration-service/decoration.se
@Component({ @Component({
templateUrl: './award-user.component.html', templateUrl: './award-user.component.html',
styleUrls: ['./award-user.component.css'], styleUrls: ['./award-user.component.css', '../../style/overview.css', '../../style/hide-scrollbar.css'],
}) })
export class AwardUserComponent { export class AwardUserComponent {

View File

@ -10,7 +10,7 @@ import {NgForm} from "@angular/forms";
@Component({ @Component({
templateUrl: './edit-user.component.html', templateUrl: './edit-user.component.html',
styleUrls: ['./edit-user.component.css', '../../style/entry-form.css'], styleUrls: ['./edit-user.component.css', '../../style/entry-form.css', '../../style/overview.css'],
}) })
export class EditUserComponent { export class EditUserComponent {