From 80958c78fdc733c02077a9d2200be0c3f5ee623e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 28 Nov 2017 15:40:53 +0100 Subject: Add loader when expanding long video description --- .../+video-edit/shared/video-edit.component.scss | 56 ++++++++++++++++++++++ .../videos/+video-edit/shared/video-edit.module.ts | 33 +++++++++++++ .../app/videos/+video-edit/video-add.component.ts | 2 +- .../src/app/videos/+video-edit/video-add.module.ts | 5 +- .../videos/+video-edit/video-edit.component.scss | 56 ---------------------- .../app/videos/+video-edit/video-edit.module.ts | 33 ------------- .../videos/+video-edit/video-update.component.ts | 2 +- .../app/videos/+video-edit/video-update.module.ts | 5 +- 8 files changed, 95 insertions(+), 97 deletions(-) create mode 100644 client/src/app/videos/+video-edit/shared/video-edit.component.scss create mode 100644 client/src/app/videos/+video-edit/shared/video-edit.module.ts delete mode 100644 client/src/app/videos/+video-edit/video-edit.component.scss delete mode 100644 client/src/app/videos/+video-edit/video-edit.module.ts (limited to 'client/src/app/videos/+video-edit') diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.scss b/client/src/app/videos/+video-edit/shared/video-edit.component.scss new file mode 100644 index 000000000..9ee0c520c --- /dev/null +++ b/client/src/app/videos/+video-edit/shared/video-edit.component.scss @@ -0,0 +1,56 @@ +.btn-file { + position: relative; + overflow: hidden; + display: block; +} + +.btn-file input[type=file] { + position: absolute; + top: 0; + right: 0; + min-width: 100%; + min-height: 100%; + font-size: 100px; + text-align: right; + filter: alpha(opacity=0); + opacity: 0; + outline: none; + background: white; + cursor: inherit; + display: block; +} + +.form-group { + margin-bottom: 10px; +} + +div.tags { + height: 40px; + font-size: 20px; + margin-top: 20px; + + .tag { + margin-right: 10px; + + .remove { + cursor: pointer; + } + } +} + +div.file-to-upload { + height: 40px; + + .glyphicon-remove { + cursor: pointer; + } +} + +.little-information { + font-size: 0.8em; + font-style: italic; +} + +.label-tags { + margin-bottom: 0; +} diff --git a/client/src/app/videos/+video-edit/shared/video-edit.module.ts b/client/src/app/videos/+video-edit/shared/video-edit.module.ts new file mode 100644 index 000000000..c64cea920 --- /dev/null +++ b/client/src/app/videos/+video-edit/shared/video-edit.module.ts @@ -0,0 +1,33 @@ +import { NgModule } from '@angular/core' + +import { TagInputModule } from 'ngx-chips' +import { TabsModule } from 'ngx-bootstrap/tabs' + +import { VideoService, MarkdownService, VideoDescriptionComponent } from '../../shared' +import { SharedModule } from '../../../shared' + +@NgModule({ + imports: [ + TagInputModule, + TabsModule.forRoot(), + + SharedModule + ], + + declarations: [ + VideoDescriptionComponent + ], + + exports: [ + TagInputModule, + TabsModule, + + VideoDescriptionComponent + ], + + providers: [ + VideoService, + MarkdownService + ] +}) +export class VideoEditModule { } diff --git a/client/src/app/videos/+video-edit/video-add.component.ts b/client/src/app/videos/+video-edit/video-add.component.ts index c8094f792..1704cf486 100644 --- a/client/src/app/videos/+video-edit/video-add.component.ts +++ b/client/src/app/videos/+video-edit/video-add.component.ts @@ -23,7 +23,7 @@ import { HttpEventType, HttpResponse } from '@angular/common/http' @Component({ selector: 'my-videos-add', - styleUrls: [ './video-edit.component.scss' ], + styleUrls: [ './shared/video-edit.component.scss' ], templateUrl: './video-add.component.html' }) diff --git a/client/src/app/videos/+video-edit/video-add.module.ts b/client/src/app/videos/+video-edit/video-add.module.ts index 3d937b008..f58d12dac 100644 --- a/client/src/app/videos/+video-edit/video-add.module.ts +++ b/client/src/app/videos/+video-edit/video-add.module.ts @@ -1,9 +1,8 @@ import { NgModule } from '@angular/core' - +import { SharedModule } from '../../shared' +import { VideoEditModule } from './shared/video-edit.module' import { VideoAddRoutingModule } from './video-add-routing.module' import { VideoAddComponent } from './video-add.component' -import { VideoEditModule } from './video-edit.module' -import { SharedModule } from '../../shared' @NgModule({ imports: [ diff --git a/client/src/app/videos/+video-edit/video-edit.component.scss b/client/src/app/videos/+video-edit/video-edit.component.scss deleted file mode 100644 index 9ee0c520c..000000000 --- a/client/src/app/videos/+video-edit/video-edit.component.scss +++ /dev/null @@ -1,56 +0,0 @@ -.btn-file { - position: relative; - overflow: hidden; - display: block; -} - -.btn-file input[type=file] { - position: absolute; - top: 0; - right: 0; - min-width: 100%; - min-height: 100%; - font-size: 100px; - text-align: right; - filter: alpha(opacity=0); - opacity: 0; - outline: none; - background: white; - cursor: inherit; - display: block; -} - -.form-group { - margin-bottom: 10px; -} - -div.tags { - height: 40px; - font-size: 20px; - margin-top: 20px; - - .tag { - margin-right: 10px; - - .remove { - cursor: pointer; - } - } -} - -div.file-to-upload { - height: 40px; - - .glyphicon-remove { - cursor: pointer; - } -} - -.little-information { - font-size: 0.8em; - font-style: italic; -} - -.label-tags { - margin-bottom: 0; -} diff --git a/client/src/app/videos/+video-edit/video-edit.module.ts b/client/src/app/videos/+video-edit/video-edit.module.ts deleted file mode 100644 index 33f654960..000000000 --- a/client/src/app/videos/+video-edit/video-edit.module.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { NgModule } from '@angular/core' - -import { TagInputModule } from 'ngx-chips' -import { TabsModule } from 'ngx-bootstrap/tabs' - -import { VideoService, MarkdownService, VideoDescriptionComponent } from '../shared' -import { SharedModule } from '../../shared' - -@NgModule({ - imports: [ - TagInputModule, - TabsModule.forRoot(), - - SharedModule - ], - - declarations: [ - VideoDescriptionComponent - ], - - exports: [ - TagInputModule, - TabsModule, - - VideoDescriptionComponent - ], - - providers: [ - VideoService, - MarkdownService - ] -}) -export class VideoEditModule { } diff --git a/client/src/app/videos/+video-edit/video-update.component.ts b/client/src/app/videos/+video-edit/video-update.component.ts index be663575f..0e966cb50 100644 --- a/client/src/app/videos/+video-edit/video-update.component.ts +++ b/client/src/app/videos/+video-edit/video-update.component.ts @@ -21,7 +21,7 @@ import { VideoPrivacy } from '../../../../../shared/models/videos/video-privacy. @Component({ selector: 'my-videos-update', - styleUrls: [ './video-edit.component.scss' ], + styleUrls: [ './shared/video-edit.component.scss' ], templateUrl: './video-update.component.html' }) diff --git a/client/src/app/videos/+video-edit/video-update.module.ts b/client/src/app/videos/+video-edit/video-update.module.ts index f7bd77c75..3b45c72a5 100644 --- a/client/src/app/videos/+video-edit/video-update.module.ts +++ b/client/src/app/videos/+video-edit/video-update.module.ts @@ -1,9 +1,8 @@ import { NgModule } from '@angular/core' - +import { SharedModule } from '../../shared' +import { VideoEditModule } from './shared/video-edit.module' import { VideoUpdateRoutingModule } from './video-update-routing.module' import { VideoUpdateComponent } from './video-update.component' -import { VideoEditModule } from './video-edit.module' -import { SharedModule } from '../../shared' @NgModule({ imports: [ -- cgit v1.2.3