mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 12:56:46 +08:00
Merge pull request #1542 from DickvdBrink/jquerymobile-1.4
Update to jQueryMobile 1.4
This commit is contained in:
@@ -25,9 +25,6 @@ function test_api() {
|
||||
var isAbs = $.mobile.path.isAbsoluteUrl("//foo.com/a/file.html");
|
||||
var dirName = $.mobile.path.get("http://foo.com/a");
|
||||
$.mobile.silentScroll(100);
|
||||
|
||||
$.mobile.showPageLoadingMsg();
|
||||
$.mobile.hidePageLoadingMsg();
|
||||
}
|
||||
|
||||
function test_pagesDialogs() {
|
||||
@@ -258,4 +255,4 @@ function test_listview() {
|
||||
|
||||
function test_misc() {
|
||||
$.mobile.initializePage();
|
||||
}
|
||||
}
|
||||
|
||||
53
jquerymobile/jquerymobile.d.ts
vendored
53
jquerymobile/jquerymobile.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for jQuery Mobile 1.2
|
||||
// Type definitions for jQuery Mobile 1.4
|
||||
// Project: http://jquerymobile.com/
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
@@ -143,6 +143,18 @@ interface SliderEvents {
|
||||
slidestop?: JQueryMobileEvent;
|
||||
}
|
||||
|
||||
interface FlipswitchOptions {
|
||||
corners?: boolean;
|
||||
defaults?: boolean;
|
||||
disabled?: boolean;
|
||||
enhanced?: boolean;
|
||||
mini?: boolean;
|
||||
offText?: string;
|
||||
onText?: string;
|
||||
theme?: string;
|
||||
wrapperClass?: string;
|
||||
}
|
||||
|
||||
interface CheckboxRadioOptions {
|
||||
mini?: boolean;
|
||||
theme?: string;
|
||||
@@ -298,6 +310,30 @@ interface LoaderOptions {
|
||||
textonly?: boolean;
|
||||
}
|
||||
|
||||
interface JQueryMobilePath {
|
||||
get(url: string): string;
|
||||
getDocumentBase(asParsedObject?: boolean): any;
|
||||
getDocumentUrl(asParsedObject?: boolean): any;
|
||||
getLocation(): string;
|
||||
isAbsoluteUrl(url: string): boolean;
|
||||
isRelativeUrl(url: string): boolean;
|
||||
makeUrlAbsolute(relUrl: string, absUrl: string): string;
|
||||
parseLocation(): ParsedPath;
|
||||
parseUrl(url: string): ParsedPath;
|
||||
}
|
||||
|
||||
interface ParsedPath {
|
||||
hash: string;
|
||||
host: string;
|
||||
hostname: string;
|
||||
href: string;
|
||||
pathname: string;
|
||||
port: string;
|
||||
protocol: string;
|
||||
search: string;
|
||||
}
|
||||
|
||||
|
||||
interface JQueryMobile extends JQueryMobileOptions {
|
||||
|
||||
version: string;
|
||||
@@ -305,8 +341,10 @@ interface JQueryMobile extends JQueryMobileOptions {
|
||||
changePage(to: any, options?: ChangePageOptions): void;
|
||||
initializePage(): void;
|
||||
loadPage(url: any, options?: LoadPageOptions): void;
|
||||
loading(command: string, options?: LoaderOptions): void;
|
||||
loading(): JQuery;
|
||||
loading(command: string, options?: LoaderOptions): JQuery;
|
||||
|
||||
pageContainer: any;
|
||||
base: any;
|
||||
silentScroll(yPos: number): void;
|
||||
activePage: JQuery;
|
||||
@@ -314,14 +352,12 @@ interface JQueryMobile extends JQueryMobileOptions {
|
||||
options: JQueryMobileOptions;
|
||||
|
||||
transitionFallbacks: any;
|
||||
showPageLoadingMsg(): void;
|
||||
hidePageLoadingMsg(): void;
|
||||
loader: any;
|
||||
page: any;
|
||||
|
||||
touchOverflow: any;
|
||||
showCategory: any;
|
||||
path: any;
|
||||
path: JQueryMobilePath;
|
||||
|
||||
dialog: any;
|
||||
popup: any;
|
||||
@@ -331,6 +367,7 @@ interface JQueryMobile extends JQueryMobileOptions {
|
||||
collapsibleset: any;
|
||||
textinput: any;
|
||||
slider: any;
|
||||
flipswitch: any;
|
||||
checkboxradio: any;
|
||||
selectmenu: any;
|
||||
listview: any;
|
||||
@@ -343,6 +380,8 @@ interface JQuerySupport {
|
||||
|
||||
interface JQuery {
|
||||
|
||||
enhanceWithin(): JQuery;
|
||||
|
||||
dialog(): JQuery;
|
||||
dialog(command: string): JQuery;
|
||||
dialog(options: DialogOptions): JQuery;
|
||||
@@ -387,6 +426,10 @@ interface JQuery {
|
||||
slider(options: SliderOptions): JQuery;
|
||||
slider(events: SliderEvents): JQuery;
|
||||
|
||||
flipswitch(): JQuery;
|
||||
flipswitch(command: string): JQuery;
|
||||
flipswitch(options: FlipswitchOptions): JQuery;
|
||||
|
||||
checkboxradio(): JQuery;
|
||||
checkboxradio(command: string): JQuery;
|
||||
checkboxradio(options: CheckboxRadioOptions): JQuery;
|
||||
|
||||
Reference in New Issue
Block a user