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

AdminUserActionController

Extends:

ViewControllerProgressButtonControllerLoadingButtonController → AdminUserActionController

Controller for any button that performs an admin use raction. Just detects for clicks on the passed element.

Constructor Summary

Public Constructor
public

constructor(user: User, actionType: AdminUserActionType)

Creates for a button and a type

Member Summary

Public Members
public
public

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

From class ProgressButtonController
public

button: HTMLElement

public

buttonChildren: HTMLElement[]

public
public
public

setLoadingState(isLoading: Boolean)

Sets into a loading state

From class LoadingButtonController
public set

If the button is in progress

public

button: HTMLElement

public

observeClick(): Observable

Observes the click of the button

Public Constructors

public constructor(user: User, actionType: AdminUserActionType) source

Creates for a button and a type

Override:

LoadingButtonController#constructor

Params:

NameTypeAttributeDescription
button. HTMLElement | string

The button or an ID as a string

user User

user to perform on

actionType AdminUserActionType

action to perform

Public Members

public actionType: AdminUserActionType source

public isInProgress source

If the button is in progress

Override:

LoadingButtonController#isInProgress