Skip to content

Commit

Permalink
w2ui: fixed onClick issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Ptival committed Mar 8, 2016
1 parent 7e74a9a commit b6c5af3
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions w2ui/w2ui.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ declare module W2UI {
interface Records { }
}

interface W2Grid extends W2Common {
interface W2Grid extends W2Common, W2OnClickable {
autoLoad: boolean;
buttons: Object;
columnGroups: Object[];
Expand Down Expand Up @@ -250,7 +250,7 @@ declare module W2UI {
unselect(...recids: string[]): number;
}

interface W2Toolbar extends W2Common {
interface W2Toolbar extends W2Common, W2OnClickable {
items: W2Item[];
right: string;
routeData: string;
Expand All @@ -270,7 +270,7 @@ declare module W2UI {
uncheck(...ids: string[]): number;
}

interface W2Sidebar extends W2Common {
interface W2Sidebar extends W2Common, W2OnClickable {
bottomHTML: string;
icon: string;
img: string;
Expand Down Expand Up @@ -316,7 +316,7 @@ declare module W2UI {
unselect(id: string): boolean;
}

interface W2Tabs extends W2Common {
interface W2Tabs extends W2Common, W2OnClickable {
active: string;
right: string;
routeData: string;
Expand All @@ -330,7 +330,6 @@ declare module W2UI {
get(id: string, returnIndex?: boolean): Object | number | void;
hide(...ids: string[]): number;
insert(before: string, tabs: Object | Object[]): void;
onClick(event: Object): void;
remove(...ids: string[]): number;
select(id: string): boolean;
set(id: string, tab: Object): boolean;
Expand Down Expand Up @@ -400,4 +399,9 @@ declare module W2UI {
unlockScreen(): void;
}

interface W2OnClickable {
onClick(event: W2Event): void;
onClick(id: string, data: W2Event): void;
}

}

0 comments on commit b6c5af3

Please sign in to comment.