From e34b7108c6d98c7cc7ca3111dbaea9aaa0147ff3 Mon Sep 17 00:00:00 2001 From: sumegizoltan Date: Tue, 19 Mar 2013 15:55:27 +0100 Subject: [PATCH 1/2] New definition of jquery.tagsmanager plugin. --- jquery.tagsmanager/jquery.tagsmanager.d.ts | 83 ++++++++++++++++------ 1 file changed, 62 insertions(+), 21 deletions(-) diff --git a/jquery.tagsmanager/jquery.tagsmanager.d.ts b/jquery.tagsmanager/jquery.tagsmanager.d.ts index f9eda35a60..298e5b66ad 100644 --- a/jquery.tagsmanager/jquery.tagsmanager.d.ts +++ b/jquery.tagsmanager/jquery.tagsmanager.d.ts @@ -1,31 +1,72 @@ // Type definitions for jQuery Tags Manager // Project: http://welldonethings.com/tags/manager -// Definitions by: https://github.com/vbortone +// Definitions by: https://github.com/max-favilli // Definitions: https://github.com/borisyankov/DefinitelyTyped /// -interface TagsManagerOptions { - prefilled?: any; - CapitalizeFirstLetter?: bool; - preventSubmitOnEnter?: bool; - typeahead?: bool; - typeaheadAjaxSource?: string; - typeaheadSource?: any; - typeaheadAjaxPolling?: bool; - AjaxPush?: string; //url - delimeters?: number[]; - backspace?: number[]; - blinkBGColor_1?: string; - blinkBGColor_2?: string; - hiddenTagListName?: string; - maxTags?: number; - deleteTagsOnBackspace?: bool; - tagsContainer?: HTMLElement; - tagCloseIcon?: string; - tagClass?: string; + +interface ITagsManagerOptions { + prefilled?: any; + CapitalizeFirstLetter?: bool; + preventSubmitOnEnter?: bool; + isClearInputOnEsc?: bool; + typeahead?: bool; + typeaheadAjaxSource?: string; + typeaheadAjaxPolling?: bool; + typeaheadDelegate?: Function; + typeaheadOverrides?: ITypeaheadOverrides; + typeaheadSource?: any; + AjaxPush?: string; //url + delimeters?: number[]; + backspace?: number[]; + maxTags?: number; + blinkBGColor_1?: string; + blinkBGColor_2?: string; + hiddenTagListName?: string; + hiddenTagListId?: string; + deleteTagsOnBackspace?: bool; + tagsContainer?: HTMLElement; + tagCloseIcon?: string; + tagClass?: string; + validator: Function; +} + +interface ITypeaheadOverrides { + instanceSelectHandler?: Function; + selectedClass?: string; + select?: Function; +} + +interface ITagsManager { + tagManagerOptions: ITagsManagerOptions; + obj: JQuery; + objName: string; + queuedTag: string; + delimeters: number[]; + backspace: number[]; + tagToManipulate: string; + + initialize(context: JQuery, + options?: ITagsManagerOptions, + tagToManipulate?: string): void; + setupTypeahead(): void; + onTypeaheadAjaxSuccess(data: any, isSetTypeaheadSource: bool, process?: Function): void; + ajaxPolling(query: string, process: Function): void; + setTypeaheadSource(source: any): void; + trimTag(tag: string): string; + popTag(): void; + empty(): void; + refreshHiddenTagList(): void; + spliceTag(tagId: number, eventData: any): void; + pushTag(tag: string, objToPush: any, isValid: bool): void; + + setOptions(options: ITagsManagerOptions): void; + setContext(context: JQuery, tagToManipulate?: string): void; + processCommand(context: JQuery, command: string, tagToManipulate?: string): JQuery; + processTags(command?: string, context?: JQuery, tagToManipulate?: string): JQuery; } interface JQuery { - tagsManager(options: TagsManagerOptions): JQuery; + tagsManager(options?: ITagsManagerOptions): JQuery; tagsManager(command: string, tagToManipulate?: string): JQuery; } \ No newline at end of file From 1756c43a2d03aeca4e0cf69541a2b77886615077 Mon Sep 17 00:00:00 2001 From: Zoltan Sumegi Date: Sun, 24 Mar 2013 22:59:05 +0100 Subject: [PATCH 2/2] Update jquery.tagsmanager.d.ts --- jquery.tagsmanager/jquery.tagsmanager.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jquery.tagsmanager/jquery.tagsmanager.d.ts b/jquery.tagsmanager/jquery.tagsmanager.d.ts index 298e5b66ad..ff5549cea8 100644 --- a/jquery.tagsmanager/jquery.tagsmanager.d.ts +++ b/jquery.tagsmanager/jquery.tagsmanager.d.ts @@ -1,6 +1,6 @@ // Type definitions for jQuery Tags Manager // Project: http://welldonethings.com/tags/manager -// Definitions by: https://github.com/max-favilli +// Definitions by: https://github.com/vbortone // Definitions: https://github.com/borisyankov/DefinitelyTyped /// @@ -69,4 +69,4 @@ interface ITagsManager { interface JQuery { tagsManager(options?: ITagsManagerOptions): JQuery; tagsManager(command: string, tagToManipulate?: string): JQuery; -} \ No newline at end of file +}