Skip to content

Commit b89dbce

Browse files
committed
fix kanban
1 parent 9c30216 commit b89dbce

File tree

4 files changed

+273
-26
lines changed

4 files changed

+273
-26
lines changed

demos/kanban/defaultfunctionality/App.razor

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@
248248
},
249249
new Dictionary<string, object>
250250
{
251-
{ "id", 5 }, { "name", "Michael Buchanan" }, { "image", "../images/Michael.png" }
251+
{ "id", 5 }, { "name", "Michael Buchanan" }, { "image", "../images/michael.png" }
252252
},
253253
new Dictionary<string, object>
254254
{
@@ -260,11 +260,11 @@
260260
},
261261
new Dictionary<string, object>
262262
{
263-
{ "id", 8 }, { "name", "Laura Buchanan" }, { "image", "../images/Laura.png" }
263+
{ "id", 8 }, { "name", "Laura Buchanan" }, { "image", "../images/laura.png" }
264264
},
265265
new Dictionary<string, object>
266266
{
267-
{ "id", 9 }, { "name", "Anna Short" }, { "image", "../images/Anne.png" }
267+
{ "id", 9 }, { "name", "Anna Short" }, { "image", "../images/anne.png" }
268268
}
269269
}
270270
}

dev-project/App.razor

Lines changed: 267 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,279 @@
1-
<JqxColorPicker @ref="myColorPicker"
2-
width=250 height=250>
3-
</JqxColorPicker>
1+
<div style="width:800px; height: 600px;">
2+
<JqxSplitter panels=splitterPanels1>
3+
<div>
4+
<JqxKanban
5+
id="myKanban1"
6+
width=size height=size source=source1
7+
columns=columns1 connectWith="#myKanban2, #myKanban3"
8+
resources=resourcesSource>
9+
</JqxKanban>
10+
</div>
411

5-
<div style="margin-top: 20px">
6-
<div style="margin-bottom: 5px">Color Modes</div>
12+
<div>
13+
<JqxSplitter orientation=orientation panels=splitterPanels2>
14+
<div>
15+
<JqxKanban
16+
id="myKanban2"
17+
width=size height=size source=source2
18+
columns=columns2 connectWith="#myKanban1, #myKanban3"
19+
resources=resourcesSource>
20+
</JqxKanban>
21+
</div>
722

8-
<JqxRadioButton onChecked=onChecked isChecked=true>
9-
Saturation Color Mode
10-
</JqxRadioButton>
11-
12-
<JqxRadioButton @ref="hueModeBtn" onChecked=onChecked>
13-
Hue Color Mode
14-
</JqxRadioButton>
23+
<div>
24+
<JqxKanban
25+
id="myKanban3"
26+
width=size height=size source=source3
27+
columns=columns3 connectWith="#myKanban1, #myKanban2"
28+
resources=resourcesSource>
29+
</JqxKanban>
30+
</div>
31+
</JqxSplitter>
32+
</div>
33+
</JqxSplitter>
1534
</div>
1635

