Commit 39d07a2c authored by Baptiste Toulemonde's avatar Baptiste Toulemonde
Browse files

fix issur #32

parent 8ffbfada
......@@ -3,16 +3,21 @@
}
.pastis-button {
border: var(--buttons-border);
background-color: var(--vitamui-primary-600);
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
transition-property: all;
transition-duration: .5s;
border-radius: 10% ;
font-family: Mulish;
color: white;
padding: 10px;
background-color: transparent;
border-width: 0px;
color: var(--vitamui-primary-600);
}
.pastis-button-valid {
background-color: transparent;
border-width: 0px;
color: green;
}
.pastis-button-cancel {
background-color: transparent;
border-width: 0px;
color: red;
}
.pastis-input-edit {
......
......@@ -4,11 +4,13 @@
<input (click)="$event.stopPropagation()" class="pastis-input-edit" [(ngModel)]="editText" type="text" />
</span>
<span class="ml-1">
<button class="pastis-button" (click)="$event.stopPropagation()" *ngIf="!editmode" (click)="edit()">edit</button>
<button class="pastis-button" (click)="$event.stopPropagation()" *ngIf="editmode" (click)="save()">save</button>
<button class="pastis-button" (click)="$event.stopPropagation()" *ngIf="!editmode" (click)="edit()"><i class="material-icons edit-icon">edit</i></button>
<button (click)="$event.stopPropagation()" *ngIf="editmode" class="pastis-button-valid" (click)="save()" ><i class="material-icons">check</i></button>
</span>
<span class="ml-1">
<button class="pastis-button" (click)="$event.stopPropagation()" *ngIf="editmode" (click)="cancel()">cancel</button>
<button class="pastis-button-cancel" (click)="$event.stopPropagation()" *ngIf="editmode" (click)="cancel()"><i class="material-icons">clear</i></button>
</span>
......
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ModifyTextButtonComponent } from './modify-text-button.component';
describe('ModifyTextButtonComponent', () => {
let component: ModifyTextButtonComponent;
let fixture: ComponentFixture<ModifyTextButtonComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ ModifyTextButtonComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(ModifyTextButtonComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
......@@ -42,15 +42,16 @@ import { FormsModule } from '@angular/forms';
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
import { MatTooltipModule } from '@angular/material/tooltip';
import { TranslateModule } from '@ngx-translate/core';
import { VitamUICommonModule } from 'ui-frontend-common';
import { PastisMaterialModule} from '../material.module';
import { CenterMatmenuDirective } from '../profile/edit-profile/file-tree-metadata/center-matmenu.directive';
import { ModifyTextButtonComponent } from './modify-text-button/modify-text-button.component';
import { PastisBreadcrumbComponent } from './pastis-breadcrumb-components/pastis-breadcrumb/pastis-breadcrumb.component';
import { PastisTitleBreadcrumbComponent } from './pastis-breadcrumb-components/pastis-title-breadcrumb/pastis-title-breadcrumb.component';
import { PastisDialogConfirmComponent } from './pastis-dialog/pastis-dialog-confirm/pastis-dialog-confirm.component';
import { PastisGenericPopupComponent } from './pastis-generic-popup/pastis-generic-popup.component';
import { PastisPopupMetadataLanguageComponent } from './pastis-popup-metadata-language/pastis-popup-metadata-language.component';
import { PastisPopupOptionComponent } from './pastis-popup-option/pastis-popup-option.component';
import { ModifyTextButtonComponent } from './modify-text-button/modify-text-button.component';
import { PastisUnderConstructionComponent } from './pastis-under-construction/pastis-under-construction.component';
@NgModule({
......@@ -71,7 +72,8 @@ import { PastisUnderConstructionComponent } from './pastis-under-construction/pa
PastisMaterialModule,
MatSlideToggleModule,
PortalModule,
TranslateModule
TranslateModule,
VitamUICommonModule
],
entryComponents: [PastisDialogConfirmComponent, PastisUnderConstructionComponent],
exports: [
......
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
import {Component, EventEmitter, OnInit, Output} from '@angular/core';
@Component({
selector: 'allow-additional-properties',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment