DitapAlert

다이탭 알림창 클래스.
Ditap alert class.

new Ditap.DitapAlert(obj, parent)

Name Type Default Description
obj object 각각 다음과 같은 속성을 가진 객체.
Object with the following properties:
Name Type Default Description
type string 아이콘 타입("success", "warning", "error", "info", "question").
Icon type ("success", "warning", "error", "info", "question").
title string 제목.
Title.
content1 string 첫번째 내용.
First content.
content2 string 두번째 내용.
Second content.
buttons string 버튼 종류("OKANDCANCEL", "ONLYOK", "NOBUTTONS").
Button type ("OKANDCANCEL", "ONLYOK", "NOBUTTONS").
open boolean true optional 알림창 즉시 표시 여부.
Display notification window immediately.
mask boolean true optional 배경 마스크 표시 여부.
Background mask.
callback function 확인 버튼 클릭 시 실행 함수.
OK Button click callback.
parent Element body optional parent 알림이 생성될 부모 요소.
Parent element to insert alert.
Example:
const props = {
 type : "info",
 title : "정보",
 content1 : "정보 관련 텍스트입니다.",
 content2 : "정보 관련 텍스트 내용을 입력해주세요",
 buttons : "OKANDCANCEL",
 callback: () => { funcAfterClick(); },
 closeCallback: (alert) => { alert.destroy(); },
 open: false
}

const alert = new Ditap.DitapAlert(props);

Extends

Methods

appendContent(element)

컨텐츠 영역에 요소 추가.
Append element to content.
Name Type Description
element Element 추가할 요소.
Element to add.
Inherited From:

appendFooter(element)

푸터 영역에 요소 추가.
Append element to footer.
Name Type Description
element Element 추가할 요소.
Element to add.
Inherited From:

appendHeader(element)

헤더 영역에 요소 추가.
Append element to header.
Name Type Description
element Element 추가할 요소.
Element to add.
Inherited From:

close()

알림창 닫기.
Close alert.

destroy()

알림 창 파괴.
Destroy alert.

open()

알림창 오픈.
Open alert.

prependContent(element)

컨텐츠 영역 맨 앞에 요소 추가.
Prepend element to content.
Name Type Description
element Element 추가할 요소.
Element to add.
Inherited From:

prependFooter(element)

푸터 영역 맨 앞에 요소 추가.
Prepend element to footer.
Name Type Description
element Element 추가할 요소.
Element to add.
Inherited From:

prependHeader(element)

헤더 영역 맨 앞에 요소 추가.
Prepend element to header.
Name Type Description
element Element 추가할 요소.
Element to add.
Inherited From:

removeAllContent()

컨텐츠 영역의 모든 자식 요소 제거.
Remove all children of content.
Inherited From:

removeAllFooter()

푸터 영역의 모든 자식 요소 제거.
Remove all children of footer.
Inherited From:

removeAllHeader()

헤더 영역의 모든 자식 요소 제거.
Remove all children of header.
Inherited From:

removeContent(element)

컨텐츠 영역의 자식 요소 제거.
Remove children of content.
Name Type Description
element Element 제거할 요소.
Element to remove.
Inherited From:

removeFooter(element)

푸터 영역의 자식 요소 제거.
Remove children of footer.
Name Type Description
element Element 제거할 요소.
Element to remove.
Inherited From:

removeHeader(element)

헤더 영역의 자식 요소 제거.
Remove children of header.
Name Type Description
element Element 제거할 요소.
Element to remove.
Inherited From:

toggle(element)

팝업 활성화 on/off 기능.
Function on and off.
Name Type Description
element Element 매개변수가 없는 경우 wrapper 오픈.
If no parameter is entered, toggle wrapper.
Inherited From: