From 25827269a88a124426436fecd3b5068ee23b464f Mon Sep 17 00:00:00 2001 From: rdeneau Date: Thu, 18 Feb 2016 11:32:16 +0100 Subject: [PATCH 1/3] Add jquery-bootpag definition files --- jquery-bootpag/jquery-bootpag-tests.ts | 17 ++++ jquery-bootpag/jquery-bootpag.d.ts | 126 +++++++++++++++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 jquery-bootpag/jquery-bootpag-tests.ts create mode 100644 jquery-bootpag/jquery-bootpag.d.ts diff --git a/jquery-bootpag/jquery-bootpag-tests.ts b/jquery-bootpag/jquery-bootpag-tests.ts new file mode 100644 index 0000000000..934b747ea9 --- /dev/null +++ b/jquery-bootpag/jquery-bootpag-tests.ts @@ -0,0 +1,17 @@ +/// +/// + +var pagerSelector = ".bootpager"; +var $pager = $(pagerSelector); + +var pagerOptions: JqueryBootpag.Options = { + total: 15, + page: 1, + maxVisible: 5, + first: "", + last: "", + prev: "", + next: "" +}; + +$pager.bootpag(pagerOptions); \ No newline at end of file diff --git a/jquery-bootpag/jquery-bootpag.d.ts b/jquery-bootpag/jquery-bootpag.d.ts new file mode 100644 index 0000000000..c09c67b78c --- /dev/null +++ b/jquery-bootpag/jquery-bootpag.d.ts @@ -0,0 +1,126 @@ +// Type definitions for jQuery-Bootpag 1.0.7 +// Project: http://botmonster.com/jquery-bootpag/ +// Definitions by: MAF.DAP / Romain Deneau +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module JqueryBootpag { + /** + * Bootpag plugin interface options + */ + export interface Options { + /** + * number of pages + */ + total: number; + + /** + * maximum number of visible pages + */ + maxVisible: number; + + /** + * page to show on start + */ + page?: number; + + /** + * next/prev buttons move over one page or maximum visible pages (default true) + */ + leaps?: boolean; + + /** + * next button text (default "»") + */ + next?: string; + + /** + * prev button text (default "«") + */ + prev?: string; + + /** + * template for pagination links (default "javascript:void(0);") + */ + href?: string; + + /** + * variable name in href template for page number (default "{{number}}") + */ + hrefVariable?: string; + + /** + * do we ant first and last (default true) + */ + firstLastUse?: boolean; + + /** + * name of first (default 'FIRST') + */ + first?: string; + + /** + * name of last (default 'LAST') + */ + last?: string; + + /** + * css class for wrap (default 'pagination') + */ + wrapClass?: string; + + /** + * css class for active (default 'active') + */ + activeClass?: string; + + /** + * css class for disabled (default 'disabled') + */ + disabledClass?: string; + + /** + * css class for next (default 'next') + */ + nextClass?: string; + + /** + * css class for prev (default 'prev') + */ + prevClass?: string; + + /** + * css class for last (default 'last') + */ + lastClass?: string; + + /** + * css class for first (default 'first') + */ + firstClass?: string; + } + + /** + * Event handler on page click. + * @param event : JQueryEventObject + * @param pageNumber : number of the clicked page + */ + interface PageEventHandler { + (event: JQueryEventObject, pageNumber: number): any; + } +} + +interface JQuery { + /** + * jQuery Bootpag plugin main method + */ + bootpag(options: JqueryBootpag.Options): JQuery; + + /** + * jQuery Bootpag "page" event occurring on page click. + * @param eventName : always "page" + * @param handler : A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. + */ + on(eventName: "page", handler: JqueryBootpag.PageEventHandler): JQuery; +} \ No newline at end of file From 8dc82014e04c3eaeec9b751b35c9de7b5a01f481 Mon Sep 17 00:00:00 2001 From: rdeneau Date: Tue, 1 Mar 2016 11:46:32 +0100 Subject: [PATCH 2/3] Add bootpag definition files --- bootpag/bootpag-tests.ts | 17 ++++++ bootpag/bootpag.d.ts | 126 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 bootpag/bootpag-tests.ts create mode 100644 bootpag/bootpag.d.ts diff --git a/bootpag/bootpag-tests.ts b/bootpag/bootpag-tests.ts new file mode 100644 index 0000000000..a0986e74cc --- /dev/null +++ b/bootpag/bootpag-tests.ts @@ -0,0 +1,17 @@ +/// +/// + +var pagerSelector = ".bootpager"; +var $pager = $(pagerSelector); + +var pagerOptions: JqueryBootpag.Options = { + total: 15, + page: 1, + maxVisible: 5, + first: "", + last: "", + prev: "", + next: "" +}; + +$pager.bootpag(pagerOptions); \ No newline at end of file diff --git a/bootpag/bootpag.d.ts b/bootpag/bootpag.d.ts new file mode 100644 index 0000000000..c09c67b78c --- /dev/null +++ b/bootpag/bootpag.d.ts @@ -0,0 +1,126 @@ +// Type definitions for jQuery-Bootpag 1.0.7 +// Project: http://botmonster.com/jquery-bootpag/ +// Definitions by: MAF.DAP / Romain Deneau +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module JqueryBootpag { + /** + * Bootpag plugin interface options + */ + export interface Options { + /** + * number of pages + */ + total: number; + + /** + * maximum number of visible pages + */ + maxVisible: number; + + /** + * page to show on start + */ + page?: number; + + /** + * next/prev buttons move over one page or maximum visible pages (default true) + */ + leaps?: boolean; + + /** + * next button text (default "»") + */ + next?: string; + + /** + * prev button text (default "«") + */ + prev?: string; + + /** + * template for pagination links (default "javascript:void(0);") + */ + href?: string; + + /** + * variable name in href template for page number (default "{{number}}") + */ + hrefVariable?: string; + + /** + * do we ant first and last (default true) + */ + firstLastUse?: boolean; + + /** + * name of first (default 'FIRST') + */ + first?: string; + + /** + * name of last (default 'LAST') + */ + last?: string; + + /** + * css class for wrap (default 'pagination') + */ + wrapClass?: string; + + /** + * css class for active (default 'active') + */ + activeClass?: string; + + /** + * css class for disabled (default 'disabled') + */ + disabledClass?: string; + + /** + * css class for next (default 'next') + */ + nextClass?: string; + + /** + * css class for prev (default 'prev') + */ + prevClass?: string; + + /** + * css class for last (default 'last') + */ + lastClass?: string; + + /** + * css class for first (default 'first') + */ + firstClass?: string; + } + + /** + * Event handler on page click. + * @param event : JQueryEventObject + * @param pageNumber : number of the clicked page + */ + interface PageEventHandler { + (event: JQueryEventObject, pageNumber: number): any; + } +} + +interface JQuery { + /** + * jQuery Bootpag plugin main method + */ + bootpag(options: JqueryBootpag.Options): JQuery; + + /** + * jQuery Bootpag "page" event occurring on page click. + * @param eventName : always "page" + * @param handler : A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. + */ + on(eventName: "page", handler: JqueryBootpag.PageEventHandler): JQuery; +} \ No newline at end of file From 589a98ce80ab4ab536a0a6465d1fb560350ae1ff Mon Sep 17 00:00:00 2001 From: rdeneau Date: Fri, 11 Mar 2016 09:44:14 +0100 Subject: [PATCH 3/3] Revert "Add jquery-bootpag definition files" This reverts commit 25827269a88a124426436fecd3b5068ee23b464f. --- jquery-bootpag/jquery-bootpag-tests.ts | 17 ---- jquery-bootpag/jquery-bootpag.d.ts | 126 ------------------------- 2 files changed, 143 deletions(-) delete mode 100644 jquery-bootpag/jquery-bootpag-tests.ts delete mode 100644 jquery-bootpag/jquery-bootpag.d.ts diff --git a/jquery-bootpag/jquery-bootpag-tests.ts b/jquery-bootpag/jquery-bootpag-tests.ts deleted file mode 100644 index 934b747ea9..0000000000 --- a/jquery-bootpag/jquery-bootpag-tests.ts +++ /dev/null @@ -1,17 +0,0 @@ -/// -/// - -var pagerSelector = ".bootpager"; -var $pager = $(pagerSelector); - -var pagerOptions: JqueryBootpag.Options = { - total: 15, - page: 1, - maxVisible: 5, - first: "", - last: "", - prev: "", - next: "" -}; - -$pager.bootpag(pagerOptions); \ No newline at end of file diff --git a/jquery-bootpag/jquery-bootpag.d.ts b/jquery-bootpag/jquery-bootpag.d.ts deleted file mode 100644 index c09c67b78c..0000000000 --- a/jquery-bootpag/jquery-bootpag.d.ts +++ /dev/null @@ -1,126 +0,0 @@ -// Type definitions for jQuery-Bootpag 1.0.7 -// Project: http://botmonster.com/jquery-bootpag/ -// Definitions by: MAF.DAP / Romain Deneau -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -declare module JqueryBootpag { - /** - * Bootpag plugin interface options - */ - export interface Options { - /** - * number of pages - */ - total: number; - - /** - * maximum number of visible pages - */ - maxVisible: number; - - /** - * page to show on start - */ - page?: number; - - /** - * next/prev buttons move over one page or maximum visible pages (default true) - */ - leaps?: boolean; - - /** - * next button text (default "»") - */ - next?: string; - - /** - * prev button text (default "«") - */ - prev?: string; - - /** - * template for pagination links (default "javascript:void(0);") - */ - href?: string; - - /** - * variable name in href template for page number (default "{{number}}") - */ - hrefVariable?: string; - - /** - * do we ant first and last (default true) - */ - firstLastUse?: boolean; - - /** - * name of first (default 'FIRST') - */ - first?: string; - - /** - * name of last (default 'LAST') - */ - last?: string; - - /** - * css class for wrap (default 'pagination') - */ - wrapClass?: string; - - /** - * css class for active (default 'active') - */ - activeClass?: string; - - /** - * css class for disabled (default 'disabled') - */ - disabledClass?: string; - - /** - * css class for next (default 'next') - */ - nextClass?: string; - - /** - * css class for prev (default 'prev') - */ - prevClass?: string; - - /** - * css class for last (default 'last') - */ - lastClass?: string; - - /** - * css class for first (default 'first') - */ - firstClass?: string; - } - - /** - * Event handler on page click. - * @param event : JQueryEventObject - * @param pageNumber : number of the clicked page - */ - interface PageEventHandler { - (event: JQueryEventObject, pageNumber: number): any; - } -} - -interface JQuery { - /** - * jQuery Bootpag plugin main method - */ - bootpag(options: JqueryBootpag.Options): JQuery; - - /** - * jQuery Bootpag "page" event occurring on page click. - * @param eventName : always "page" - * @param handler : A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. - */ - on(eventName: "page", handler: JqueryBootpag.PageEventHandler): JQuery; -} \ No newline at end of file