mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-05 01:30:17 +00:00
Merge pull request #247 from vbortone/feature/jquery.tagsmanager
Tags Manager type definitions and tests
This commit is contained in:
21
jquery.tagsmanager/jquery.tagsmanager-tests.ts
Normal file
21
jquery.tagsmanager/jquery.tagsmanager-tests.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
/// <reference path="../jquery/jquery.d.ts"/>
|
||||
/// <reference path="jquery.tagsmanager.d.ts" />
|
||||
|
||||
var options: TagsManagerOptions = {
|
||||
prefilled: ["Pisa", "Rome"],
|
||||
CapitalizeFirstLetter: true,
|
||||
preventSubmitOnEnter: true,
|
||||
typeahead: true,
|
||||
typeaheadAjaxSource: null,
|
||||
typeaheadSource: ["Pisa", "Rome", "Milan", "Florence", "New York", "Paris", "Berlin", "London", "Madrid"],
|
||||
delimeters: [44, 188, 13],
|
||||
backspace: [8],
|
||||
blinkBGColor_1: '#FFFF9C',
|
||||
blinkBGColor_2: '#CDE69C',
|
||||
hiddenTagListName: 'hiddenTagListA'
|
||||
};
|
||||
|
||||
jQuery(".tagManager").tagsManager(options);
|
||||
jQuery(".tagManager").tagsManager('popTag');
|
||||
jQuery(".tagManager").tagsManager('pushTag', 'I_am_a_new_tag');
|
||||
jQuery(".tagManager").tagsManager('empty');
|
||||
31
jquery.tagsmanager/jquery.tagsmanager.d.ts
vendored
Normal file
31
jquery.tagsmanager/jquery.tagsmanager.d.ts
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
// Type definitions for jQuery Tags Manager
|
||||
// Project: http://welldonethings.com/tags/manager
|
||||
// Definitions by: https://github.com/vbortone
|
||||
// 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 JQuery {
|
||||
tagsManager(options: TagsManagerOptions): JQuery;
|
||||
tagsManager(command: string, tagToManipulate?: string): JQuery;
|
||||
}
|
||||
Reference in New Issue
Block a user