mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
perform some alert dialog
This commit is contained in:
@@ -47,6 +47,67 @@ class Confirm implements server.Iperson {
|
||||
}
|
||||
|
||||
|
||||
public globalSettings(){
|
||||
jconfirm.defaults = {
|
||||
title: 'Hello',
|
||||
titleClass: '',
|
||||
type: 'default',
|
||||
typeAnimated: true,
|
||||
draggable: true,
|
||||
dragWindowGap: 15,
|
||||
dragWindowBorder: true,
|
||||
animateFromElement: true,
|
||||
smoothContent: true,
|
||||
content: 'Are you sure to continue?',
|
||||
buttons: {},
|
||||
defaultButtons: {
|
||||
ok: {
|
||||
action: function () {
|
||||
}
|
||||
},
|
||||
close: {
|
||||
action: function () {
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
icon: '',
|
||||
lazyOpen: false,
|
||||
bgOpacity: null,
|
||||
theme: 'light',
|
||||
animation: 'scale',
|
||||
closeAnimation: 'scale',
|
||||
animationSpeed: 400,
|
||||
animationBounce: 1,
|
||||
rtl: false,
|
||||
container: 'body',
|
||||
containerFluid: false,
|
||||
backgroundDismiss: false,
|
||||
backgroundDismissAnimation: 'shake',
|
||||
autoClose: false,
|
||||
closeIcon: null,
|
||||
closeIconClass: false,
|
||||
watchInterval: 100,
|
||||
columnClass: 'col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3 col-xs-10 col-xs-offset-1',
|
||||
boxWidth: '50%',
|
||||
scrollToPreviousElement: true,
|
||||
scrollToPreviousElementAnimate: true,
|
||||
useBootstrap: true,
|
||||
offsetTop: 40,
|
||||
offsetBottom: 40,
|
||||
bootstrapClasses: {
|
||||
container: 'container',
|
||||
containerFluid: 'container-fluid',
|
||||
row: 'row',
|
||||
},
|
||||
onContentReady: function () {},
|
||||
onOpenBefore: function () {},
|
||||
onOpen: function () {},
|
||||
onClose: function () {},
|
||||
onDestroy: function () {},
|
||||
onAction: function () {}
|
||||
};
|
||||
}
|
||||
|
||||
public api(){
|
||||
var jc = $.confirm({
|
||||
|
||||
Vendored
+75
@@ -25,3 +25,78 @@
|
||||
dialog( pOtions: any | string): void;
|
||||
|
||||
}
|
||||
|
||||
|
||||
interface JQuery {
|
||||
/**
|
||||
* confirm Dialog
|
||||
* @param {confirmOptions} pOtions
|
||||
*/
|
||||
confirm( pOtions: options.confirmOptions | string, title?:string): boolean | void | HTMLElement | any;
|
||||
|
||||
/**
|
||||
* confirm alert
|
||||
* @param {any} pMessage
|
||||
*/
|
||||
alert( pMessage?: any, title?:string): void;
|
||||
|
||||
/**
|
||||
* confirm Dialog
|
||||
* @param {any} pMessage
|
||||
*/
|
||||
dialog( pOtions: options.confirmOptions | any): void;
|
||||
}
|
||||
|
||||
interface Window {
|
||||
setContentAppend: any;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
declare namespace options {
|
||||
|
||||
interface confirmOptions {
|
||||
buttons? : buttonOptionss | any,
|
||||
title? : string | boolean,
|
||||
content? : string | Function,
|
||||
onContentReady?: Function,
|
||||
lazyOpen?: boolean,
|
||||
closeIcon?: boolean | Function,
|
||||
type?: string,
|
||||
typeAnimated?: boolean,
|
||||
icon?: string,
|
||||
closeIconClass?: string,
|
||||
columnClass?: string,
|
||||
containerFluid?: boolean,
|
||||
boxWidth?: string,
|
||||
useBootstrap?: boolean,
|
||||
bootstrapClasses?: any,
|
||||
draggable?: boolean,
|
||||
dragWindowBorder?: boolean,
|
||||
dragWindowGap?: number,
|
||||
contentLoaded?: Function,
|
||||
autoClose?: string,
|
||||
backgroundDismiss?: boolean | Function | string,
|
||||
backgroundDismissAnimation?: string,
|
||||
escapeKey?: string | boolean,
|
||||
onOpenBefore?:Function,
|
||||
onOpen?: Function,
|
||||
onClose?: Function,
|
||||
onDestroy?: Function,
|
||||
onAction?: Function
|
||||
|
||||
|
||||
}
|
||||
|
||||
interface buttonOptionss {
|
||||
cancel?: Function,
|
||||
confirm?: Function
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
declare namespace jconfirm {
|
||||
let defaults: any;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user