// Type definitions for jquery.dynagrid 1.2 // Project: http://code.google.com/p/dynatree/ // Definitions by: https://github.com/fdecampredon // Definitions: https://github.com/borisyankov/DefinitelyTyped interface JQuery { dynatree(options?: DynatreeOptions): DynaTree; dynatree(option?: string, ...rest: any[]): any; } interface JQueryStatic { ui: { dynatree: DynatreeNamespace; }; } interface DynaTree { activateKey(key: string): DynaTreeNode; count(): number; enable(): void; disable(): void; enableUpdate(enable: bool): void; getActiveNode(): DynaTreeNode; getNodeByKey(key: string): DynaTreeNode; getPersistData(): any; getRoot(): DynaTreeNode; getSelectedNodes(stopOnParents: bool): DynaTreeNode[]; initialize(): void; isInitializing(): bool; isReloading(): bool; isUserEvent(): bool; loadKeyPath(keyPath: string, callback: (node: DynaTreeNode, status: string) =>void ): void; reactivate(setFocus: bool): void; redraw(): void; reload(): void; renderInvisibleNodes(): void; selectKey(key: string, flag: string): DynaTreeNode; serializeArray(stopOnParents: bool): any[]; toDict(): any; visit(fn: (node: DynaTreeNode) =>bool, includeRoot: bool): void; } interface DynaTreeNode { data: DynaTreeDataModel; activate(): void; activateSilently(): void; addChild(nodeData: DynaTreeDataModel, beforeNode?: DynaTreeNode): void; addChild(nodeData: DynaTreeDataModel[], beforeNode?: DynaTreeNode): void; appendAjax(ajaxOptions: JQueryAjaxSettings): void; countChildren(): number; deactivate(): void; expand(flag: string): void; focus(): void; getChildren(): DynaTreeNode[]; getEventTargetType(event: Event): string; getLevel(): number; getNextSibling(): DynaTreeNode; getParent(): DynaTreeNode; getPrevSibling(): DynaTreeNode; hasChildren(): bool; isActive(): bool; isChildOf(otherNode: DynaTreeNode): bool; isDescendantOf(otherNode: DynaTreeNode): bool; isExpanded(): bool; isFirstSibling(): bool; isFocused(): bool; isLastSibling(): bool; isLazy(): bool; isLoading(): bool; isSelected(): bool; isStatusNode(): bool; isVisible(): bool; makeVisible(): bool; move(targetNode: DynaTreeNode, mode: string): bool; reload(force: bool): void; remove(): void; removeChildren(): void; render(useEffects: bool, includeInvisible: bool): void; resetLazy(): void; scheduleAction(mode: string, ms: number); select(flag: string): void; setLazyNodeStatus(status: number): void; setTitle(title: string): void; sortChildren(cmp?: (a: DynaTreeNode, b: DynaTreeNode) =>number, deep?: bool); toDict(recursive: bool, callback?: (node: any) =>any): any; toggleExpand(): void; toggleSelect(): void; visit(fn: (node: DynaTreeNode) =>bool, includeSelf: bool): void; visitParents(fn: (node: DynaTreeNode) =>bool, includeSelf: bool): void; } interface DynatreeOptions { title?: string; // Tree's name (only used for debug outpu) minExpandLevel?: number; // 1: root node is not collapsible imagePath?: string; // Path to a folder containing icons. Defaults to 'skin/' subdirectory. children?: DynaTreeDataModel[]; // Init tree structure from this object array. initId?: string; // Init tree structure from a