Listing Css Link colore

Fix Text Area  Peace Holder
Default Value Requierd
Finalize Button On Dmp Fix
Fix Nav Button Colors
This commit is contained in:
Diamantis Tziotzios 2019-02-08 11:04:12 +02:00
parent 0039da7c3c
commit 5fa776bb39
15 changed files with 75 additions and 32 deletions

View File

@ -29,7 +29,7 @@ public class TextAreaData extends FieldData<TextAreaData> {
@Override
public TextAreaData fromXml(Element item) {
item.setAttribute("label", this.getLabel());
this.setLabel(item.getAttribute("label"));
return this;
}
}

View File

@ -1,4 +1,4 @@
<div *ngFor="let item of items | limitTo:urlLimit">
<a (click)="navigate(item.url)">{{item.label}}</a>
<a class="url-listing-item" (click)="navigate(item.url)">{{item.label}}</a>
</div>
<a *ngIf="this.items.length > this.urlLimit" (click)="navigate(items[0].all)">{{'URL-LISTING-COMPONENT.SHOW-MORE'|translate}}</a>
<a class="url-listing-item" *ngIf="this.items.length > this.urlLimit" (click)="navigate(items[0].all)">{{'URL-LISTING-COMPONENT.SHOW-MORE'|translate}}</a>

View File

@ -0,0 +1,8 @@
.url-listing-item:hover {
color: #0056b3 !important;
text-decoration: underline !important;
}
.url-listing-item {
color: #007bff !important;
}

View File

