Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add up to date typescript definition file #124

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions blockUI.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
//downloaded from http://malsup.com/jquery/block/#faq 26/Jun/2015

/// <reference path="../jquery/jquery.d.ts" />


interface JQueryStatic {
// global $ methods for blocking/unblocking the entire page
blockUI: BlockUI;
unblockUI(property?: blockUIOptions);

// convenience method for quick growl-like notifications (http://www.google.com/search?q=growl)
growlUI(title: string, message: string, timeout: number, onClose: () => void);
}
interface JQuery {
// plugin method for blocking element content
block: (options: blockUIOptions) => JQuery;
// plugin method for unblocking element content
unblock: (options: blockUIOptions) => JQuery;
}

//Css Properties
//BlockUI feeds css object to $('<div class="blockUI ...').css(properties: Object)
// any css property is valid, none are required. Cant use CSSStyleDeclaration, it requires all properties!

interface BlockUI {
(property?: blockUIOptions);
version: string;
defaults: blockUIOptions;
}


interface blockUIOptions {
message?: string | HTMLElement | JQuery;
title?: string;
draggable?: boolean;
theme?: boolean;
css?: any;
themedCSS?: any;
overlayCSS?: any;
cursorReset?: string;
growlCSS?: any;
iframeSrc?: string;
forceIframe?: boolean;
baseZ?: number;
centerX?: boolean;
centerY?: boolean;
allowBodyStretch?: boolean;
bindEvents?: boolean;
constraainTabKey?: boolean;
fadeIn?: number;
fadeOut?: number;
timeout?: number;
showOverlay?: boolean;
focusInput?: boolean; //new
focusableElements?: boolean; //new
onBlock?: () => void;
onUnblock?: (unblockElement: JQuery, options: blockUIOptions) => void ;
onOverlayClick?: (JQueryEventObject: any) => void; //new
quirksmodeOffsetHack?: number;
blockMsgClass?: string;
ignoreIfBlocked?: boolean;
}