mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-16 22:40:01 +08:00
Merge pull request #406 from sumegizoltan/master
New definition of jquery.tagsmanager plugin.
This commit is contained in:
83
jquery.tagsmanager/jquery.tagsmanager.d.ts
vendored
83
jquery.tagsmanager/jquery.tagsmanager.d.ts
vendored
@@ -4,28 +4,69 @@
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../jquery/jquery.d.ts"/>
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user