mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 12:42:58 +08:00
Fix jQuery BlockUI Plugin
This commit is contained in:
@@ -9,3 +9,17 @@ $.blockUI(opt);
|
||||
$.unblockUI();
|
||||
$("#test").block().unblock();
|
||||
$("#test").block(opt);
|
||||
|
||||
$.blockUI.defaults.css.border = '5px solid red';
|
||||
$.blockUI.defaults.fadeOut = 200;
|
||||
|
||||
$.blockUI({ message: $('#domMessage') });
|
||||
$.unblockUI({ fadeOut: 200 });
|
||||
|
||||
$.blockUI({
|
||||
fadeIn: 1000,
|
||||
timeout: 2000,
|
||||
onBlock: function() {
|
||||
alert('Page is now blocked; fadeIn complete');
|
||||
}
|
||||
});
|
||||
|
||||
10
jquery.blockUI/jquery.blockUI.d.ts
vendored
10
jquery.blockUI/jquery.blockUI.d.ts
vendored
@@ -7,7 +7,7 @@
|
||||
|
||||
interface JQBlockUIOptions {
|
||||
/** message displayed when blocking (use null for no message) */
|
||||
message?: string;
|
||||
message?: any;
|
||||
/** title string; only used when theme == true */
|
||||
title?: string;
|
||||
/** only used when theme == true (requires jquery-ui.js to be loaded) */
|
||||
@@ -76,7 +76,7 @@ interface JQBlockUIOptions {
|
||||
focusInput?: boolean;
|
||||
|
||||
/** callback method invoked when fadeIn has completed and blocking message is visible */
|
||||
onBlock?: boolean;
|
||||
onBlock?: () => void;
|
||||
|
||||
/**
|
||||
* callback method invoked when unblocking has completed; the callback is
|
||||
@@ -99,7 +99,7 @@ interface JQBlockUIOptions {
|
||||
|
||||
interface JQBlockUIStatic {
|
||||
/** default options */
|
||||
default?: JQBlockUIOptions;
|
||||
defaults?: JQBlockUIOptions;
|
||||
/** block user activity for the page */
|
||||
(): void;
|
||||
/**
|
||||
@@ -113,7 +113,7 @@ interface JQueryStatic {
|
||||
/** block user activity for the page */
|
||||
blockUI?: JQBlockUIStatic;
|
||||
/** unblock the page */
|
||||
unblockUI?: () => void;
|
||||
unblockUI?: JQBlockUIStatic;
|
||||
}
|
||||
|
||||
interface JQuery {
|
||||
@@ -125,5 +125,5 @@ interface JQuery {
|
||||
/**
|
||||
* unblock the element(s)
|
||||
*/
|
||||
unblock(): JQuery;
|
||||
unblock(option?: JQBlockUIOptions): JQuery;
|
||||
}
|
||||
Reference in New Issue
Block a user