mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Update jQuery UI definitions and tests
This commit is contained in:
+3
-1
@@ -9,4 +9,6 @@
|
||||
*.sln
|
||||
*.csproj
|
||||
*.txt
|
||||
*.map
|
||||
*.map
|
||||
|
||||
_Resharper.DefinitelyTyped
|
||||
Vendored
+249
-232
@@ -23,7 +23,7 @@ interface Widget {
|
||||
widget(): JQuery;
|
||||
|
||||
// Events
|
||||
create?(event: Event, ui): void;
|
||||
create?: (event: Event, ui) => void;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,18 +35,29 @@ interface AccordionOptions {
|
||||
collapsible?: bool;
|
||||
disabled?: bool;
|
||||
event?: string;
|
||||
header?: any; // TODO: Selector
|
||||
header?: string;
|
||||
heightStyle?: string;
|
||||
icons?: any;
|
||||
}
|
||||
|
||||
interface Accordion extends Widget {
|
||||
// Methods
|
||||
interface AccordionUIParams {
|
||||
newHeader: JQuery;
|
||||
oldHeader: JQuery;
|
||||
newPanel: JQuery;
|
||||
oldPanel: JQuery;
|
||||
}
|
||||
|
||||
// Events
|
||||
activate?(event: Event, ui): void;
|
||||
beforeActivate?(event: Event, ui): void;
|
||||
create?(event: Event, ui): void;
|
||||
interface AccordionEvent {
|
||||
(event: Event, ui: AccordionUIParams): void;
|
||||
}
|
||||
|
||||
interface AccordionEvents {
|
||||
activate?: AccordionEvent;
|
||||
beforeActivate?: AccordionEvent;
|
||||
create?: AccordionEvent;
|
||||
}
|
||||
|
||||
interface Accordion extends Widget, AccordionOptions, AccordionEvents {
|
||||
}
|
||||
|
||||
|
||||
@@ -58,25 +69,30 @@ interface AutocompleteOptions {
|
||||
delay?: number;
|
||||
disabled?: bool;
|
||||
minLength?: number;
|
||||
position?: any; // TODO: JqueryPosition
|
||||
position?: string;
|
||||
source?: any; // [], string or ()
|
||||
}
|
||||
|
||||
interface Autocomplete extends Widget {
|
||||
interface AutocompleteUIParams {
|
||||
|
||||
// Methods
|
||||
close();
|
||||
search(value?: string);
|
||||
}
|
||||
|
||||
// Events
|
||||
change?(event: Event, ui): void;
|
||||
close?(event: Event, ui): void;
|
||||
create?(event: Event, ui): void;
|
||||
focus?(event: Event, ui): void;
|
||||
open?(event: Event, ui): void;
|
||||
response?(event: Event, ui): void;
|
||||
search?(event: Event, ui): void;
|
||||
select?(event: Event, ui): void;
|
||||
interface AuotcompleteEvent {
|
||||
(event: Event, ui: AutocompleteUIParams): void;
|
||||
}
|
||||
|
||||
interface AutocompleteEvents {
|
||||
change?: AuotcompleteEvent;
|
||||
close?: AuotcompleteEvent;
|
||||
create?: AuotcompleteEvent;
|
||||
focus?: AuotcompleteEvent;
|
||||
open?: AuotcompleteEvent;
|
||||
response?: AuotcompleteEvent;
|
||||
search?: AuotcompleteEvent;
|
||||
select?: AuotcompleteEvent;
|
||||
}
|
||||
|
||||
interface Autocomplete extends Widget, AutocompleteOptions, AutocompleteEvents {
|
||||
}
|
||||
|
||||
|
||||
@@ -89,13 +105,7 @@ interface ButtonOptions {
|
||||
text?: bool;
|
||||
}
|
||||
|
||||
interface Button extends Widget {
|
||||
|
||||
// Methods
|
||||
refresh();
|
||||
|
||||
// Events
|
||||
create?(event: Event, ui): void;
|
||||
interface Button extends Widget, ButtonOptions {
|
||||
}
|
||||
|
||||
|
||||
@@ -154,19 +164,7 @@ interface DatepickerOptions {
|
||||
yearSuffix?: string;
|
||||
}
|
||||
|
||||
interface Datepicker extends Widget {
|
||||
|
||||
// Methods
|
||||
destroy();
|
||||
dialog(date: any, onSelect?: () => void , settings?: any, pos?: any);
|
||||
getDate(): Date;
|
||||
hide(): void;
|
||||
isDisabled(): bool;
|
||||
refresh(): void;
|
||||
setDate(date: Date): void;
|
||||
show();
|
||||
|
||||
// Events
|
||||
interface Datepicker extends Widget, DatepickerOptions {
|
||||
}
|
||||
|
||||
|
||||
@@ -195,47 +193,43 @@ interface DialogOptions {
|
||||
zIndex?: number;
|
||||
}
|
||||
|
||||
interface Dialog extends Widget {
|
||||
interface DialogUIParams {
|
||||
}
|
||||
|
||||
interface DialogEvent {
|
||||
(event: Event, ui: DialogUIParams): void;
|
||||
}
|
||||
|
||||
interface DialogEvents {
|
||||
beforeClose?: DialogEvent;
|
||||
close?: DialogEvent;
|
||||
create?: DialogEvent;
|
||||
drag?: DialogEvent;
|
||||
dragStart?: DialogEvent;
|
||||
dragStop?: DialogEvent;
|
||||
focus?: DialogEvent;
|
||||
open?: DialogEvent;
|
||||
resize?: DialogEvent;
|
||||
resizeStart?: DialogEvent;
|
||||
resizeStop?: DialogEvent;
|
||||
}
|
||||
|
||||
interface Dialog extends Widget, DialogOptions, DialogEvents {
|
||||
|
||||
// Methods
|
||||
close(): void;
|
||||
destroy(): void;
|
||||
disable(): void;
|
||||
enable(): void;
|
||||
isOpen(): bool;
|
||||
moveToTop(): void;
|
||||
open(): void;
|
||||
option(optionName: string): any;
|
||||
option(): any;
|
||||
option(optionName: string, value: any): void;
|
||||
option(options: any): void;
|
||||
widget(): JQuery;
|
||||
|
||||
// Events
|
||||
beforeClose?(event: Event, ui): void;
|
||||
close?(event: Event, ui): void;
|
||||
create?(event: Event, ui): void;
|
||||
drag?(event: Event, ui): void;
|
||||
dragStart?(event: Event, ui): void;
|
||||
dragStop?(event: Event, ui): void;
|
||||
focus?(event: Event, ui): void;
|
||||
open?(event: Event, ui): void;
|
||||
resize?(event: Event, ui): void;
|
||||
resizeStart?(event: Event, ui): void;
|
||||
resizeStop?(event: Event, ui): void;
|
||||
}
|
||||
|
||||
|
||||
// Draggable //////////////////////////////////////////////////
|
||||
|
||||
interface DraggableEventUIParam {
|
||||
interface DraggableEventUIParams {
|
||||
helper: JQuery;
|
||||
position: { top: number; left: number; };
|
||||
offset: { top: number; left: number; };
|
||||
}
|
||||
|
||||
interface DraggableEvent {
|
||||
(event: Event, ui: DraggableEventUIParam): void;
|
||||
(event: Event, ui: DraggableEventUIParams): void;
|
||||
}
|
||||
|
||||
interface DraggableOptions {
|
||||
@@ -269,15 +263,16 @@ interface DraggableOptions {
|
||||
zIndex?: number;
|
||||
}
|
||||
|
||||
interface Draggable extends Widget {
|
||||
|
||||
// Events
|
||||
interface DraggableEvents {
|
||||
create?: DraggableEvent;
|
||||
start?: DraggableEvent;
|
||||
drag?: DraggableEvent;
|
||||
stop?: DraggableEvent;
|
||||
}
|
||||
|
||||
interface Draggable extends Widget, DraggableOptions, DraggableEvent {
|
||||
}
|
||||
|
||||
|
||||
// Droppable //////////////////////////////////////////////////
|
||||
|
||||
@@ -302,9 +297,7 @@ interface DroppableOptions {
|
||||
tolerance?: string;
|
||||
}
|
||||
|
||||
interface Droppable extends Widget {
|
||||
|
||||
// Events
|
||||
interface DroppableEvents {
|
||||
create?: DroppableEvent;
|
||||
activate?: DroppableEvent;
|
||||
deactivate?: DroppableEvent;
|
||||
@@ -313,6 +306,10 @@ interface Droppable extends Widget {
|
||||
drop?: DroppableEvent;
|
||||
}
|
||||
|
||||
interface Droppable extends Widget, DroppableOptions, DroppableEvents {
|
||||
}
|
||||
|
||||
// TODO ?
|
||||
interface JQueryDatePickerDefaults {
|
||||
closeText: string;
|
||||
prevText: string;
|
||||
@@ -347,27 +344,21 @@ interface MenuOptions {
|
||||
role?: string;
|
||||
}
|
||||
|
||||
interface Menu extends Widget {
|
||||
interface MenuUIParams {
|
||||
}
|
||||
|
||||
// Methods
|
||||
blur(event?: Event): void;
|
||||
collapse(event?: Event): void;
|
||||
blurAll(event?: Event, all?: bool): void;
|
||||
expand(event?: Event): void;
|
||||
focus(event?: Event, item?: JQuery): void;
|
||||
isFirstItem(): bool;
|
||||
isLastItem(): bool;
|
||||
next(event?: Event): void;
|
||||
nextPage(event?: Event): void;
|
||||
previous(event?: Event): void;
|
||||
previousPage(event?: Event): void;
|
||||
select(event?: Event): void;
|
||||
interface MenuEvent {
|
||||
(event: Event, ui: MenuUIParams): void;
|
||||
}
|
||||
|
||||
// Events
|
||||
blur(event: Event, ui): void;
|
||||
create(event: Event, ui): void;
|
||||
focus(event: Event, ui): void;
|
||||
select(event: Event, ui): void;
|
||||
interface MenuEvents {
|
||||
blur?: MenuEvent;
|
||||
create?: MenuEvent;
|
||||
focus?: MenuEvent;
|
||||
select?: MenuEvent;
|
||||
}
|
||||
|
||||
interface Menu extends Widget, MenuOptions, MenuEvents {
|
||||
}
|
||||
|
||||
|
||||
@@ -378,24 +369,20 @@ interface ProgressbarOptions {
|
||||
//value?: number;
|
||||
}
|
||||
|
||||
interface Progressbar extends Widget {
|
||||
interface ProgressbarUIParams {
|
||||
}
|
||||
|
||||
// Methods
|
||||
destroy();
|
||||
disable();
|
||||
enable();
|
||||
option(optionName: string): any;
|
||||
option(): any;
|
||||
option(optionName: string, value: any): void;
|
||||
option(options: any): void;
|
||||
value(): number;
|
||||
value(newValue: number): void;
|
||||
widget(): JQuery;
|
||||
interface ProgressbarEvent {
|
||||
(event: Event, ui: ProgressbarUIParams): void;
|
||||
}
|
||||
|
||||
// Events
|
||||
change(event: Event, ui): void;
|
||||
complete(event: Event, ui): void;
|
||||
create(event: Event, ui): void;
|
||||
interface ProgressbarEvents {
|
||||
change?: ProgressbarEvent;
|
||||
complete?: ProgressbarEvent;
|
||||
create?: ProgressbarEvent;
|
||||
}
|
||||
|
||||
interface Progressbar extends Widget, ProgressbarOptions, ProgressbarEvents {
|
||||
}
|
||||
|
||||
|
||||
@@ -408,13 +395,13 @@ interface ResizableOptions {
|
||||
animateEasing?: string;
|
||||
aspectRatio?: any; // bool or number
|
||||
autoHide?: bool;
|
||||
cancel?: any; // TODO Selector
|
||||
cancel?: string;
|
||||
containment?: any; // Selector, Element or string
|
||||
delay?: number;
|
||||
disabled?: bool;
|
||||
distance?: number;
|
||||
ghost?: bool;
|
||||
grid?: number[];
|
||||
grid?: any;
|
||||
handles?: any; // string or object
|
||||
helper?: string;
|
||||
maxHeight?: number;
|
||||
@@ -423,40 +410,52 @@ interface ResizableOptions {
|
||||
minWidth?: number;
|
||||
}
|
||||
|
||||
interface Resizable extends Widget {
|
||||
interface ResizableUIParams {
|
||||
element: JQuery;
|
||||
helper: JQuery;
|
||||
originalElement: JQuery;
|
||||
originalPosition: any;
|
||||
originalSize: any;
|
||||
position: any;
|
||||
size: any;
|
||||
}
|
||||
|
||||
// Methods
|
||||
interface ResizableEvent {
|
||||
(event: Event, ui: ResizableUIParams): void;
|
||||
}
|
||||
|
||||
// Events
|
||||
resize(event: Event, ui): void;
|
||||
start(event: Event, ui): void;
|
||||
stop(event: Event, ui): void;
|
||||
interface ResizableEvents {
|
||||
resize?: ResizableEvent;
|
||||
start?: ResizableEvent;
|
||||
stop?: ResizableEvent;
|
||||
}
|
||||
|
||||
interface Resizable extends Widget, ResizableOptions, ResizableEvents {
|
||||
}
|
||||
|
||||
|
||||
// Resizable //////////////////////////////////////////////////
|
||||
// Selectable //////////////////////////////////////////////////
|
||||
|
||||
interface SelectableOptions {
|
||||
autoRefresh?: bool;
|
||||
cancel?: any; // TODO Selector
|
||||
cancel?: string;
|
||||
delay?: number;
|
||||
disabled?: bool;
|
||||
distance?: number;
|
||||
filter?: any; // TODO Selector
|
||||
filter?: string;
|
||||
tolerance?: string;
|
||||
}
|
||||
|
||||
interface Selectable extends Widget {
|
||||
interface SelectableEvents {
|
||||
selected? (event: Event, ui: { selected?: Element; }): void;
|
||||
selecting? (event: Event, ui: { selecting?: Element; }): void;
|
||||
start? (event: Event, ui: any): void;
|
||||
stop? (event: Event, ui: any): void;
|
||||
unselected? (event: Event, ui: { unselected: Element; }): void;
|
||||
unselecting? (event: Event, ui: { unselecting: Element; }): void;
|
||||
}
|
||||
|
||||
// Methods
|
||||
|
||||
// Events
|
||||
selected(event: Event, ui): void;
|
||||
selecting(event: Event, ui): void;
|
||||
start(event: Event, ui): void;
|
||||
stop(event: Event, ui): void;
|
||||
unselected(event: Event, ui): void;
|
||||
unselecting(event: Event, ui): void;
|
||||
interface Selectable extends Widget, SelectableOptions, SelectableEvents {
|
||||
}
|
||||
|
||||
// Slider //////////////////////////////////////////////////
|
||||
@@ -473,22 +472,22 @@ interface SliderOptions {
|
||||
// values?: number[];
|
||||
}
|
||||
|
||||
interface Slider extends Widget {
|
||||
interface SliderUIParams {
|
||||
}
|
||||
|
||||
// Methods
|
||||
value(): number;
|
||||
value(newValue: number): void;
|
||||
values(): number[];
|
||||
values(index: number): number;
|
||||
values(index: number, newValue: number): void;
|
||||
values(newValues: number[]): void;
|
||||
interface SliderEvent {
|
||||
(event: Event, ui: SliderUIParams): void;
|
||||
}
|
||||
|
||||
// Events
|
||||
change(event: Event, ui): void;
|
||||
create(event: Event, ui): void;
|
||||
slide(event: Event, ui): void;
|
||||
start(event: Event, ui): void;
|
||||
stop(event: Event, ui): void;
|
||||
interface SliderEvents {
|
||||
change?: SliderEvent;
|
||||
create?: SliderEvent;
|
||||
slide?: SliderEvent;
|
||||
start?: SliderEvent;
|
||||
stop?: SliderEvent;
|
||||
}
|
||||
|
||||
interface Slider extends Widget, SliderOptions, SliderEvents {
|
||||
}
|
||||
|
||||
|
||||
@@ -497,8 +496,8 @@ interface Slider extends Widget {
|
||||
interface SortableOptions {
|
||||
appendTo?: any; // jQuery, Element, Selector or string
|
||||
axis?: string;
|
||||
// cancel?: any; // TODO Selector
|
||||
connectWith?: any; // TODO Selector
|
||||
cancel?: string;
|
||||
connectWith?: string;
|
||||
containment?: any; // Element, Selector or string
|
||||
cursor?: string;
|
||||
cursorAt?: any;
|
||||
@@ -521,27 +520,35 @@ interface SortableOptions {
|
||||
zIndex?: number;
|
||||
}
|
||||
|
||||
interface Sortable extends Widget {
|
||||
interface SortableUIParams {
|
||||
helper: JQuery;
|
||||
item: JQuery;
|
||||
offset: any;
|
||||
position: any;
|
||||
originalPosition: any;
|
||||
sender: JQuery;
|
||||
}
|
||||
|
||||
// Methods
|
||||
cancel(): void;
|
||||
refreshPositions(): void;
|
||||
serialize(options: any): void; // TODO
|
||||
toArray(): string[];
|
||||
interface SortableEvent {
|
||||
(event: Event, ui: SortableUIParams): void;
|
||||
}
|
||||
|
||||
// Events
|
||||
activate(event: Event, ui): void;
|
||||
beforeStop(event: Event, ui): void;
|
||||
change(event: Event, ui): void;
|
||||
deactivate(event: Event, ui): void;
|
||||
out(event: Event, ui): void;
|
||||
over(event: Event, ui): void;
|
||||
receive(event: Event, ui): void;
|
||||
remove(event: Event, ui): void;
|
||||
sort(event: Event, ui): void;
|
||||
start(event: Event, ui): void;
|
||||
stop(event: Event, ui): void;
|
||||
update(event: Event, ui): void;
|
||||
interface SortableEvents {
|
||||
activate?: SortableEvent;
|
||||
beforeStop?: SortableEvent;
|
||||
change?: SortableEvent;
|
||||
deactivate?: SortableEvent;
|
||||
out?: SortableEvent;
|
||||
over?: SortableEvent;
|
||||
receive?: SortableEvent;
|
||||
remove?: SortableEvent;
|
||||
sort?: SortableEvent;
|
||||
start?: SortableEvent;
|
||||
stop?: SortableEvent;
|
||||
update?: SortableEvent;
|
||||
}
|
||||
|
||||
interface Sortable extends Widget, SortableOptions, SortableEvents {
|
||||
}
|
||||
|
||||
|
||||
@@ -559,20 +566,20 @@ interface SpinnerOptions {
|
||||
step?: any; // number or string
|
||||
}
|
||||
|
||||
interface Spinner extends Widget {
|
||||
interface SpinnerUIParams {
|
||||
}
|
||||
|
||||
// Methods
|
||||
pageDown(pages?: number): void;
|
||||
pageUp(pages?: number): void;
|
||||
stepDown(steps?: number): void;
|
||||
stepUp(steps?: number): void;
|
||||
value(): number;
|
||||
value(newValue: number): void;
|
||||
interface SpinnerEvent {
|
||||
(event: Event, ui: SpinnerUIParams): void;
|
||||
}
|
||||
|
||||
// Events
|
||||
spin(event: Event, ui): void;
|
||||
start(event: Event, ui): void;
|
||||
stop(event: Event, ui): void;
|
||||
interface SpinnerEvents {
|
||||
spin?: SpinnerEvent;
|
||||
start?: SpinnerEvent;
|
||||
stop?: SpinnerEvent;
|
||||
}
|
||||
|
||||
interface Spinner extends Widget, SpinnerOptions, SpinnerEvents {
|
||||
}
|
||||
|
||||
|
||||
@@ -588,18 +595,21 @@ interface TabsOptions {
|
||||
show?: any; // bool, number, string or object
|
||||
}
|
||||
|
||||
interface Tabs extends Widget {
|
||||
interface TabsUIParams {
|
||||
}
|
||||
|
||||
// Methods
|
||||
disable(index: any): void;
|
||||
enable(index: any): void;
|
||||
load(index: any): void;
|
||||
interface TabsEvent {
|
||||
(event: Event, ui: TabsUIParams): void;
|
||||
}
|
||||
|
||||
// Events
|
||||
activate(event: Event, ui): void;
|
||||
beforeActivate(event: Event, ui): void;
|
||||
beforeLoad(event: Event, ui): void;
|
||||
load(event: Event, ui): void;
|
||||
interface TabsEvents {
|
||||
activate?: TabsEvent;
|
||||
beforeActivate?: TabsEvent;
|
||||
beforeLoad?: TabsEvent;
|
||||
load?: TabsEvent;
|
||||
}
|
||||
|
||||
interface Tabs extends Widget, TabsOptions, TabsEvents {
|
||||
}
|
||||
|
||||
|
||||
@@ -609,22 +619,26 @@ interface TooltipOptions {
|
||||
content?: any; // () or string
|
||||
disabled?: bool;
|
||||
hide?: any; // bool, number, string or object
|
||||
items?: any; // TODO Selector
|
||||
items?: string;
|
||||
position?: any; // TODO
|
||||
show?: any; // bool, number, string or object
|
||||
tooltipClass?: string;
|
||||
track?: bool;
|
||||
}
|
||||
|
||||
interface Tooltip extends Widget {
|
||||
interface TooltipUIParams {
|
||||
}
|
||||
|
||||
// Methods
|
||||
close(event?: Event): void;
|
||||
open(event?: Event): void;
|
||||
interface TooltipEvent {
|
||||
(event: Event, ui: TooltipUIParams): void;
|
||||
}
|
||||
|
||||
// Events
|
||||
close(event: Event, ui): void;
|
||||
open(event: Event, ui): void;
|
||||
interface TooltipEvents {
|
||||
close?: TooltipEvent;
|
||||
open?: TooltipEvent;
|
||||
}
|
||||
|
||||
interface Tooltip extends Widget, TooltipOptions, TooltipEvents {
|
||||
}
|
||||
|
||||
|
||||
@@ -634,122 +648,125 @@ interface JQuery {
|
||||
|
||||
accordion(): JQuery;
|
||||
accordion(methodName: string): JQuery;
|
||||
accordion(options: DialogOptions): JQuery;
|
||||
accordion(optionLiteral: string, options: DialogOptions): JQuery;
|
||||
accordion(options: AccordionOptions): JQuery;
|
||||
accordion(optionLiteral: string, optionName: string): any;
|
||||
accordion(optionLiteral: string, options: AccordionOptions): any;
|
||||
accordion(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
accordion(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
|
||||
autocomplete(): JQuery;
|
||||
autocomplete(methodName: string): JQuery;
|
||||
autocomplete(options: AutocompleteOptions): JQuery;
|
||||
autocomplete(optionLiteral: string, options: AutocompleteOptions): JQuery;
|
||||
autocomplete(optionLiteral: string, optionName: string): any;
|
||||
autocomplete(optionLiteral: string, options: AutocompleteOptions): any;
|
||||
autocomplete(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
autocomplete(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
button(): JQuery;
|
||||
button(methodName: string): JQuery;
|
||||
button(options: ButtonOptions): JQuery;
|
||||
button(optionLiteral: string, options: ButtonOptions): JQuery;
|
||||
button(optionLiteral: string, optionName: string): any;
|
||||
button(optionLiteral: string, options: ButtonOptions): any;
|
||||
button(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
button(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
buttonset(): JQuery;
|
||||
buttonset(methodName: string): JQuery;
|
||||
buttonset(options: ButtonOptions): JQuery;
|
||||
buttonset(optionLiteral: string, options: ButtonOptions): JQuery;
|
||||
buttonset(optionLiteral: string, optionName: string): any;
|
||||
buttonset(optionLiteral: string, options: ButtonOptions): any;
|
||||
buttonset(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
buttonset(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
datepicker(): JQuery;
|
||||
datepicker(methodName: string): JQuery;
|
||||
datepicker(options: DatepickerOptions): JQuery;
|
||||
datepicker(optionLiteral: string, options: DatepickerOptions): JQuery;
|
||||
datepicker(optionLiteral: string, optionName: string): any;
|
||||
datepicker(optionLiteral: string, options: DatepickerOptions): any;
|
||||
datepicker(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
datepicker(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
dialog(): JQuery;
|
||||
dialog(methodName: string): JQuery;
|
||||
dialog(options: DialogOptions): JQuery;
|
||||
dialog(optionLiteral: string, options: DialogOptions): JQuery;
|
||||
dialog(optionLiteral: string, optionName: string): any;
|
||||
dialog(optionLiteral: string, options: DialogOptions): any;
|
||||
dialog(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
dialog(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
draggable(): JQuery;
|
||||
draggable(methodName: string): JQuery;
|
||||
draggable(options: DraggableOptions): JQuery;
|
||||
draggable(optionLiteral: string, options: DraggableOptions): JQuery;
|
||||
draggable(optionLiteral: string, optionName: string): any;
|
||||
draggable(optionLiteral: string, options: DraggableOptions): any;
|
||||
draggable(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
draggable(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
droppable(): JQuery;
|
||||
droppable(methodName: string): JQuery;
|
||||
droppable(options: DroppableOptions): JQuery;
|
||||
droppable(optionLiteral: string, options: DraggableOptions): JQuery;
|
||||
droppable(optionLiteral: string, optionName: string): any;
|
||||
droppable(optionLiteral: string, options: DraggableOptions): any;
|
||||
droppable(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
droppable(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
menu(): JQuery;
|
||||
menu(methodName: string): JQuery;
|
||||
menu(options: MenuOptions): JQuery;
|
||||
menu(optionLiteral: string, options: MenuOptions): JQuery;
|
||||
menu(optionLiteral: string, optionName: string): any;
|
||||
menu(optionLiteral: string, options: MenuOptions): any;
|
||||
menu(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
menu(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
progressbar(): JQuery;
|
||||
progressbar(methodName: string): JQuery;
|
||||
progressbar(options: Progressbar): JQuery;
|
||||
progressbar(optionLiteral: string, options: Progressbar): JQuery;
|
||||
progressbar(optionLiteral: string, optionName: string): any;
|
||||
progressbar(optionLiteral: string, options: Progressbar): any;
|
||||
progressbar(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
progressbar(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
resizable(): JQuery;
|
||||
resizable(methodName: string): JQuery;
|
||||
resizable(options: ResizableOptions): JQuery;
|
||||
resizable(optionLiteral: string, options: ResizableOptions): JQuery;
|
||||
resizable(optionLiteral: string, optionName: string): any;
|
||||
resizable(optionLiteral: string, options: ResizableOptions): any;
|
||||
resizable(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
resizable(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
selectable(): JQuery;
|
||||
selectable(methodName: string): JQuery;
|
||||
selectable(options: SelectableOptions): JQuery;
|
||||
selectable(optionLiteral: string, options: SelectableOptions): JQuery;
|
||||
selectable(optionLiteral: string, optionName: string): any;
|
||||
selectable(optionLiteral: string, options: SelectableOptions): any;
|
||||
selectable(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
selectable(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
slider(): JQuery;
|
||||
slider(methodName: string): JQuery;
|
||||
slider(options: SliderOptions): JQuery;
|
||||
slider(optionLiteral: string, options: SliderOptions): JQuery;
|
||||
slider(optionLiteral: string, optionName: string): any;
|
||||
slider(optionLiteral: string, options: SliderOptions): any;
|
||||
slider(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
slider(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
sortable(): JQuery;
|
||||
sortable(methodName: string): JQuery;
|
||||
sortable(options: SortableOptions): JQuery;
|
||||
sortable(optionLiteral: string, options: SortableOptions): JQuery;
|
||||
sortable(optionLiteral: string, optionName: string): any;
|
||||
sortable(optionLiteral: string, options: SortableOptions): any;
|
||||
sortable(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
sortable(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
disableSelection();
|
||||
|
||||
spinner(): JQuery;
|
||||
spinner(methodName: string): JQuery;
|
||||
spinner(options: SpinnerOptions): JQuery;
|
||||
spinner(optionLiteral: string, options: SpinnerOptions): JQuery;
|
||||
spinner(optionLiteral: string, optionName: string): any;
|
||||
spinner(optionLiteral: string, options: SpinnerOptions): any;
|
||||
spinner(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
spinner(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
tabs(): JQuery;
|
||||
tabs(methodName: string): JQuery;
|
||||
tabs(options: TabsOptions): JQuery;
|
||||
tabs(optionLiteral: string, options: TabsOptions): JQuery;
|
||||
tabs(optionLiteral: string, optionName: string): any;
|
||||
tabs(optionLiteral: string, options: TabsOptions): any;
|
||||
tabs(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
tabs(optionLiteral: string, optionName: string): JQuery;
|
||||
|
||||
tooltip(): JQuery;
|
||||
tooltip(methodName: string): JQuery;
|
||||
tooltip(options: TooltipOptions): JQuery;
|
||||
tooltip(optionLiteral: string, options: TooltipOptions): JQuery;
|
||||
tooltip(optionLiteral: string, optionName: string): any;
|
||||
tooltip(optionLiteral: string, options: TooltipOptions): any;
|
||||
tooltip(optionLiteral: string, optionName: string, optionValue: any): JQuery;
|
||||
tooltip(optionLiteral: string, optionName: string): JQuery;
|
||||
}
|
||||
|
||||
interface JQueryStatic {
|
||||
|
||||
+305
-14
@@ -1,7 +1,6 @@
|
||||
/// <reference path="../Definitions/jquery-1.8.d.ts" />
|
||||
/// <reference path="../Definitions/jqueryui-1.9.d.ts" />
|
||||
|
||||
declare var $: any;
|
||||
|
||||
function tests_draggable() {
|
||||
|
||||
$("#draggable").draggable({ axis: "y" });
|
||||
@@ -72,8 +71,8 @@ function tests_droppable() {
|
||||
}
|
||||
});
|
||||
|
||||
var $gallery = $("#gallery"),
|
||||
$trash = $("#trash");
|
||||
var $gallery = $("#gallery"),
|
||||
$trash = $("#trash");
|
||||
$("li", $gallery).draggable({
|
||||
cancel: "a.ui-icon",
|
||||
revert: "invalid",
|
||||
@@ -251,22 +250,292 @@ var $gallery = $("#gallery"),
|
||||
|
||||
|
||||
function tests_resizable() {
|
||||
|
||||
$("#resizable").resizable();
|
||||
$("#resizable").resizable({
|
||||
animate: true
|
||||
});
|
||||
$("#resizable").resizable({
|
||||
containment: "#container"
|
||||
});
|
||||
$("#resizable").resizable({
|
||||
delay: 1000
|
||||
});
|
||||
$("#resizable2").resizable({
|
||||
distance: 40
|
||||
});
|
||||
$("#resizable").resizable({
|
||||
helper: "ui-resizable-helper"
|
||||
});
|
||||
$("#resizable").resizable({
|
||||
maxHeight: 250,
|
||||
maxWidth: 350,
|
||||
minHeight: 150,
|
||||
minWidth: 200
|
||||
});
|
||||
$("#resizable").resizable({
|
||||
aspectRatio: 16 / 9
|
||||
});
|
||||
$("#resizable").resizable({
|
||||
grid: 50
|
||||
});
|
||||
$("#resizable").resizable({
|
||||
alsoResize: "#also"
|
||||
});
|
||||
$("#also").resizable();
|
||||
$("#resizable").resizable({
|
||||
handles: "se"
|
||||
});
|
||||
$("#resizable").resizable({
|
||||
ghost: true
|
||||
});
|
||||
$(".selector").resizable({ alsoResize: "#mirror" });
|
||||
var alsoResize = $(".selector").resizable("option", "alsoResize");
|
||||
$(".selector").resizable("option", "alsoResize", "#mirror");
|
||||
$(".selector").resizable({ animate: true });
|
||||
var animate = $(".selector").resizable("option", "animate");
|
||||
$(".selector").resizable("option", "animate", true);
|
||||
$(".selector").resizable({ animateDuration: "fast" });
|
||||
var animateDuration = $(".selector").resizable("option", "animateDuration");
|
||||
$(".selector").resizable("option", "animateDuration", "fast");
|
||||
$(".selector").resizable({ animateEasing: "easeOutBounce" });
|
||||
var animateEasing = $(".selector").resizable("option", "animateEasing");
|
||||
$(".selector").resizable("option", "animateEasing", "easeOutBounce");
|
||||
$(".selector").resizable({ aspectRatio: true });
|
||||
var aspectRatio = $(".selector").resizable("option", "aspectRatio");
|
||||
$(".selector").resizable("option", "aspectRatio", true);
|
||||
$(".selector").resizable({ autoHide: true });
|
||||
var autoHide = $(".selector").resizable("option", "autoHide");
|
||||
$(".selector").resizable("option", "autoHide", true);
|
||||
$(".selector").resizable({ cancel: ".cancel" });
|
||||
var cancel = $(".selector").resizable("option", "cancel");
|
||||
$(".selector").resizable("option", "cancel", ".cancel");
|
||||
$(".selector").resizable({ containment: "parent" });
|
||||
var containment = $(".selector").resizable("option", "containment");
|
||||
$(".selector").resizable("option", "containment", "parent");
|
||||
$(".selector").resizable({ delay: 150 });
|
||||
var delay = $(".selector").resizable("option", "delay");
|
||||
$(".selector").resizable("option", "delay", 150);
|
||||
$(".selector").resizable({ disabled: true });
|
||||
var disabled = $(".selector").resizable("option", "disabled");
|
||||
$(".selector").resizable("option", "disabled", true);
|
||||
$(".selector").resizable({ distance: 30 });
|
||||
var distance = $(".selector").resizable("option", "distance");
|
||||
$(".selector").resizable("option", "distance", 30);
|
||||
$(".selector").resizable({ ghost: true });
|
||||
var ghost = $(".selector").resizable("option", "ghost");
|
||||
$(".selector").resizable("option", "ghost", true);
|
||||
$(".selector").resizable({ grid: [20, 10] });
|
||||
var grid = $(".selector").resizable("option", "grid");
|
||||
$(".selector").resizable("option", "grid", [20, 10]);
|
||||
$(".selector").resizable({ handles: "n, e, s, w" });
|
||||
var handles = $(".selector").resizable("option", "handles");
|
||||
$(".selector").resizable("option", "handles", "n, e, s, w");
|
||||
$(".selector").resizable({ helper: "resizable-helper" });
|
||||
var helper = $(".selector").resizable("option", "helper");
|
||||
$(".selector").resizable("option", "helper", "resizable-helper");
|
||||
$(".selector").resizable({ maxHeight: 300 });
|
||||
var maxHeight = $(".selector").resizable("option", "maxHeight");
|
||||
$(".selector").resizable("option", "maxHeight", 300);
|
||||
$(".selector").resizable({ maxWidth: 300 });
|
||||
var maxWidth = $(".selector").resizable("option", "maxWidth");
|
||||
$(".selector").resizable("option", "maxWidth", 300);
|
||||
$(".selector").resizable({ minHeight: 150 });
|
||||
var minHeight = $(".selector").resizable("option", "minHeight");
|
||||
$(".selector").resizable("option", "minHeight", 150);
|
||||
$(".selector").resizable({ minWidth: 150 });
|
||||
var minWidth = $(".selector").resizable("option", "minWidth");
|
||||
$(".selector").resizable("option", "minWidth", 150);
|
||||
$(".selector").resizable("option", "disabled", true);
|
||||
$(".selector").resizable("option", { disabled: true });
|
||||
var widget = $(".selector").resizable("widget");
|
||||
}
|
||||
|
||||
|
||||
function tests_selectable() {
|
||||
|
||||
$("#selectable").selectable();
|
||||
$("#selectable").selectable({
|
||||
stop: function () {
|
||||
var result = $("#select-result").empty();
|
||||
$(".ui-selected", this).each(function () {
|
||||
var index = $("#selectable li").index(this);
|
||||
result.append(" #" + (index + 1));
|
||||
});
|
||||
}
|
||||
});
|
||||
$(".selector").selectable({ autoRefresh: false });
|
||||
var autoRefresh = $(".selector").selectable("option", "autoRefresh");
|
||||
$(".selector").selectable("option", "autoRefresh", false);
|
||||
$(".selector").selectable({ cancel: "input,textarea,button,select,option" });
|
||||
var cancel = $(".selector").selectable("option", "cancel");
|
||||
$(".selector").selectable("option", "cancel", "input,textarea,button,select,option");
|
||||
$(".selector").selectable({ delay: 150 });
|
||||
var delay = $(".selector").selectable("option", "delay");
|
||||
$(".selector").selectable("option", "delay", 150);
|
||||
$(".selector").selectable({ disabled: true });
|
||||
var disabled = $(".selector").selectable("option", "disabled");
|
||||
$(".selector").selectable("option", "disabled", true);
|
||||
$(".selector").selectable({ distance: 30 });
|
||||
var distance = $(".selector").selectable("option", "distance");
|
||||
$(".selector").selectable("option", "distance", 30);
|
||||
$(".selector").selectable({ filter: "li" });
|
||||
var filter = $(".selector").selectable("option", "filter");
|
||||
$(".selector").selectable("option", "filter", "li");
|
||||
$(".selector").selectable({ tolerance: "fit" });
|
||||
var tolerance = $(".selector").selectable("option", "tolerance");
|
||||
$(".selector").selectable("option", "tolerance", "fit");
|
||||
$(".selector").selectable("destroy");
|
||||
var isDisabled = $(".selector").selectable("option", "disabled");
|
||||
var options = $(".selector").selectable("option");
|
||||
$(".selector").selectable("option", "disabled", true);
|
||||
$(".selector").selectable("option", { disabled: true });
|
||||
$(".selector").selectable("option", { disabled: true });
|
||||
$(".selector").selectable("refresh");
|
||||
var widget = $(".selector").selectable("widget");
|
||||
}
|
||||
|
||||
|
||||
function tests_sortable() {
|
||||
|
||||
$("#sortable").sortable();
|
||||
$("#sortable").disableSelection();
|
||||
$("#sortable1, #sortable2").sortable({
|
||||
connectWith: ".connectedSortable"
|
||||
}).disableSelection();
|
||||
$("#sortable1, #sortable2").sortable().disableSelection();
|
||||
var $tabs = $("#tabs").tabs();
|
||||
var $tab_items = $("ul:first li", $tabs).droppable({
|
||||
accept: ".connectedSortable li",
|
||||
hoverClass: "ui-state-hover",
|
||||
drop: function (event, ui) {
|
||||
var $item = $(this);
|
||||
var $list = $($item.find("a").attr("href"))
|
||||
.find(".connectedSortable");
|
||||
ui.draggable.hide("slow", function () {
|
||||
$tabs.tabs("select", $tab_items.index($item));
|
||||
$(this).appendTo($list).show("slow");
|
||||
});
|
||||
}
|
||||
});
|
||||
$("#sortable1").sortable({
|
||||
delay: 300
|
||||
});
|
||||
$("#sortable2").sortable({
|
||||
distance: 15
|
||||
});
|
||||
$("li").disableSelection();
|
||||
$("#sortable").sortable({
|
||||
placeholder: "ui-state-highlight"
|
||||
});
|
||||
$("ul.droptrue").sortable({
|
||||
connectWith: "ul"
|
||||
});
|
||||
$("ul.dropfalse").sortable({
|
||||
connectWith: "ul",
|
||||
dropOnEmpty: false
|
||||
});
|
||||
$("#sortable1").sortable({
|
||||
items: "li:not(.ui-state-disabled)"
|
||||
});
|
||||
$("#sortable2").sortable({
|
||||
cancel: ".ui-state-disabled"
|
||||
});
|
||||
$(".column").sortable({
|
||||
connectWith: ".column"
|
||||
});
|
||||
$(".portlet").addClass("ui-widget ui-widget-content ui-helper-clearfix ui-corner-all")
|
||||
.find(".portlet-header")
|
||||
.addClass("ui-widget-header ui-corner-all")
|
||||
.prepend("<span class='ui-icon ui-icon-minusthick'></span>")
|
||||
.end()
|
||||
.find(".portlet-content");
|
||||
$(".portlet-header .ui-icon").click(function () {
|
||||
$(this).toggleClass("ui-icon-minusthick").toggleClass("ui-icon-plusthick");
|
||||
$(this).parents(".portlet:first").find(".portlet-content").toggle();
|
||||
});
|
||||
$(".selector").sortable({ appendTo: document.body });
|
||||
var appendTo = $(".selector").sortable("option", "appendTo");
|
||||
$(".selector").sortable("option", "appendTo", document.body);
|
||||
$(".selector").sortable({ axis: "x" });
|
||||
var axis = $(".selector").sortable("option", "axis");
|
||||
$(".selector").sortable("option", "axis", "x");
|
||||
$(".selector").sortable({ cancel: "a,button" });
|
||||
var cancel = $(".selector").sortable("option", "cancel");
|
||||
$(".selector").sortable("option", "cancel", "a,button");
|
||||
$(".selector").sortable({ connectWith: "#shopping-cart" });
|
||||
var connectWith = $(".selector").sortable("option", "connectWith");
|
||||
$(".selector").sortable("option", "connectWith", "#shopping-cart");
|
||||
$(".selector").sortable({ containment: "parent" });
|
||||
var containment = $(".selector").sortable("option", "containment");
|
||||
$(".selector").sortable("option", "containment", "parent");
|
||||
$(".selector").sortable({ cursor: "move" });
|
||||
var cursor = $(".selector").sortable("option", "cursor");
|
||||
$(".selector").sortable("option", "cursor", "move");
|
||||
$(".selector").sortable({ cursorAt: { left: 5 } });
|
||||
var cursorAt = $(".selector").sortable("option", "cursorAt");
|
||||
$(".selector").sortable("option", "cursorAt", { left: 5 });
|
||||
$(".selector").sortable({ delay: 150 });
|
||||
var delay = $(".selector").sortable("option", "delay");
|
||||
$(".selector").sortable("option", "delay", 150);
|
||||
$(".selector").sortable({ disabled: true });
|
||||
var disabled = $(".selector").sortable("option", "disabled");
|
||||
$(".selector").sortable("option", "disabled", true);
|
||||
$(".selector").sortable({ distance: 5 });
|
||||
var distance = $(".selector").sortable("option", "distance");
|
||||
$(".selector").sortable("option", "distance", 5);
|
||||
$(".selector").sortable({ dropOnEmpty: false });
|
||||
var dropOnEmpty = $(".selector").sortable("option", "dropOnEmpty");
|
||||
$(".selector").sortable("option", "dropOnEmpty", false);
|
||||
$(".selector").sortable({ forceHelperSize: true });
|
||||
var forceHelperSize = $(".selector").sortable("option", "forceHelperSize");
|
||||
$(".selector").sortable("option", "forceHelperSize", true);
|
||||
$(".selector").sortable({ forcePlaceholderSize: true });
|
||||
var forcePlaceholderSize = $(".selector").sortable("option", "forcePlaceholderSize");
|
||||
$(".selector").sortable("option", "forcePlaceholderSize", true);
|
||||
$(".selector").sortable({ grid: [20, 10] });
|
||||
var grid = $(".selector").sortable("option", "grid");
|
||||
$(".selector").sortable("option", "grid", [20, 10]);
|
||||
$(".selector").sortable({ handle: ".handle" });
|
||||
var handle = $(".selector").sortable("option", "handle");
|
||||
$(".selector").sortable("option", "handle", ".handle");
|
||||
$(".selector").sortable({ helper: "clone" });
|
||||
var helper = $(".selector").sortable("option", "helper");
|
||||
$(".selector").sortable("option", "helper", "clone");
|
||||
$(".selector").sortable({ items: "> li" });
|
||||
var items = $(".selector").sortable("option", "items");
|
||||
$(".selector").sortable("option", "items", "> li");
|
||||
$(".selector").sortable({ opacity: 0.5 });
|
||||
var opacity = $(".selector").sortable("option", "opacity");
|
||||
$(".selector").sortable("option", "opacity", 0.5);
|
||||
$(".selector").sortable({ placeholder: "sortable-placeholder" });
|
||||
var placeholder = $(".selector").sortable("option", "placeholder");
|
||||
$(".selector").sortable("option", "placeholder", "sortable-placeholder");
|
||||
$(".selector").sortable({ revert: true });
|
||||
var revert = $(".selector").sortable("option", "revert");
|
||||
$(".selector").sortable("option", "revert", true);
|
||||
$(".selector").sortable({ scroll: false });
|
||||
var scroll = $(".selector").sortable("option", "scroll");
|
||||
$(".selector").sortable("option", "scroll", false);
|
||||
$(".selector").sortable({ scrollSensitivity: 10 });
|
||||
var scrollSensitivity = $(".selector").sortable("option", "scrollSensitivity");
|
||||
$(".selector").sortable("option", "scrollSensitivity", 10);
|
||||
$(".selector").sortable({ scrollSpeed: 40 });
|
||||
var scrollSpeed = $(".selector").sortable("option", "scrollSpeed");
|
||||
$(".selector").sortable("option", "scrollSpeed", 40);
|
||||
$(".selector").sortable({ tolerance: "pointer" });
|
||||
var tolerance = $(".selector").sortable("option", "tolerance");
|
||||
$(".selector").sortable("option", "tolerance", "pointer");
|
||||
$(".selector").sortable({ zIndex: 9999 });
|
||||
var zIndex = $(".selector").sortable("option", "zIndex");
|
||||
$(".selector").sortable("option", "zIndex", 9999);
|
||||
var sorted = $(".selector").sortable("serialize", { key: "sort" });
|
||||
var sortedIDs = $(".selector").sortable("toArray");
|
||||
var widget = $(".selector").sortable("widget");
|
||||
}
|
||||
|
||||
|
||||
function tests_accordion() {
|
||||
|
||||
$("#accordion").accordion();
|
||||
|
||||
$("#accordion").accordion({ collapsible: true });
|
||||
var icons = {
|
||||
header: "ui-icon-circle-arrow-e",
|
||||
@@ -302,7 +571,32 @@ function tests_accordion() {
|
||||
ui.item.children("h3").triggerHandler("focusout");
|
||||
}
|
||||
});
|
||||
|
||||
$(".selector").accordion({ active: 2 });
|
||||
var active = $(".selector").accordion("option", "active");
|
||||
$(".selector").accordion("option", "active", 2);
|
||||
$(".selector").accordion({ animate: "bounceslide" });
|
||||
var animate = $(".selector").accordion("option", "animate");
|
||||
$(".selector").accordion("option", "animate", "bounceslide");
|
||||
$(".selector").accordion({ collapsible: true });
|
||||
var collapsible = $(".selector").accordion("option", "collapsible");
|
||||
$(".selector").accordion("option", "collapsible", true);
|
||||
$(".selector").accordion({ disabled: true });
|
||||
var disabled = $(".selector").accordion("option", "disabled");
|
||||
$(".selector").accordion("option", "disabled", true);
|
||||
$(".selector").accordion({ event: "mouseover" });
|
||||
var event = $(".selector").accordion("option", "event");
|
||||
$(".selector").accordion("option", "event", "mouseover");
|
||||
$(".selector").accordion({ header: "h3" });
|
||||
var header = $(".selector").accordion("option", "header");
|
||||
$(".selector").accordion("option", "header", "h3");
|
||||
$(".selector").accordion({ heightStyle: "fill" });
|
||||
var heightStyle = $(".selector").accordion("option", "heightStyle");
|
||||
$(".selector").accordion("option", "heightStyle", "fill");
|
||||
$(".selector").accordion({ icons: { "header": "ui-icon-plus", "headerSelected": "ui-icon-minus" } });
|
||||
var icons = $(".selector").accordion("option", "icons");
|
||||
$(".selector").accordion("option", "icons", { "header": "ui-icon-plus", "headerSelected": "ui-icon-minus" });
|
||||
var isDisabled = $(".selector").accordion("option", "disabled");
|
||||
$(".selector").accordion("option", { disabled: true });
|
||||
}
|
||||
|
||||
function tests_autocomplete() {
|
||||
@@ -529,12 +823,12 @@ function tests_autocomplete() {
|
||||
.autocomplete({
|
||||
source: (request, response) => {
|
||||
$.getJSON("search.php", {
|
||||
term: extractLast(request.term)
|
||||
term: null
|
||||
}, response);
|
||||
},
|
||||
search: () => {
|
||||
// custom minLength
|
||||
var term = extractLast(this.value);
|
||||
var term = null
|
||||
if (term.length < 2) {
|
||||
return false;
|
||||
}
|
||||
@@ -555,10 +849,7 @@ function tests_autocomplete() {
|
||||
})
|
||||
.autocomplete({
|
||||
minLength: 0,
|
||||
source: (request, response) => {
|
||||
response($.ui.autocomplete.filter(
|
||||
availableTags, extractLast(request.term)));
|
||||
},
|
||||
source: (request, response) => { },
|
||||
focus: () => {
|
||||
return false;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user