@ -4,7 +4,8 @@ import { UrlListingItem } from "./url-listing-item";
@Component({
selector: 'app-url-listing',
templateUrl: './url-listing.component.html'
templateUrl: './url-listing.component.html',
styleUrls: ['./url-listing.component.scss']
})
export class UrlListingComponent {

View File

@ -24,7 +24,7 @@ export class PageEditorModel extends BaseFormModel {
buildForm(): FormGroup {
const formGroup = this.formBuilder.group({
title: [this.title, [Validators.required]],
id: [this.id, [Validators.required,Validators.pattern('^[^<_>]+$')]],
id: [this.id, [Validators.required]],
ordinal: [this.ordinal]
});
return formGroup;

View File

@ -26,15 +26,17 @@
<!-- Default Value -->
<app-component-profile-editor-default-value-component *ngIf="form.get('viewStyle').get('renderStyle').value" class="col"
[viewStyle]="form.get('viewStyle').get('renderStyle').value" [form]="this.form.get('defaultValue').get('value')"
[formArrayOptions]="this.form.get('data')?.get('options')" [comboBoxType]="this.form.get('data')?.get('type')?.value"
placeHolder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.DEFAULT-VALUE' | translate}}" required="false"></app-component-profile-editor-default-value-component>
[formArrayOptions]="form.get('data')?.get('options')" [comboBoxType]="this.form.get('data')?.get('type')?.value"
placeHolder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.DEFAULT-VALUE' | translate}}" [required]="defaulValueRequired(form.get('viewStyle').get('renderStyle').value)"></app-component-profile-editor-default-value-component>
<mat-form-field class="col">
<mat-form-field class="col" *ngIf="!(defaulValueRequired(form.get('viewStyle').get('renderStyle').value))">
<mat-select placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.VALIDATION' | translate}}" [formControl]="this.form.get('validations')"
multiple>
<mat-option [value]="validationTypeEnum.Required">{{enumUtils.toDatasetProfileFieldValidationTypeString(validationTypeEnum.Required)}}</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="row" [ngSwitch]="form.get('viewStyle').get('renderStyle').value">
<app-dataset-profile-editor-combo-box-field-component *ngSwitchCase="viewStyleEnum.ComboBox" class="col-12" [form]="form"></app-dataset-profile-editor-combo-box-field-component>

View File

@ -28,6 +28,7 @@ export class DatasetProfileEditorFieldComponent extends BaseComponent implements
viewStyleEnum = DatasetProfileFieldViewStyle;
isFieldMultiplicityEnabled = false;
constructor(
public enumUtils: EnumUtils
) { super(); }
@ -70,6 +71,23 @@ export class DatasetProfileEditorFieldComponent extends BaseComponent implements
});
}
defaulValueRequired(viewStile: DatasetProfileFieldViewStyle): boolean {
switch (viewStile) {
case DatasetProfileFieldViewStyle.CheckBox:
return true;
case DatasetProfileFieldViewStyle.RadioBox:
case DatasetProfileFieldViewStyle.TextArea:
case DatasetProfileFieldViewStyle.FreeText:
case DatasetProfileFieldViewStyle.ComboBox:
case DatasetProfileFieldViewStyle.BooleanDecision:
return false;
default:
return false;
}
}
onIsFieldMultiplicityEnabledChange(isFieldMultiplicityEnabled: boolean) {
if (!isFieldMultiplicityEnabled) {
(<FormControl>this.form.get('multiplicity').get('min')).setValue(0);

View File

@ -4,8 +4,8 @@
<mat-form-field class="col">
<input matInput type="text" placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.PAGES.PAGE-INPUT-TITLE' | translate}}"
[formControl]="pageControl.get('title')" required>
<mat-error *ngIf="pageControl.get('title').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field>
<mat-error *ngIf="pageControl.get('title').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
<button mat-icon-button type="button" class="col-auto" (click)="removePage(i)">
<mat-icon>delete</mat-icon>
</button>

View File

@ -16,6 +16,8 @@ import { DmpListingComponent } from './listing/dmp-listing.component';
import { DmpWizardComponent } from './wizard/dmp-wizard.component';
import { DmpWizardEditorComponent } from './wizard/editor/dmp-wizard-editor.component';
import { DmpWizardDatasetListingComponent } from './wizard/listing/dmp-wizard-dataset-listing.component';
import { UserDialogComponent } from '../misc/navigation/user-dialog/user-dialog.component';
import { DmpFinalizeDialogComponent } from './editor/dmp-finalize-dialog/dmp-finalize-dialog.component';
@NgModule({
imports: [
@ -42,12 +44,14 @@ import { DmpWizardDatasetListingComponent } from './wizard/listing/dmp-wizard-da
// DynamicFieldsProjectComponent,
// DynamicFieldProjectComponent,
// DMPFinaliseDialogComponent
DmpFinalizeDialogComponent
],
entryComponents: [
DmpInvitationDialogComponent,
AddResearcherComponent,
AvailableProfilesComponent,
// DMPFinaliseDialogComponent
DmpFinalizeDialogComponent
]
})
export class DmpModule { }

View File

@ -3,7 +3,7 @@
</div>
<div mat-dialog-content *ngIf="datasetsFinalized && datasetsDraft">
<div *ngIf="datasetsFinalized.length > 0">
{{'DMP-FINALISE-DIALOG.ALREADY-FINALISED-DATASETS' | translate}}
<h4>{{'DMP-FINALISE-DIALOG.ALREADY-FINALISED-DATASETS' | translate}}</h4>
<mat-list>
<mat-list-item *ngFor="let dataset of datasetsFinalized; let len = length">
<div>{{ dataset.label }}</div>
@ -11,11 +11,11 @@
</mat-list>
</div>
<div *ngIf="datasetsDraft.length > 0">
{{'DMP-FINALISE-DIALOG.FINALISE-TITLE' | translate}}
<h4>{{'DMP-FINALISE-DIALOG.FINALISE-TITLE' | translate}}</h4>
<mat-selection-list #datasetsDraftSelectionList [formControl]="this.formGroup.get('datasets')">
<mat-list-option *ngFor="let dataset of datasetsDraft; let len = length" [value]='dataset'>
{{ dataset.label }}
</mat-list-option>
<mat-list-option class="styleBorder" *ngFor="let dataset of datasetsDraft; let len = length" [value]='dataset'>
{{ dataset.label }}
</mat-list-option>
</mat-selection-list>
</div>
<mat-error *ngIf="formGroup.get('datasets').errors?.minLengthArray">{{'DMP-FINALISE-DIALOG.VALIDATION.AT-LEAST-ONE-DATASET-FINALISED'
@ -23,9 +23,9 @@
</div>
<div mat-dialog-actions>
<div class="full-width">
<button mat-raised-button type="submit">
<button mat-raised-button color="primary" type="submit">
{{'DMP-FINALISE-DIALOG.SUBMIT' | translate}}
</button>
</div>
</div>
</form>
</form>

View File

@ -0,0 +1,5 @@
.styleBorder {
border: 1px solid lightgray;
border-radius: 0.5em;
margin-bottom: 0.5em;
}

View File

@ -6,6 +6,7 @@ import { ExploreDatasetListingComponent } from './explore-dataset-listing.compon
import { ExploreDatasetRoutingModule } from './explore-dataset.routing';
import { ExploreDatasetFilterItemComponent } from './filters/explore-dataset-filter-item/explore-dataset-filter-item.component';
import { ExploreDatasetFiltersComponent } from './filters/explore-dataset-filters.component';
import { UserDialogComponent } from '../misc/navigation/user-dialog/user-dialog.component';
@NgModule({
imports: [

View File

@ -7,7 +7,7 @@
<h5 *ngIf="this.form.get('extendedDescription').value && !isChild" class="col-12"><i>{{this.form.get('extendedDescription').value}}</i></h5>
<mat-form-field *ngSwitchCase="datasetProfileFieldViewStyleEnum.FreeText" class="col-12">
<input matInput formControlName="value" placeholder="{{form.get('data').value.label}}" [required]="form.get('validationRequired').value">
<input matInput [formControl]="form.get('value')" placeholder="{{form.get('data').value.label}}" [required]="form.get('validationRequired').value">
<mat-error *ngIf="form.get('value')['errors'] && form.get('value')['errors']['required']">{{'GENERAL.VALIDATION.REQUIRED'
| translate}}</mat-error>
</mat-form-field>
@ -15,7 +15,7 @@
<div *ngSwitchCase="datasetProfileFieldViewStyleEnum.ComboBox" class="col-12">
<div class="row">
<mat-form-field class="col-md-12" *ngIf="form.get('data').value.type === datasetProfileComboBoxTypeEnum.Autocomplete">
<app-single-auto-complete placeholder="{{ form.get('data').value.label | translate }}" [formControl]="form.get('value')"
<app-single-auto-complete placeholder="{{ form.get('data').value.label | translate }}" [formControl]="form.get('value')"
[configuration]="singleAutoCompleteConfiguration" [required]="form.get('validationRequired').value">
</app-single-auto-complete>
<mat-error *ngIf="form.get('value').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
@ -35,8 +35,8 @@
</div>
<mat-form-field *ngSwitchCase="datasetProfileFieldViewStyleEnum.TextArea" class="col-12">
<textarea matInput formControlName="value" matTextareaAutosize matAutosizeMinRows="2" matAutosizeMaxRows="10"
[required]="form.get('validationRequired').value"></textarea>
<textarea matInput [formControl]="form.get('value')" matTextareaAutosize matAutosizeMinRows="2" matAutosizeMaxRows="10"
[required]="form.get('validationRequired').value" placeholder="{{ form.get('data').value.label | translate }}"></textarea>
<button mat-icon-button *ngIf="!form.get('value').disabled && form.get('value').value" matSuffix aria-label="Clear"
(click)="this.form.patchValue({'value': ''})">
<mat-icon>close</mat-icon>
@ -50,6 +50,7 @@
<mat-radio-button class="radio-button-item" name="{{form.get('id').value}}" value="true">Yes</mat-radio-button>
<!-- <br> -->
<mat-radio-button class="radio-button-item" name="{{form.get('id').value}}" value="false">No</mat-radio-button>
<mat-error *ngIf="form.get('value').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-radio-group>
</div>
@ -57,6 +58,7 @@
<mat-radio-group [formControl]="form.get('value')" [required]="form.get('validationRequired').value">
<mat-radio-button *ngFor="let option of form.get('data').value.options let index = index" class="radio-button-item"
[value]="option.value">{{option.label}}</mat-radio-button>
<mat-error *ngIf="form.get('value').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-radio-group>
</div>
</div>

View File

@ -3,27 +3,29 @@
<img [src]="'/assets/images/OpenDMP.png'" alt="openDMP" style="height: 2.5em;">
</a>
<div class="col-auto">
<a mat-button class="buttonNav navbar-button" routerLink="/explore" >{{'NAV-BAR.PUBLIC-DATASETS' | translate}}</a>
<a mat-button class="buttonNav navbar-button" routerLink="/explore">{{'NAV-BAR.PUBLIC-DATASETS' | translate}}</a>
</div>
<div *ngIf="isAuthenticated()" class="col-auto">
<a mat-button class="buttonNav navbar-button" routerLink="/projects">{{this.languageResolver.getBy('navbar') | translate}}</a>
<a mat-button class="buttonNav navbar-button" routerLink="/projects">{{this.languageResolver.getBy('navbar') |
translate}}</a>
<a mat-button class="buttonNav navbar-button" routerLink="/plans">{{'NAV-BAR.DMPS' | translate}}</a>
<a mat-button class="buttonNav navbar-button" routerLink="/datasets">{{'NAV-BAR.DATASETS' | translate}}</a>
<a *ngIf="isAdmin()" mat-button class="buttonNav navbar-button" routerLink="/users">{{'NAV-BAR.USERS' | translate}}</a>
<a *ngIf="isAdmin()" mat-button class="buttonNav navbar-button" routerLink="/dmp-profiles">{{'NAV-BAR.DMP-PROFILES' | translate}}</a>
<a *ngIf="isAdmin()" mat-button class="buttonNav navbar-button" routerLink="/dataset-profiles">{{'NAV-BAR.DATASETS-ADMIN' | translate}}</a>
<a *ngIf="isAdmin()" mat-button class="buttonNav navbar-button" routerLink="/dmp-profiles">{{'NAV-BAR.DMP-PROFILES' |
translate}}</a>
<a *ngIf="isAdmin()" mat-button class="buttonNav navbar-button" routerLink="/dataset-profiles">{{'NAV-BAR.DATASETS-ADMIN'
| translate}}</a>
</div>
<!--<button mat-button class="navbar-button" routerLink="/about">{{'NAV-BAR.ABOUT' | translate}}</button>-->
<div class="col"></div>
<div *ngIf="search && this.isAuthenticated()" class="col-auto">
<mat-form-field floatLabel="never">
<input type="text" placeholder="{{'DASHBOARD.SEARCH' | translate}}" matInput [formControl]="searchControl" [matAutocomplete]="auto">
<input type="text" placeholder="{{'DASHBOARD.SEARCH' | translate}}" matInput [formControl]="searchControl"
[matAutocomplete]="auto">
<mat-autocomplete autoActiveFirstOption #auto="matAutocomplete" (optionSelected)="onOptionSelected($event)">
<mat-option *ngFor="let option of filteredOptions | async" [value]="option" class="transformation-value-mat-option">
<span>{{option.label}}</span>
<br>
<small>{{transformType(option.type)}}</small>
<small>{{transformType(option.type)}} : {{option.label}}</small>
</mat-option>
</mat-autocomplete>
</mat-form-field>
@ -47,9 +49,9 @@
<button mat-button [routerLink]=" ['/login'] ">
<span class="login-label">Log in</span>
</button>
</ng-template>
</mat-toolbar>
<div *ngIf="progressIndication" class="progress-bar">
<mat-progress-bar color="accent" mode="indeterminate"></mat-progress-bar>
</div>
</div>

View File

@ -18,8 +18,8 @@
"SUCCESSFUL-LOGOUT": "Successful Logout",
"UNSUCCESSFUL-LOGOUT": "Unsuccessful Logout",
"UNSUCCESSFUL-LOGIN": "Unsuccessful Login",
"SUCCESSFUL-DATASET-PROFILE-DELETE":"Successful Delete this Profile",
"UNSUCCESSFUL-DATASET-PROFILE-DELETE":"Unsuccessful This Profile can not Delete"
"SUCCESSFUL-DATASET-PROFILE-DELETE":"Successful Delete",
"UNSUCCESSFUL-DATASET-PROFILE-DELETE":"This profile can not deleted, because Datasets are associated with it"
},
"ERRORS": {
"HTTP-REQUEST-ERROR": "An Unexpected Error Has Occured"