From 8414bce85c14c8637d2977eac8a880abc37da7aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lukas=20Mau=C3=9F?= <lukas.mauss@mni.thm.de>
Date: Sat, 9 Feb 2019 18:41:00 +0100
Subject: [PATCH] Remove markdown-help-module

---
 .../markdown-help-dialog.component.html       |  5 ----
 .../markdown-help-dialog.component.scss       |  0
 .../markdown-help-dialog.component.spec.ts    | 25 -------------------
 .../markdown-help-dialog.component.ts         | 17 -------------
 .../markdown-toolbar.component.ts             |  6 -----
 src/app/components/shared/shared.module.ts    |  4 ---
 6 files changed, 57 deletions(-)
 delete mode 100644 src/app/components/creator/_dialogs/markdown-help-dialog/markdown-help-dialog.component.html
 delete mode 100644 src/app/components/creator/_dialogs/markdown-help-dialog/markdown-help-dialog.component.scss
 delete mode 100644 src/app/components/creator/_dialogs/markdown-help-dialog/markdown-help-dialog.component.spec.ts
 delete mode 100644 src/app/components/creator/_dialogs/markdown-help-dialog/markdown-help-dialog.component.ts

diff --git a/src/app/components/creator/_dialogs/markdown-help-dialog/markdown-help-dialog.component.html b/src/app/components/creator/_dialogs/markdown-help-dialog/markdown-help-dialog.component.html
deleted file mode 100644
index 3d4b4ef04..000000000
--- a/src/app/components/creator/_dialogs/markdown-help-dialog/markdown-help-dialog.component.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<p>
-  You can use <a href="https://guides.github.com/features/mastering-markdown/" title="Markdown GitHub" target="_blank">
-  Markdown</a> to style your texts. The shown buttons offer shortcuts to insert commonly used tags.
-</p>
-<button mat-raised-button (click)="onNoClick();">Okay!</button>
diff --git a/src/app/components/creator/_dialogs/markdown-help-dialog/markdown-help-dialog.component.scss b/src/app/components/creator/_dialogs/markdown-help-dialog/markdown-help-dialog.component.scss
deleted file mode 100644
index e69de29bb..000000000
diff --git a/src/app/components/creator/_dialogs/markdown-help-dialog/markdown-help-dialog.component.spec.ts b/src/app/components/creator/_dialogs/markdown-help-dialog/markdown-help-dialog.component.spec.ts
deleted file mode 100644
index 0a17c7078..000000000
--- a/src/app/components/creator/_dialogs/markdown-help-dialog/markdown-help-dialog.component.spec.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { MarkdownHelpDialogComponent } from './markdown-help-dialog.component';
-
-describe('MarkdownHelpDialogComponent', () => {
-  let component: MarkdownHelpDialogComponent;
-  let fixture: ComponentFixture<MarkdownHelpDialogComponent>;
-
-  beforeEach(async(() => {
-    TestBed.configureTestingModule({
-      declarations: [ MarkdownHelpDialogComponent ]
-    })
-    .compileComponents();
-  }));
-
-  beforeEach(() => {
-    fixture = TestBed.createComponent(MarkdownHelpDialogComponent);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  });
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});
diff --git a/src/app/components/creator/_dialogs/markdown-help-dialog/markdown-help-dialog.component.ts b/src/app/components/creator/_dialogs/markdown-help-dialog/markdown-help-dialog.component.ts
deleted file mode 100644
index 34048ab1f..000000000
--- a/src/app/components/creator/_dialogs/markdown-help-dialog/markdown-help-dialog.component.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { Component } from '@angular/core';
-import { GenericDataDialogComponent } from '../../../shared/_dialogs/generic-data-dialog/generic-data-dialog.component';
-import { MatDialogRef } from '@angular/material';
-
-@Component({
-  selector: 'app-markdown-help-dialog',
-  templateUrl: './markdown-help-dialog.component.html',
-  styleUrls: ['./markdown-help-dialog.component.scss']
-})
-export class MarkdownHelpDialogComponent {
-
-  constructor(public dialogRef: MatDialogRef<GenericDataDialogComponent>) { }
-
-  onNoClick(): void {
-    this.dialogRef.close();
-  }
-}
diff --git a/src/app/components/creator/markdown-toolbar/markdown-toolbar.component.ts b/src/app/components/creator/markdown-toolbar/markdown-toolbar.component.ts
index efd9e9859..f82958fa5 100644
--- a/src/app/components/creator/markdown-toolbar/markdown-toolbar.component.ts
+++ b/src/app/components/creator/markdown-toolbar/markdown-toolbar.component.ts
@@ -1,5 +1,4 @@
 import { Component, Input } from '@angular/core';
