Debian Codegraph @

dojox/calendar/tests/columnview.html

raw symbols SCIP
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" width="100%" height="100%">
4
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7 <title>ColumnView Sample: Desktop</title>
8 <style type="text/css">
9 @import "../themes/claro/ColumnView.css";
10 @import "../themes/claro/MatrixView.css";
11 @import "columnview.css";
12 @import "../../../dojo/resources/dojo.css";
13 @import "../../../dijit/themes/dijit.css";
14 @import "../../../dijit/themes/claro/claro.css";
15
16 </style>
17 </head>
18
19 <body class="claro">
20 <script type="text/javascript"
21 data-dojo-config="async: true, parseOnLoad: true"
22 src="../../../dojo/dojo.js"></script>
23
24 <script type="text/javascript">
25
26 require(["dojo/ready", "dojo/_base/declare", "dojo/_base/fx", "dojo/on", "dojo/date/locale", "dojo/parser", "dojo/date", "dojo/_base/lang",
27 "dojo/dom", "dojo/dom-construct", "dojo/dom-class", "dojo/_base/window", "dijit/registry", "dojo/query", "dojox/calendar/ColumnView",
28 "dojox/calendar/ColumnViewSecondarySheet", "dojox/calendar/Keyboard", "dojox/calendar/Mouse", "dojox/calendar/VerticalRenderer",
29 "dojox/calendar/DecorationRenderer",
30 "dojox/calendar/HorizontalRenderer", "dojox/calendar/ExpandRenderer", "dojo/store/Memory", "dojo/store/Observable",
31 "dijit/form/VerticalSlider", "dijit/form/NumberSpinner", "dijit/form/ComboBox", "dijit/form/DateTextBox", "dijit/form/TimeTextBox",
32 "dijit/form/TextBox", "dijit/form/Button", "dijit/TitlePane", "dijit/Tooltip", "dijit/form/CheckBox"],
33
34 function(ready, declare, fx,on, locale, parser, date, lang, dom, domConstruct, domClass, win, registry, query,
35 ColumnView, ColumnViewSecondarySheet, CalendarKeyboard, CalendarMouse, VerticalRenderer, DecorationRenderer, HorizontalRenderer, ExpandRenderer, Memory, Observable, VerticalSlider,
36 NumberSpinner, ComboBox, DateTextBox, TimeTextBox, TextBox, Button, TitlePane, Tooltip, CheckBox){
37
38 ready(function(){
39
40 // singleton
41 win.doc.appState = {
42 moveDisabledMap: {},
43 resizeDisabledMap: {}
44 };
45
46 var mergeDateTime = function(isStart){
47 var dateEditor = isStart ? itemStartDateEditor : itemEndDateEditor;
48 var timeEditor = isStart ? itemStartTimeEditor : itemEndTimeEditor;
49 var date = dateEditor.get("value");
50 var time = timeEditor.get("value");
51 date.setHours(time.getHours());
52 date.setMinutes(time.getMinutes());
53 return date;
54 };
55
56 var addLogEntry = function(name, content){
57 var tr = domConstruct.create("tr", null, dom.byId("logBody"), "first");
58 var td = domConstruct.create("td", null, tr);
59 td.appendChild(win.doc.createTextNode(locale.format(new Date(), {selector:"time", timePattern:"h:mm:ss"})));
60 var td = domConstruct.create("td", null, tr);
61 td.appendChild(win.doc.createTextNode(name));
62 td = domConstruct.create("td", null, tr);
63 td.appendChild(win.doc.createTextNode(content));
64 };
65 // Calendar model creation
66
67 var dateClassObj = Date;
68
69 var dataItemsTemplate = [
70 {day: 1, start: [10,0], duration: 1400, calendar: "cal1"},
71 {day: 2, start: [10,30], duration: 120}, // not displayed if sub columns are set
72 {day: 2, start: [12,0], duration: 240, calendar: "cal1"},
73 {day: 3, start: [6,0], duration: 180, calendar: "cal2"},
74 {day: 3, start: [0,0], duration: 2880, allDay: true, calendar: "cal1"}
75 ];
76 var decorationItemsTemplate = [
77 {day: 2, start: [10,0], duration: 600}, // both columns
78 {day: 4, start: [8,0], duration: 200, calendar: "cal1"},
79 {day: 4, start: [9,0], duration: 300, calendar: "cal2"}
80 ];
81
82 // TODO manage first day of week
83 var floorToWeek= function(d){
84 d.setHours(0);
85 d.setMinutes(0);
86 d.setSeconds(0);
87 d.setMilliseconds(0);
88 d = date.add(d, "day", -d.getDay());
89 return d;
90 };
91
92 var startOfWeek = new dateClassObj();
93 startOfWeek = floorToWeek(startOfWeek);
94
95 var createModel = function(modelTemplate){
96
97 var someData = [];
98
99 startDateEditor.set("value", startOfWeek);
100
101 for (var id=0; id<modelTemplate.length; id++) {
102
103 var evtTmpl = modelTemplate[id];
104 var newObj = {
105 id: id,
106 summary: "New Event " + id,
107 startTime: new dateClassObj(startOfWeek.getTime()),
108 endTime: new dateClassObj(startOfWeek.getTime()),
109 calendar: evtTmpl.calendar,
110 allDay: evtTmpl.allDay
111 };
112
113 newObj.startTime = date.add(newObj.startTime, "day", evtTmpl.day);
114 newObj.startTime.setHours(evtTmpl.start[0]);
115 newObj.startTime.setMinutes(evtTmpl.start[1]);
116
117 newObj.endTime = date.add(newObj.startTime, "minute", evtTmpl.duration);
118
119 someData.push(newObj);
120 }
121
122 return someData;
123 }
124
125 var itemsData = createModel(dataItemsTemplate);
126 var decorationItemsData = createModel(decorationItemsTemplate);
127 var id = itemsData.length;
128
129 var subColumnsLabels = {
130 "cal1": "Calendar 1",
131 "cal2": "Calendar 2"
132 };
133
134 // Calendar creation & configuration
135 var secondarySheetClass = declare([ColumnViewSecondarySheet, CalendarKeyboard, CalendarMouse]);
136
137 colView = declare([ColumnView, CalendarKeyboard, CalendarMouse])({
138 store: new Observable(new Memory({data: itemsData})),
139 decorationStore: new Observable(new Memory({data: decorationItemsData})),
140 subColumns: ["cal1", "cal2"],
141 subColumnLabelFunc: function(v){
142 return subColumnsLabels[v];
143 },
144 secondarySheetClass: secondarySheetClass,
145 secondarySheetArgs: {
146 horizontalRendererHeight: 18
147 },
148 verticalRenderer: VerticalRenderer,
149 verticalDecorationRenderer: DecorationRenderer,
150 horizontalRenderer: HorizontalRenderer,
151 horizontalDecorationRenderer: DecorationRenderer,
152 expandRenderer: ExpandRenderer,
153 cssClassFunc: function(item){
154 return item.calendar == "cal1" ? "Calendar1" : "Calendar2"
155 },
156 isItemMoveEnabled: function(item, kind){
157 return this.isItemEditable(item, kind) && win.doc.appState.moveDisabledMap[item.id] !== true;
158 },
159 isItemResizeEnabled: function(item, kind){
160 return this.isItemEditable(item, kind) && win.doc.appState.resizeDisabledMap[item.id] !== true;
161 }
162 }, "calendarNode");
163
164 // Events management
165
166
167 // Enable creation of event interactively by ctrl clicking grid.
168 var createItem = function(view, d, e, subColumn){
169
170 // create item by maintaining control key
171 if(!e.ctrlKey || e.shiftKey || e.altKey){
172 return null;
173 }
174
175 // create a new event
176 var start, end;
177 var cal = colView.dateModule;
178
179 start = colView.floorDate(d, "minute", colView.timeSlotDuration);
180 end = cal.add(start, "minute", colView.timeSlotDuration);
181
182 var item = {
183 id: id,
184 summary: "New event " + id,
185 startTime: start,
186 endTime: end,
187 calendar: subColumn || "cal1",
188 allDay: view.viewKind == "matrix"
189 };
190
191 id++;
192
193 return item;
194 };
195
196 colView.set("createOnGridClick", true);
197 colView.set("createItemFunc", createItem);
198
199 var startDateSave;
200 var columnCountSave;
201
202 colView.on("columnHeaderClick", function(e){
203 if (colView.get("columnCount") == 1) {
204 colView.set("startDate", startDateSave);
205 colView.set("columnCount", columnCountSave);
206 } else {
207 startDateSave = colView.get("startDate");
208 columnCountSave = colView.get("columnCount");
209 colView.set("startDate", e.date);
210 colView.set("columnCount", 1);
211 }
212 });
213
214 var onColViewChange = function(item){
215 if (item == null){
216
217 editedItem = null;
218
219 itemSummaryEditor.set("value", null);
220 itemSummaryEditor.set("disabled", true);
221
222 itemStartDateEditor.set("value", null);
223 itemStartDateEditor.set("disabled", true);
224
225 itemStartTimeEditor.set("value", null);
226 itemStartTimeEditor.set("disabled", true);
227
228 itemEndDateEditor.set("value", null);
229 itemEndDateEditor.set("disabled", true);
230
231 itemEndTimeEditor.set("value", null);
232 itemEndTimeEditor.set("disabled", true);
233
234 updateItemButton.set("disabled", true);
235
236 allDayCB.set("disabled", true);
237 allDayCB.set("checked", false, false);
238
239 resizeEnabledCB.set("disabled", true);
240 resizeEnabledCB.set("checked", false);
241
242 moveEnabledCB.set("disabled", true);
243 moveEnabledCB.set("checked", false);
244
245 calendarEditor.set("disabled", true);
246
247
248 }else{
249 // work on a copy
250 editedItem = lang.mixin({}, item);
251
252 var allDay = item.allDay === true;
253
254 itemSummaryEditor.set("value", item.summary);
255 itemSummaryEditor.set("disabled", false);
256
257 itemStartDateEditor.set("value", item.startTime);
258 itemStartDateEditor.set("disabled", false);
259
260 itemStartTimeEditor.set("value", item.startTime);
261 itemStartTimeEditor.set("disabled", allDay);
262
263 itemEndDateEditor.set("value", item.endTime);
264 itemEndDateEditor.set("disabled", false);
265
266 itemEndTimeEditor.set("value", item.endTime);
267 itemEndTimeEditor.set("disabled", allDay);
268
269 calendarEditor.set("value", item.calendar == "cal1" ? "Calendar 1" : "Calendar 2");
270
271 updateItemButton.set("disabled", false);
272 calendarEditor.set("disabled", false);
273
274 allDayCB.set("disabled", false);
275 allDayCB.set("checked", allDay, false);
276
277 resizeEnabledCB.set("disabled", false);
278 resizeEnabledCB.set("checked", win.doc.appState.resizeDisabledMap[item.id] !== true);
279
280 moveEnabledCB.set("disabled", false);
281 moveEnabledCB.set("checked", win.doc.appState.moveDisabledMap[item.id] !== true);
282 }
283
284 var res = "";
285 if(item == null){
286 res = null;
287 }else{
288 var list = colView.get("selectedItems");
289 for(var i=0; i<list.length; i++){
290 res += list[i].summary;
291 if(i != list.length-1){
292 res += ", ";
293 }
294 }
295 }
296 addLogEntry("onChange", res);
297 };
298
299 allDayCB.on("change", function(value){
300
301 itemStartTimeEditor.set("disabled", value);
302 itemEndTimeEditor.set("disabled", value);
303 var d;
304 if(value){
305 d = itemStartTimeEditor.get("value");
306 colView.floorToDay(d, true);
307 itemStartTimeEditor.set("value", d);
308 d = itemEndTimeEditor.get("value");
309 colView.floorToDay(d, true);
310 itemEndTimeEditor.set("value", d);
311
312 if(!colView.isStartOfDay(editedItem.endTime)){
313 d = itemEndDateEditor.get("value");
314 colView.floorToDay(d, true);
315 d = colView.renderData.dateModule.add(d, "day", 1);
316 itemEndDateEditor.set("value", d);
317 }
318
319 }else{
320 editedItem.startTime.setHours(8);
321 editedItem.endTime.setHours(9);
322 itemStartTimeEditor.set("value", editedItem.startTime);
323 itemEndTimeEditor.set("value", editedItem.endTime);
324 d = itemEndDateEditor.get("value");
325 colView.floorToDay(d, true);
326 d = colView.renderData.dateModule.add(d, "day", -1);
327 itemEndDateEditor.set("value", d);
328 }
329
330 });
331
332 colView.on("change", function(e){
333 onColViewChange(e.newValue);
334 });
335
336 startDateEditor.on("change", function(value){
337 colView.set("startDate", value);
338 });
339
340 var editedItem;
341
342 updateItemButton.on("click", function(value){
343
344 if (editedItem != null) {
345 editedItem.summary = itemSummaryEditor.get("value");
346 if(allDayCB.get("value")){
347 if(!colView.isStartOfDay(editedItem.startTime)){
348 editedItem.startTime = colView.floorToDay(itemStartDateEditor.get("value"), true);
349 }
350 if(!colView.isStartOfDay(editedItem.endTime)){
351 editedItem.endTime = colView.floorToDay(itemEndDateEditor.get("value"), true);
352 }
353 editedItem.allDay = true;
354 }else{
355 editedItem.startTime = mergeDateTime(true);
356 editedItem.endTime = mergeDateTime(false);
357 delete editedItem.allDay;
358 }
359
360 var calValue = calendarEditor.get("value");
361 editedItem.calendar = calValue == "Calendar 1" ? "cal1" : "cal2";
362 colView.store.put(editedItem);
363 }
364
365 });
366
367 dateFormatButton.on("click", function(value){
368 colView.set("rowHeaderTimePattern", rowHeaderFormatEditor.value);
369 colView.set("columnHeaderDatePattern", columnHeaderFormatEditor.value);
370 });
371
372 colView.on("itemClick", function(e){
373 addLogEntry("onItemClick", e.item.summary);
374 });
375 colView.on("itemDoubleClick", function(e){
376 addLogEntry("onItemDoubleClick", e.item.summary);
377 });
378 colView.on("gridClick", function(e){
379 addLogEntry("onGridClick", locale.format(e.date, {datePattern:"yyyy/MM/dd", timePattern:"h:mm"}));
380 });
381 colView.on("gridDoubleClick", function(e){
382 addLogEntry("onGridDoubleClick", locale.format(e.date, {datePattern:"yyyy/MM/dd", timePattern:"h:mm"}));
383 });
384
385
386 colView.on("itemRollOut", function(e){
387 addLogEntry("onItemRollOut", e.item.summary);
388 });
389
390 var getItemLabel = function(item){
391 return "<b>" + item.summary + "</b><br/><table><tr><td style='text-align:right'>" +
392 "Start:</td><td>" + colView.renderData.dateLocaleModule.format(item.startTime, {formatLength: "medium"}) + "</td></tr><tr><td style='text-align:right'>" +
393 "End:</td><td>" + colView.renderData.dateLocaleModule.format(item.endTime, {formatLength: "medium"}) + "</td></tr></table>";
394 };
395
396 colView.on("focusChange", function(e){
397 addLogEntry("focusChange", e.item ? e.item.summary: "null");
398 });
399
400 colView.on("itemRollOver", function(e){
401 addLogEntry("onItemRollOver", e.item.summary);
402 });
403
404 colView.on("itemEditBegin", function(e){
405 addLogEntry("onItemEditBegin", e.item.summary);
406 });
407
408 colView.on("itemEditBeginGesture", function(e){
409 addLogEntry("onItemEditBeginGesture", e.editKind + ", " + e.item.summary);
410 });
411
412 colView.on("itemEditEndGesture", function(e){
413 addLogEntry("onItemEditEndGesture", e.editKind + ", " + e.item.summary);
414 onColViewChange(e.item);
415 });
416
417
418 colView.on("itemEditEnd", function(e){
419 addLogEntry("onItemEditEnd", e.item.summary + ", completed:" + e.completed);
420 });
421
422 editableCB.on("change", function(value){
423 colView.set("editable", value);
424 });
425
426 keyEditableCB.on("change", function(value){
427 colView.set("keyboardEditable", value);
428 });
429
430 liveEditCB.on("change", function(value){
431 colView.liveLayout = value;
432 });
433
434 allowSwapCB.on("change", function(value){
435 colView.allowStartEndSwap = value;
436 });
437
438 viewConstrainCB.on("change", function(value){
439 colView.stayInView = value;
440 });
441
442 resizeEnabledCB.watch("disabled", function(oldV, newV){
443 if (newV){
444 domClass.remove("resizeEnabledCBLabel", "disabled");
445 }else{
446 domClass.add("resizeEnabledCBLabel", "disabled");
447 }
448 });
449
450 moveEnabledCB.watch("disabled", function(oldV, newV){
451 if (newV){
452 domClass.remove("moveEnabledCBLabel", "disabled");
453 }else{
454 domClass.add("moveEnabledCBLabel", "disabled");
455 }
456 });
457
458 resizeEnabledCB.on("change", function(value){
459 if (colView.selectedItem) {
460 if (value){
461 delete win.doc.appState.resizeDisabledMap[colView.selectedItem.id]
462 } else {
463 win.doc.appState.resizeDisabledMap[colView.selectedItem.id] = true;
464 }
465 }
466 });
467
468 moveEnabledCB.on("change", function(value){
469 if (colView.selectedItem) {
470 if (value){
471 delete win.doc.appState.moveDisabledMap[colView.selectedItem.id]
472 } else {
473 win.doc.appState.moveDisabledMap[colView.selectedItem.id] = true;
474 }
475 }
476 });
477
478 allowReassignCB.on("change", function(value){
479 colView.set("allowSubColumnMove", value);
480 });
481
482
483 subColumnsCB.on("change", function(value){
484 colView.set("subColumns", value ? ["cal1", "cal2"] : null);
485 });
486
487 overlapEditor.on("change", function(value){
488 colView.set('percentOverlap', this.value);
489 hGapEditor.set("disabled", value!=0)
490 });
491
492 window.onresize = function(){
493 colView.resize();
494 }
495
496 fx.fadeOut({
497 node:"loadingPanel",
498 onEnd: function(node){
499 node.parentNode.removeChild(node)
500 }}).play(500);
501
502 });
503 });
504 </script>
505
506 <div id="loadingPanel" style="position:absolute;z-index:10;width:100%;height:100%;background:#ffffff">
507 <span style="background: #DBEB8F;padding:2px">Loading...</span>
508 </div>
509
510 <div id="formDiv">
511
512 <div data-dojo-type="dijit.TitlePane" title="Date Interval" class="formPanel">
513 <table class="formTable">
514 <tr>
515 <td>Start date:</td>
516 <td><div data-dojo-id="startDateEditor" data-dojo-type="dijit.form.DateTextBox" style="width:80px"></div></td>
517 </tr>
518
519 <tr>
520 <td>Column count:</td>
521 <td><div data-dojo-id="columnCountEditor" data-dojo-type="dijit.form.NumberSpinner" style="width:80px" data-dojo-props="constraints:{min:1, max:14}, value:7, intermediateChanges:true" onChange="colView.set('columnCount', this.value);"></div></td>
522 </tr>
523 </table>
524 </div>
525
526 <div data-dojo-type="dijit.TitlePane" title="Main Properties" class="formPanel">
527 <table class="formTable">
528
529 <tr>
530 <td>Min hours:</td>
531 <td><div data-dojo-id="minHoursEditor" data-dojo-type="dijit.form.NumberSpinner" style="width:80px" value="8" data-dojo-props="constraints:{min:0, max:24}, intermediateChanges:true" onChange="colView.set('minHours', this.value);"></div></td>
532 </tr>
533
534 <tr>
535 <td>Max Hours:</td>
536 <td><div data-dojo-id="maxHoursEditor" data-dojo-type="dijit.form.NumberSpinner" style="width:80px" value="18" data-dojo-props="constraints:{min:0, max:24}, intermediateChanges:true" onChange="colView.set('maxHours', this.value);"></div></td>
537 </tr>
538
539 <tr>
540 <td>Hour size(px):</td>
541 <td><div data-dojo-id="hourSizeEditor" data-dojo-type="dijit.form.NumberSpinner" style="width:80px" value="100" data-dojo-props="constraints:{min:0, max:500}, intermediateChanges:true, smallDelta:25" onChange="colView.set('hourSize', this.value);"></div></td>
542 </tr>
543
544 <tr>
545 <td>Min column width(px):</td>
546 <td><div data-dojo-id="minColWidthEditor" data-dojo-type="dijit.form.NumberSpinner" style="width:80px" value="0" data-dojo-props="constraints:{min:0, max:200}, intermediateChanges:true" onChange="colView.set('minColumnWidth', this.value);"></div></td>
547 </tr>
548
549
550 <tr>
551 <td>Timeslot (minutes):</td>
552 <td>
553 <select data-dojo-id="timeSlotEditor" data-dojo-type="dijit.form.ComboBox" style="width:80px;" onChange="colView.set('timeSlotDuration', this.value);">
554 <option value="15" selected>15</option>
555 <option value="30">30</option>
556 <option value="60">60</option>
557 </select>
558 </td>
559 </tr>
560
561 <tr>
562 <td>Row Grid Timeslot:</td>
563 <td>
564 <select data-dojo-id="rhgtimeSlotEditor" data-dojo-type="dijit.form.ComboBox" style="width:80px;" onChange="colView.set('rowHeaderGridSlotDuration', this.value);">
565 <option value="15">15</option>
566 <option value="30">30</option>
567 <option value="60" selected>60</option>
568 </select>
569 </td>
570 </tr>
571
572 <tr>
573 <td>Row Label Timeslot:</td>
574 <td>
575 <select data-dojo-id="rhltimeSlotEditor" data-dojo-type="dijit.form.ComboBox" style="width:80px;" onChange="colView.set('rowHeaderLabelSlotDuration', this.value);">
576 <option value="15">15</option>
577 <option value="30">30</option>
578 <option value="60" selected>60</option>
579 </select>
580 </td>
581 </tr>
582
583 <tr>
584 <td>Row Label offset:</td>
585 <td><div data-dojo-id="rhoEditor" data-dojo-type="dijit.form.NumberSpinner" style="width:80px" value="2" data-dojo-props="constraints:{min:-20, max:20}, intermediateChanges:true" onChange="colView.set('rowHeaderLabelOffset', this.value);"></div></td>
586 </tr>
587
588
589 <tr>
590 <td>Overlap (%):</td>
591 <td><div data-dojo-id="overlapEditor" data-dojo-type="dijit.form.NumberSpinner" data-dojo-props="value:70, constraints:{min:0, max:100}, intermediateChanges:true, smallDelta:10" style="width:80px"></div></td>
592 </tr>
593
594 <tr>
595 <td>Horizontal gap (px):</td>
596 <td><div data-dojo-id="hGapEditor" data-dojo-type="dijit.form.NumberSpinner" style="width:80px" data-dojo-props="constraints:{min:0, max:30}, value:2, intermediateChanges:true, disabled:true" onChange="colView.set('horizontalGap', this.value);"></div></td>
597 </tr>
598
599 <tr>
600 <td>Start time of day (h):</td>
601 <td><div data-dojo-id="startTimeOfDayEditor" data-dojo-type="dijit.form.NumberSpinner" data-dojo-props="value:8, constraints:{min:0, max:24}, intermediateChanges:true, smallDelta:1" style="width:80px" onChange="colView.set('startTimeOfDay', {hours: this.value, duration: 250});"></div></td>
602 </tr>
603
604 <tr>
605 <td>Selection mode:</td>
606 <td>
607 <select data-dojo-id="selectionModeEditor" data-dojo-type="dijit.form.ComboBox" style="width:80px;" onChange="colView.set('selectionMode', this.value);">
608 <option>none</option>
609 <option selected>single</option>
610 <option>multiple</option>
611 </select>
612 </td>
613 </tr>
614 <tr>
615 <td><label for="subColumnsCB">Sub columns:</label></td>
616 <td>
617 <input type="checkbox" data-dojo-id="subColumnsCB" id="subColumnsCB" data-dojo-type="dijit.form.CheckBox" checked="true" />
618 </td>
619 </tr>
620
621 </table>
622 </div>
623
624 <div data-dojo-type="dijit.TitlePane" title="Date/Time Patterns" class="formPanel" open="false">
625 <table class="formTable">
626 <tr>
627 <td>Row format:</td>
628 <td><div data-dojo-id="rowHeaderFormatEditor" data-dojo-type="dijit.form.TextBox" style="width:110px" data-dojo-props="placeHolder:'ex: h a'"></div></td>
629 </tr>
630 <tr>
631 <td>Column format:</td>
632 <td><div data-dojo-id="columnHeaderFormatEditor" data-dojo-type="dijit.form.TextBox" style="width:110px" data-dojo-props="placeHolder:'ex: EEE MMM, dd'"></div></td>
633
634 </tr>
635 <tr>
636 <td colspan="2" style="text-align:right;padding-top:5px;padding-right:5px"><button data-dojo-id="dateFormatButton" data-dojo-type="dijit.form.Button">Apply</button></td>
637 </tr>
638 </table>
639 </div>
640
641 <div data-dojo-type="dijit.TitlePane" title="Item Properties" class="formPanel" open="false">
642 <table>
643 <tr>
644 <td colspan="2">
645 <span style="font-size:0.9em">Summary:</span>
646 <div data-dojo-id="itemSummaryEditor" data-dojo-type="dijit.form.TextBox" style="width:140px; margin-left: 10px" data-dojo-props="placeHolder:'Summary...'"></div>
647 </td>
648 </tr>
649 <tr>
650 <td colspan="2">
651 <span style="font-size:0.9em">Calendar:</span>
652 <select data-dojo-id="calendarEditor" data-dojo-type="dijit.form.ComboBox" style="width:140px; margin-left: 12px" >
653 <option>Calendar 1</option>
654 <option>Calendar 2</option>
655 </select>
656 </td>
657 </tr>
658
659 <tr>
660 <td colspan="2" class="smallText" >
661 <input type="checkbox" data-dojo-id="allDayCB" data-dojo-type="dijit.form.CheckBox" checked="false" disabled="true" />
662 <label for="allDayCB">All day</label>
663 </td>
664 </tr>
665
666 <tr>
667 <td style="padding-top:5px;font-size:0.9em">Start time:</td>
668 </tr>
669 <tr>
670 <td style="text-align:right;">
671 <div data-dojo-id="itemStartDateEditor" data-dojo-type="dijit.form.DateTextBox" style="width:100px;" ></div>
672 </td>
673 <td>
674 <div data-dojo-id="itemStartTimeEditor" data-dojo-type="dijit.form.TimeTextBox" style="width:100px;" ></div>
675 </td>
676 </tr>
677
678 <tr>
679 <td style="padding-top:5px;font-size:0.9em">End time:</td>
680 </tr>
681
682 <tr>
683 <td style="text-align:right;">
684 <div data-dojo-id="itemEndDateEditor" data-dojo-type="dijit.form.DateTextBox" style="width:100px;" ></div>
685 </td>
686 <td>
687 <div data-dojo-id="itemEndTimeEditor" data-dojo-type="dijit.form.TimeTextBox" style="width:100px;" ></div>
688 </td>
689 </tr>
690
691 <tr>
692 <td colspan="2" style="text-align:right;padding-top:5px;font-size:0.9em">
693 <button data-dojo-id="updateItemButton" data-dojo-type="dijit.form.Button" disabled="true">Update</button>
694 </td>
695 </tr>
696 </table>
697 </div>
698
699 <div data-dojo-type="dijit.TitlePane" title="Editing properties" class="formPanel" data-dojo-props="open:true">
700 <table>
701 <tr>
702 <td colspan="2" class="smallText" >
703 <input type="checkbox" data-dojo-id="liveEditCB" data-dojo-type="dijit.form.CheckBox" checked="false" />
704 <label for="liveEditCB">Live layout</label>
705 </td>
706 </tr>
707 <tr>
708 <td colspan="2" class="smallText" >
709 <input type="checkbox" data-dojo-id="allowReassignCB" id="allowReassignCB" data-dojo-type="dijit.form.CheckBox" checked="true" />
710 <label for="allowReassignCB">Allow sub column change</label>
711 </td>
712 </tr>
713 <tr>
714 <td colspan="2" class="smallText" >
715 <input type="checkbox" data-dojo-id="allowSwapCB" data-dojo-type="dijit.form.CheckBox" checked="true" />
716 <label for="allowSwapCB">Allow start/end swap</label>
717 </td>
718 </tr>
719 <tr>
720 <td colspan="2" class="smallText" >
721 <input type="checkbox" data-dojo-id="editableCB" data-dojo-type="dijit.form.CheckBox" checked="true" />
722 <label for="editableCB">Editable (global)</label>
723 </td>
724 </tr>
725 <tr>
726 <td colspan="2" class="smallText" >
727 <input type="checkbox" data-dojo-id="keyEditableCB" data-dojo-type="dijit.form.CheckBox" checked="true" />
728 <label for="keyEditableCB">Keyboard Editable (global)</label>
729 </td>
730 </tr>
731 <tr>
732 <td colspan="2" class="smallText" >
733 <input type="checkbox" data-dojo-id="viewConstrainCB" data-dojo-type="dijit.form.CheckBox" checked="true" />
734 <label for="viewConstrainCB">Stay in view (global)</label>
735 </td>
736 </tr>
737 <tr>
738 <td colspan="2" class="smallText" >
739 <input type="checkbox" id="moveEnabledCB" data-dojo-id="moveEnabledCB" data-dojo-type="dijit.form.CheckBox" checked="false" disabled="true" />
740 <label id="moveEnabledCBLabel" for="moveEnabledCB" class="disabled">Move Enabled (item)</label>
741 </td>
742 </tr>
743 <tr>
744 <td colspan="2" class="smallText" >
745 <input type="checkbox" id="resizeEnabledCB" data-dojo-id="resizeEnabledCB" data-dojo-type="dijit.form.CheckBox" checked="false" disabled="true" />
746 <label id="resizeEnabledCBLabel" for="resizeEnabledCB" class="disabled">Resize Enabled (item)</label>
747 </td>
748 </tr>
749
750 <tr>
751 <td class="smallText">Snap (minutes):</td>
752 <td>
753 <select data-dojo-id="editingSnapEditor" data-dojo-type="dijit.form.ComboBox" style="width:80px;" onChange="colView.snapSteps = parseInt(this.value);">
754 <option value="5">5</option>
755 <option value="10">10</option>
756 <option value="15" selected>15</option>
757 <option value="20">20</option>
758 <option value="30">30</option>
759 <option value="60">60</option>
760 </select>
761 </td>
762 </tr>
763
764 <tr>
765 <td class="smallText">Min duration (minutes):</td>
766 <td>
767 <select data-dojo-id="editingMinDurationEditor" data-dojo-type="dijit.form.ComboBox" style="width:80px;" onChange="colView.minDurationSteps = parseInt(this.value);">
768 <option value="5">5</option>
769 <option value="10">10</option>
770 <option value="15" selected>15</option>
771 <option value="20">20</option>
772 <option value="30">30</option>
773 <option value="60">60</option>
774 </select>
775 </td>
776 </tr>
777 </table>
778 </div>
779
780 </div>
781
782 <div id="calendarNode"></div>
783
784 <div id="eventLogPane" title="Calendar events" data-dojo-type="dijit.TitlePane" data-dojo-props="toggleable:false" >
785
786 <div id="logTableContainer">
787 <table id="logTable">
788 <tbody id="logBody"></tbody>
789 </table>
790 </div>
791
792 </div>
793
794 </body>
795 </html>