1736
@code {
18-
JqxColorPicker myColorPicker;
19-
JqxRadioButton hueModeBtn;
37+
string size = "100%";
38+
string orientation = "horizontal";
2039

21-
void onChecked(IDictionary<string, object> e)
40+
static IDictionary<string, object>[] splitterPanels1 = new Dictionary<string, object>[]
2241
{
23-
if (hueModeBtn.isChecked)
42+
new Dictionary<string, object>
43+
{
44+
{ "size", 250 }, { "min", 100 }
45+
},
46+
new Dictionary<string, object>
2447
{
25-
myColorPicker.colorMode = "hue";
48+
{ "min", 250 }
2649
}
27-
else
50+
};
51+
52+
static IDictionary<string, object>[] splitterPanels2 = new Dictionary<string, object>[]
53+
{
54+
new Dictionary<string, object>
55+
{
56+
{ "size", 350 }, { "min", 200 }, { "collapsible", false }
57+
},
58+
new Dictionary<string, object>
2859
{
29-
myColorPicker.colorMode = "saturation";
60+
{ "min", 200 }
3061
}
31-
}
62+
};
63+
64+
static IDictionary<string, string>[] fields = new Dictionary<string, string>[]
65+
{
66+
new Dictionary<string, string>
67+
{
68+
{ "name", "status" }, { "map", "state" }, { "type", "string" }
69+
},
70+
new Dictionary<string, string>
71+
{
72+
{ "name", "text" }, { "map", "label" }, { "type", "string" }
73+
},
74+
new Dictionary<string, string>
75+
{
76+
{ "name", "tags" }, { "type", "string" }
77+
},
78+
new Dictionary<string, string>
79+
{
80+
{ "name", "color" }, { "map", "hex" }, { "type", "string" }
81+
},
82+
new Dictionary<string, string>
83+
{
84+
{ "name", "resourceId" }, { "type", "number" }
85+
}
86+
};
87+
88+
static IDictionary<string, object> source1 = new Dictionary<string, object>()
89+
{
90+
{ "dataType", "array" },
91+
{ "dataFields", fields },
92+
{
93+
"localData",
94+
new Dictionary<string, object>[]
95+
{
96+
new Dictionary<string, object>
97+
{
98+
{ "state", "new" }, { "label", "Combine Orders" }, { "tags", "orders, combine" }, { "hex", "#5dc3f0" }, { "resourceId", 3 }
99+
},
100+
new Dictionary<string, object>
101+
{
102+
{ "state", "new" }, { "label", "Change Billing Address" }, { "tags", "billing" }, { "hex", "#f19b60" }, { "resourceId", 1 }
103+
},
104+
new Dictionary<string, object>
105+
{
106+
{ "state", "new" }, { "label", "One item added to the cart" }, { "tags", "cart" }, { "hex", "#5dc3f0" }, { "resourceId", 3 }
107+
},
108+
new Dictionary<string, object>
109+
{
110+
{ "state", "new" }, { "label", "Edit Item Price" }, { "tags", "price, edit" }, { "hex", "#5dc3f0" }, { "resourceId", 4 }
111+
},
112+
new Dictionary<string, object>
113+
{
114+
{ "state", "new" }, { "label", "Login 404 issue" }, { "tags", "issue, login" }, { "hex", "#6bbd49" }
115+
}
116+
}
117+
}
118+
};
119+
120+
static IDictionary<string, object>[] columns1 = new Dictionary<string, object>[]
121+
{
122+
new Dictionary<string, object>
123+
{
124+
{ "text", "Backlog" }, { "dataField", "new" }, { "maxItems", 10 }
125+
}
126+
};
127+
128+
static IDictionary<string, object> source2 = new Dictionary<string, object>()
129+
{
130+
{ "dataType", "array" },
131+
{ "dataFields", fields },
132+
{
133+
"localData",
134+
new Dictionary<string, object>[]
135+
{
136+
new Dictionary<string, object>
137+
{
138+
{ "state", "ready" }, { "label", "Logout issue" }, { "tags", "logout, issue" }, { "hex", "#5dc3f0" }, { "resourceId", 7 }
139+
},
140+
new Dictionary<string, object>
141+
{
142+
{ "state", "ready" }, { "label", "Remember password issue" }, { "tags", "password, issue" }, { "hex", "#6bbd49" }, { "resourceId", 8 }
143+
},
144+
new Dictionary<string, object>
145+
{
146+
{ "state", "ready" }, { "label", "Cart calculation issue" }, { "tags", "cart, calculation" }, { "hex", "#f19b60" }, { "resourceId", 9 }
147+
},
148+
new Dictionary<string, object>
149+
{
150+
{ "state", "ready" }, { "label", "Remove topic issue" }, { "tags", "topic, issue" }, { "hex", "#6bbd49" }
151+
}
152+
}
153+
}
154+
};
155+
156+
static IDictionary<string, object>[] columns2 = new Dictionary<string, object>[]
157+
{
158+
new Dictionary<string, object>
159+
{
160+
{ "text", "Ready" }, { "dataField", "ready" }, { "maxItems", 10 }
161+
}
162+
};
163+
164+
static IDictionary<string, object> source3 = new Dictionary<string, object>()
165+
{
166+
{ "dataType", "array" },
167+
{ "dataFields", fields },
168+
{
169+
"localData",
170+
new Dictionary<string, object>[]
171+
{
172+
new Dictionary<string, object>
173+
{
174+
{ "state", "done" }, { "label", "Delete orders" }, { "tags", "orders, combine" }, { "hex", "#f19b60" }, { "resourceId", 4 }
175+
},
176+
new Dictionary<string, object>
177+
{
178+
{ "state", "work" }, { "label", "Add New Address" }, { "tags", "address" }, { "hex", "#6bbd49" }, { "resourceId", 5 }
179+
},
180+
new Dictionary<string, object>
181+
{
182+
{ "state", "new" }, { "label", "Rename items" }, { "tags", "rename" }, { "hex", "#5dc3f0" }, { "resourceId", 6 }
183+
},
184+
new Dictionary<string, object>
185+
{
186+
{ "state", "work" }, { "label", "Update cart" }, { "tags", "cart, update" }, { "hex", "#6bbd49" }
187+
}
188+
}
189+
}
190+
};
191+
192+
static IDictionary<string, object>[] columns3 = new Dictionary<string, object>[]
193+
{
194+
new Dictionary<string, object>
195+
{
196+
{ "text", "Backlog" }, { "dataField", "new" }, { "maxItems", 10 }
197+
}
198+
};
199+
200+
static IDictionary<string, object> resourcesSource = new Dictionary<string, object>()
201+
{
202+
{ "dataType", "array" },
203+
{
204+
"dataFields",
205+
new Dictionary<string, string>[]
206+
{
207+
new Dictionary<string, string>
208+
{
209+
{ "name", "id" }, { "type", "number" }
210+
},
211+
new Dictionary<string, string>
212+
{
213+
{ "name", "name" }, { "type", "string" }
214+
},
215+
new Dictionary<string, string>
216+
{
217+
{ "name", "image" }, { "type", "string" }
218+
},
219+
new Dictionary<string, string>
220+
{
221+
{ "name", "common" }, { "type", "boolean" }
222+
}
223+
}
224+
},
225+
{
226+
"localData",
227+
new Dictionary<string, object>[]
228+
{
229+
new Dictionary<string, object>
230+
{
231+
{ "id", 0 }, { "name", "No name" }, { "image", "../jqwidgets/styles/images/common.png" }, { "common", true }
232+
},
233+
new Dictionary<string, object>
234+
{
235+
{ "id", 1 }, { "name", "Andrew Fuller" }, { "image", "../images/andrew.png" }
236+
},
237+
new Dictionary<string, object>
238+
{
239+
{ "id", 2 }, { "name", "Janet Leverling" }, { "image", "../images/janet.png" }
240+
},
241+
new Dictionary<string, object>
242+
{
243+
{ "id", 3 }, { "name", "Steven Buchanan" }, { "image", "../images/steven.png" }
244+
},
245+
new Dictionary<string, object>
246+
{
247+
{ "id", 4 }, { "name", "Nancy Davolio" }, { "image", "../images/nancy.png" }
248+
},
249+
new Dictionary<string, object>
250+
{
251+
{ "id", 5 }, { "name", "Michael Buchanan" }, { "image", "../images/michael.png" }
252+
},
253+
new Dictionary<string, object>
254+
{
255+
{ "id", 6 }, { "name", "Margaret Buchanan" }, { "image", "../images/margaret.png" }
256+
},
257+
new Dictionary<string, object>
258+
{
259+
{ "id", 7 }, { "name", "Robert Buchanan" }, { "image", "../images/robert.png" }
260+
},
261+
new Dictionary<string, object>
262+
{
263+
{ "id", 8 }, { "name", "Laura Buchanan" }, { "image", "../images/laura.png" }
264+
},
265+
new Dictionary<string, object>
266+
{
267+
{ "id", 9 }, { "name", "Anna Short" }, { "image", "../images/anne.png" }
268+
}
269+
}
270+
}
271+
};
32272
}
273+
274+
<style>
275+
.jqx-splitter {
276+
width: 100% !important;
277+
height: 100% !important;
278+
}
279+
</style>

processors/site-demos.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)