cosmetic tuning

merge-requests/1/head
Florian Hartwich 2017-04-07 02:55:42 +02:00
parent 7ed157625b
commit 27d92ed2dd
56 changed files with 511 additions and 439 deletions

View File

@ -17,14 +17,14 @@
},
"private": true,
"dependencies": {
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/router": "^4.0.0",
"@angular/common": "4.0.0",
"@angular/compiler": "4.0.0",
"@angular/core": "4.0.0",
"@angular/forms": "4.0.0",
"@angular/http": "4.0.0",
"@angular/platform-browser": "4.0.0",
"@angular/platform-browser-dynamic": "4.0.0",
"@angular/router": "4.0.0",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"jquery": "^3.1.0",
@ -38,7 +38,7 @@
},
"devDependencies": {
"@angular/cli": "1.0.0",
"@angular/compiler-cli": "^4.0.0",
"@angular/compiler-cli": "4.0.0",
"@types/jasmine": "2.5.38",
"@types/node": "~6.0.60",
"@types/socket.io-client": "^1.4.26",

View File

@ -8,6 +8,7 @@ import {Component} from '@angular/core';
})
export class AboutComponent {
constructor() {}
constructor() {
}
}

View File

@ -13,11 +13,11 @@ li {
padding-right: 15px;
}
.right {
float: right;
width: 300px;
}
.left {
float: left;
width: calc(100% - 300px);

View File

@ -50,7 +50,8 @@
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
aria-expanded="false">
Schnellzugriff
<span class="caret"></span>
</a>

View File

@ -11,6 +11,7 @@ import {Title} from '@angular/platform-browser';
export class DashboardComponent {
title: string;
constructor(r: ActivatedRoute, private router: Router, private titleService: Title) {
}
@ -22,6 +23,7 @@ export class DashboardComponent {
this.titleService.setTitle(this.title);
}
}
ngOnDestroy() {
this.titleService.setTitle(this.originalTitle);
}

View File

@ -1,19 +1,18 @@
.form-signin
{
.form-signin {
max-width: 330px;
padding: 15px;
margin: 0 auto;
}
.form-signin .form-signin-heading, .form-signin .checkbox
{
.form-signin .form-signin-heading, .form-signin .checkbox {
margin-bottom: 10px;
}
.form-signin .checkbox
{
.form-signin .checkbox {
font-weight: normal;
}
.form-signin .form-control
{
.form-signin .form-control {
position: relative;
font-size: 16px;
height: auto;
@ -22,24 +21,24 @@
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.form-signin .form-control:focus
{
.form-signin .form-control:focus {
z-index: 2;
}
.form-signin input[type="text"]
{
.form-signin input[type="text"] {
margin-bottom: -1px;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.form-signin input[type="password"]
{
.form-signin input[type="password"] {
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.account-wall
{
.account-wall {
margin-top: 20px;
padding: 40px 0px 20px 0px;
background-color: #f7f7f7;
@ -47,15 +46,15 @@
-webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
}
.login-title
{
.login-title {
color: #555;
font-size: 18px;
font-weight: 400;
display: block;
}
.profile-img
{
.profile-img {
width: 96px;
height: 96px;
margin: 0 auto 10px;
@ -64,12 +63,12 @@
-webkit-border-radius: 50%;
border-radius: 50%;
}
.need-help
{
.need-help {
margin-top: 10px;
}
.new-account
{
.new-account {
display: block;
margin-top: 10px;
}

View File

@ -1,8 +1,10 @@
import {Injectable} from '@angular/core';
import {CanActivate,
import {
CanActivate,
Router,
ActivatedRouteSnapshot,
RouterStateSnapshot } from '@angular/router';
RouterStateSnapshot
} from '@angular/router';
import {Observable} from 'rxjs/Observable';
import {LoginService} from "../services/login-service/login-service";

View File

@ -1,9 +1,11 @@
export class MockSocket {
emit(action, data) {
}
addEventListener(l) {
}
removeEventListener(l) {
}

View File

@ -4,11 +4,14 @@ import {ModelDrivenFormComponent} from './model-driven-form.component';
import {UserService} from '../services/user-service/user.service';
import {TaskServiceModelForm} from "../services/task-service/task-model-form.service";
import {ShowErrorComponentModelDriven} from "../show-error/show-error-model-driven.component";
import {generateRandomString} from "../../test/test.helper";
import {generateRandomString} from "../test/test.helper";
describe('Model Driven Form', () => {
// ModelDrivenFormComponent Fixture
let fixture;
// main FormGroup
let form;
beforeEach(() => {
@ -33,13 +36,17 @@ describe('Model Driven Form', () => {
const tagControlGroup: FormGroup = fixture.componentInstance.createTagControl()
const tagLabel = tagControlGroup.get('label');
expectErrorOnInput(tagLabel, '');
expectErrorOnInput(tagLabel, 'xyz');
expectErrorOnInput(tagLabel, 'xy', {requiredLength: 3, actualLength: 2}, 'minlength');
});
it('should show error in description gt 2000 signs', () => {
const descriptionControl = form.get('description');
expectErrorOnInput(descriptionControl, generateRandomString(2000));
expectErrorOnInput(descriptionControl, generateRandomString(2001), {requiredLength: 2000, actualLength: 2001}, 'maxlength');
expectErrorOnInput(descriptionControl, generateRandomString(2001), {
requiredLength: 2000,
actualLength: 2001
}, 'maxlength');
});
it('should show error on email not matching email-pattern', () => {
@ -52,6 +59,8 @@ describe('Model Driven Form', () => {
expectErrorOnInput(assigneeEMail, 'test@web.de');
});
// helper method
// check for error object according to given input value
function expectErrorOnInput(formControl, inputString, expectedErrorObject?, expectedErrorAttribute?) {
formControl.setValue(inputString);
if (expectedErrorObject && expectedErrorAttribute) {
@ -63,5 +72,4 @@ describe('Model Driven Form', () => {
}
}
});

View File

@ -7,7 +7,8 @@ import { Component, OnInit } from '@angular/core';
})
export class NotFoundComponent implements OnInit {
constructor() {}
constructor() {
}
ngOnInit() {
}

View File

@ -39,7 +39,8 @@ export class TaskService {
.map(res => res.json())
.do((tasks) => {
this.taskStore.dispatch({type: LOAD, data: tasks});
}).subscribe(_ => {});
}).subscribe(_ => {
});
return this.tasks$;
}
@ -67,6 +68,7 @@ export class TaskService {
this.socket.emit('broadcast_task', action);
});
}
deleteTask(task: Task) {
return this.http.delete(BASE_URL + task.id)
.do(response => {

View File

@ -1,4 +1,3 @@
import {Observable} from 'rxjs/Observable';
export class UserService {
checkUserExists(name: string): Observable<boolean> {

View File

@ -27,6 +27,7 @@ export class SettingsComponent {
this.titleService.setTitle(title);
}
}
ngOnDestroy() {
this.titleService.setTitle(this.originalTitle);
}

View File

@ -8,7 +8,8 @@ import {NgForm, FormGroup, FormGroupDirective} from '@angular/forms';
<div *ngFor="let errorMessage of errorMessages">
{{errorMessage}}
</div>
</div>` })
</div>`
})
export class ShowErrorComponentModelDriven {
@Input('path') path;

View File

@ -8,7 +8,8 @@ import {NgForm, FormGroup} from '@angular/forms';
<div *ngFor="let errorMessage of errorMessages">
{{errorMessage}}
</div>
</div>` })
</div>`
})
export class ShowErrorComponent {
@Input('path') controlPath;

View File

@ -17,12 +17,19 @@ export var EditTaskComponent = (function () {
this.task = createInitialTask();
this.saved = false;
}
EditTaskComponent.prototype.ngOnInit = function () {
var _this = this;
this.subscription = this.route.params
.map(function (params) { return params['id']; })
.filter(function (id) { return id != undefined; })
.flatMap(function (id) { return _this.taskService.getTask(id); })
.map(function (params) {
return params['id'];
})
.filter(function (id) {
return id != undefined;
})
.flatMap(function (id) {
return _this.taskService.getTask(id);
})
.subscribe(function (task) {
_this.task = task;
});
@ -59,10 +66,12 @@ export var EditTaskComponent = (function () {
return window.confirm("Ihr Formular besitzt ungespeicherte \u00C4nderungen, m\u00F6chten Sie die Seite wirklich verlassen?");
};
EditTaskComponent.decorators = [
{ type: Component, args: [{
{
type: Component, args: [{
templateUrl: './edit-task.component.html',
styleUrls: ['./edit-task.component.css']
},] },
},]
},
];
/** @nocollapse */
EditTaskComponent.ctorParameters = [

View File

@ -1 +1,10 @@
{"version":3,"file":"edit-task.component.js","sourceRoot":"","sources":["edit-task.component.ts"],"names":[],"mappings":"OAAO,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,eAAe;OAC3C,EAAC,KAAK,EAAC,MAAM,2BAA2B;OACxC,EACL,MAAM,EACN,cA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View File

@ -26,8 +26,7 @@ export class EditTaskComponent {
subscription: Subscription;
constructor(
private route: ActivatedRoute,
constructor(private route: ActivatedRoute,
private taskService: TaskService,
private router: Router,
private titleService: Title,

View File

@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
export var EditTaskGuard = (function () {
function EditTaskGuard() {
}
EditTaskGuard.prototype.canDeactivate = function (component, route, router) {
return component.canDeactivate();
};

View File

@ -1 +1,10 @@
{"version":3,"file":"edit-task.guard.js","sourceRoot":"","sources":["edit-task.guard.ts"],"names":[],"mappings":"OAAO,EAAE,UAAU,EAAE,MAAS,eAAe;AAM7C;IAAA;IAcA,CAAC;IAZC,qCAAa,GAAb,UAAc,SAA4B,EAC5B,KAA6B,EAC7B,MAA2B;QAEvC,MAAM,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;IACnC,CAAC;IACI,wBAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,UAAU,EAAE;KACnB,CAAC;IACF,kBAAkB;IACX,4BAAc,GAA6D,EACjF,CAAC;IACF,oBAAC;AAAD,CAAC,AAdD,IAcC"}
{
"version": 3,
"file": "edit-task.guard.js",
"sourceRoot": "",
"sources": [
"edit-task.guard.ts"
],
"names": [],
"mappings": "OAAO,EAAE,UAAU,EAAE,MAAS,eAAe;AAM7C;IAAA;IAcA,CAAC;IAZC,qCAAa,GAAb,UAAc,SAA4B,EAC5B,KAA6B,EAC7B,MAA2B;QAEvC,MAAM,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;IACnC,CAAC;IACI,wBAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,UAAU,EAAE;KACnB,CAAC;IACF,kBAAkB;IACX,4BAAc,GAA6D,EACjF,CAAC;IACF,oBAAC;AAAD,CAAC,AAdD,IAcC"
}

View File

@ -8,8 +8,7 @@ export class EditTaskGuard implements CanDeactivate<EditTaskComponent>{
canDeactivate(component: EditTaskComponent,
route: ActivatedRouteSnapshot,
router: RouterStateSnapshot)
: Observable<boolean> | boolean {
router: RouterStateSnapshot): Observable<boolean> | boolean {
return component.canDeactivate();
}
}

View File

@ -14,10 +14,12 @@ div.task-list-entry, a.task-list-entry {
span {
cursor: pointer;
}
a {
font-size: x-large;
font-weight: 700;
}
small {
color: grey;
}
@ -32,9 +34,32 @@ small {
background-color: aliceblue;
}
@-webkit-keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@-moz-keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@-webkit-keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@-moz-keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.fade-in {
opacity: 0; /* make things invisible upon start */

View File

@ -23,6 +23,7 @@ export class TaskItemComponent {
constructor(private router: Router) {
}
select() {
this.taskSelected.emit(this.task.id)
}

View File

@ -24,7 +24,8 @@
</div>
<div class="col-xs-12">
<h4>Status</h4>
<select class="form-control" name="state" [ngModel]="task.state" (ngModelChange)="task.state = $event; saveTask()" >
<select class="form-control" name="state" [ngModel]="task.state"
(ngModelChange)="task.state = $event; saveTask()">
<optgroup *ngFor="let group of model.stateGroups" [label]="group.label">
<option *ngFor="let state of group.states" [value]="state">
{{model.stateTexts[state]}}

View File

@ -1,5 +1,4 @@
// method to create random string of given length, from:
// return random string of given length, from:
// http://stackoverflow.com/questions/16106701/how-to-generate-a-random-string-of-letters-and-numbers-in-javascript
export function generateRandomString(len) {
var text = "";