diff --git a/jquerymobile/jquerymobile-tests.ts b/jquerymobile/jquerymobile-tests.ts index a21340932..19231849f 100644 --- a/jquerymobile/jquerymobile-tests.ts +++ b/jquerymobile/jquerymobile-tests.ts @@ -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(); -} +} diff --git a/jquerymobile/jquerymobile.d.ts b/jquerymobile/jquerymobile.d.ts index e7f92e8a2..d81e43900 100644 --- a/jquerymobile/jquerymobile.d.ts +++ b/jquerymobile/jquerymobile.d.ts @@ -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 // 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;