-import { MarkdownHelpDialogComponent } from '../_dialogs/markdown-help-dialog/markdown-help-dialog.component';
 import { MatDialog } from '@angular/material';
 import { Data, GenericDataDialogComponent } from '../../shared/_dialogs/generic-data-dialog/generic-data-dialog.component';
 
@@ -36,7 +35,6 @@ export class MarkdownToolbarComponent {
     new Button('code', 'Code', 'code', '`{{TEXT}}`'),
     new Button('quote', 'Quote', 'format_quote', '> {{TEXT}}'),
     new Button('image', 'Image', 'insert_photo', '![{{TEXT}}]({{URL}})'),
-    new Button('help', 'Help', 'help', '')
   ];
 
   constructor(public dialog: MatDialog) { }
@@ -65,10 +63,6 @@ export class MarkdownToolbarComponent {
 
     // Handle different buttons here
     switch (button.id) {
-      case 'help':
-        // Open help dialog and prevent default action
-        this.dialog.open(MarkdownHelpDialogComponent);
-        break;
       case 'link':
       case 'image':
         // Open a configuration dialog
diff --git a/src/app/components/shared/shared.module.ts b/src/app/components/shared/shared.module.ts
index d2522ea76..153692adf 100644
--- a/src/app/components/shared/shared.module.ts
+++ b/src/app/components/shared/shared.module.ts
@@ -13,7 +13,6 @@ import { RoomPageComponent } from './room-page/room-page.component';
 import { StatisticsPageComponent } from './statistics-page/statistics-page.component';
 import { AnswerEditComponent } from '../creator/_dialogs/answer-edit/answer-edit.component';
 import { ContentDeleteComponent } from '../creator/_dialogs/content-delete/content-delete.component';
-import { MarkdownHelpDialogComponent } from '../creator/_dialogs/markdown-help-dialog/markdown-help-dialog.component';
 import { GenericDataDialogComponent } from './_dialogs/generic-data-dialog/generic-data-dialog.component';
 import { CommentCreatePageComponent } from '../participant/comment-create-page/comment-create-page.component';
 import { EssentialsModule } from '../essentials/essentials.module';
@@ -39,7 +38,6 @@ import { StatisticComponent } from './statistic/statistic.component';
     AnswerEditComponent,
     ContentDeleteComponent,
     FeedbackBarometerPageComponent,
-    MarkdownHelpDialogComponent,
     GenericDataDialogComponent,
     FooterComponent,
     FooterImprintComponent,
@@ -60,7 +58,6 @@ import { StatisticComponent } from './statistic/statistic.component';
     AnswerEditComponent,
     ContentDeleteComponent,
     FeedbackBarometerPageComponent,
-    MarkdownHelpDialogComponent,
     GenericDataDialogComponent,
     FooterComponent,
     FooterImprintComponent,
@@ -70,7 +67,6 @@ import { StatisticComponent } from './statistic/statistic.component';
     StatisticsPageComponent
   ],
   entryComponents: [
-    MarkdownHelpDialogComponent,
     GenericDataDialogComponent
   ]
 })
-- 
GitLab