Home Reference Source
import WriteCommentViewController from '~/controllers/WriteCommentViewController.js'
public class | source

WriteCommentViewController

Extends:

ViewController → WriteCommentViewController

Manages a "Write Comment" button

Constructor Summary

Public Constructor
public

constructor(button: HTMLElement, owner: Post | Answer | Comment, parentList: CommentListViewController)

Creates the write commemt button

Member Summary

Public Members
public
public
public
public

Method Summary

Public Methods
public

async submit()

Submits this form

public

async toggleState()

Toggles between writing box and "add comment" dialogue.

Inherited Summary

From class ViewController
public static

forClass(className: string, predicate: Function, root: HTMLElement)

Creates a view controller directly for all members of a class.

public static

of(elem: string | Element): ViewController

Returns a canolical VC of an element if it exists

Public Constructors

public constructor(button: HTMLElement, owner: Post | Answer | Comment, parentList: CommentListViewController) source

Creates the write commemt button

Override:

ViewController#constructor

Params:

NameTypeAttributeDescription
button HTMLElement

The init tag.

owner Post | Answer | Comment

The owner

parentList CommentListViewController

The list view which to place comment in.

Public Members

public cancel source

public owner: Post | Answer | Comment source

public parentList: CommentListViewController source

public submitButton source

Public Methods

public async submit() source

Submits this form

public async toggleState() source

Toggles between writing box and "add comment" dialogue.