drag n drop documents
parent
1344166fa4
commit
bb0f3a09c8
|
|
@ -31,7 +31,7 @@ export class AuthFormPasswordForgetComponent implements OnInit {
|
|||
return this.f?.email?.value;
|
||||
}
|
||||
|
||||
onSubmit() {console.log(111)
|
||||
onSubmit() {
|
||||
if (this.form.invalid) return;
|
||||
this.loading = true;
|
||||
this.authenticationService.forget(this.email).subscribe(res => {
|
||||
|
|
|
|||
|
|
@ -7,12 +7,14 @@ import {FieldDocumentSingleComponent} from "@app/_modules/form-fields/types/docu
|
|||
import {FieldDocumentMultipleComponent} from "@app/_modules/form-fields/types/document/multiple/field-document-multiple.component";
|
||||
import { WidjetModule } from '@app/_modules/widjet/widjet.module';
|
||||
import {FieldDocumentValueComponent} from "@app/_modules/form-fields/types/document/value/field-document-value.component";
|
||||
import {SortablejsModule} from "@dustfoundation/ngx-sortablejs";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
ReactiveFormsModule,
|
||||
WidjetModule,
|
||||
SortablejsModule
|
||||
],
|
||||
declarations: [
|
||||
FormFieldDocumentComponent,
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@
|
|||
<div class="progress"><div class="fill" [style.width]="upload.progress + '%'"></div></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="values">
|
||||
<div class="values" [sortablejs]="assets" [sortablejsOptions]="documentsValues">
|
||||
<field-document-value *ngFor="let asset of assets" [asset]="asset" (delete)="removeValue(asset)"></field-document-value>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import {Component, HostListener, Input} from '@angular/core';
|
|||
import {FormGroup} from "@angular/forms";
|
||||
import {AssetsService} from "@app/_services/assets.service";
|
||||
import {HttpEventType, HttpResponse} from "@angular/common/http";
|
||||
import {SortableOptions} from "sortablejs";
|
||||
|
||||
@Component({
|
||||
selector: 'field-document-multiple',
|
||||
|
|
@ -16,6 +17,13 @@ export class FieldDocumentMultipleComponent {
|
|||
public upload: any = {file: null, progress: 0};
|
||||
public dragOver = false;
|
||||
|
||||
public documentsValues: SortableOptions = {
|
||||
group: 'doc-values',
|
||||
handle: 'file-ico',
|
||||
// onUpdate: (event: any) => {this.move(event)},
|
||||
// onAdd: (event: any) => {this.move(event)}
|
||||
};
|
||||
|
||||
@HostListener("dragover", ["$event"])
|
||||
@HostListener("dragenter", ["$event"])
|
||||
@HostListener("dragend", ["$event"])
|
||||
|
|
|
|||
|
|
@ -89,7 +89,6 @@ export class JumbotronComponent {
|
|||
}
|
||||
|
||||
get editable(){
|
||||
console.log(this.currentPage)
|
||||
return this.currentPage&&(this.authService.privileges?.admin|| this.authService.privileges?.editor);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -216,6 +216,9 @@ form-field-document{
|
|||
line-height: 24px;
|
||||
color: var(--second);
|
||||
}
|
||||
file-ico{
|
||||
cursor: move;
|
||||
}
|
||||
}
|
||||
.doc-item-form{
|
||||
input{
|
||||
|
|
|
|||
Loading…
Reference in New Issue