initial scheduler
This commit is contained in:
Родитель
4c1be584b3
Коммит
6defb94a9b
|
@ -1,5 +1,6 @@
|
|||
node_modules
|
||||
dist/*
|
||||
!dist/main.css
|
||||
tmp
|
||||
.tmp
|
||||
.DS_Store
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Scheduler</title>
|
||||
|
||||
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.css" />
|
||||
<link rel="stylesheet" href="../dist/all.css" />
|
||||
|
||||
<script src="http://localhost/kendo/dist/js/jquery.min.js"></script>
|
||||
<script src="http://localhost/kendo/dist/js/kendo.all.min.js"></script>
|
||||
|
||||
<style type="text/css">
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="container">
|
||||
<legend>Scheduler</legend>
|
||||
|
||||
<div id="scheduler"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#scheduler").kendoScheduler({
|
||||
date: new Date("2013/6/13"),
|
||||
startTime: new Date("2013/6/13 07:00 AM"),
|
||||
height: 600,
|
||||
views: [
|
||||
"day",
|
||||
{ type: "workWeek", selected: true },
|
||||
"week",
|
||||
"month",
|
||||
"agenda",
|
||||
{ type: "timeline", eventHeight: 50}
|
||||
],
|
||||
timezone: "Etc/UTC",
|
||||
dataSource: {
|
||||
batch: true,
|
||||
transport: {
|
||||
read: {
|
||||
url: "//demos.telerik.com/kendo-ui/service/tasks",
|
||||
dataType: "jsonp"
|
||||
},
|
||||
update: {
|
||||
url: "//demos.telerik.com/kendo-ui/service/tasks/update",
|
||||
dataType: "jsonp"
|
||||
},
|
||||
create: {
|
||||
url: "//demos.telerik.com/kendo-ui/service/tasks/create",
|
||||
dataType: "jsonp"
|
||||
},
|
||||
destroy: {
|
||||
url: "//demos.telerik.com/kendo-ui/service/tasks/destroy",
|
||||
dataType: "jsonp"
|
||||
},
|
||||
parameterMap: function(options, operation) {
|
||||
if (operation !== "read" && options.models) {
|
||||
return {models: kendo.stringify(options.models)};
|
||||
}
|
||||
}
|
||||
},
|
||||
schema: {
|
||||
model: {
|
||||
id: "taskId",
|
||||
fields: {
|
||||
taskId: { from: "TaskID", type: "number" },
|
||||
title: { from: "Title", defaultValue: "No title", validation: { required: true } },
|
||||
start: { type: "date", from: "Start" },
|
||||
end: { type: "date", from: "End" },
|
||||
startTimezone: { from: "StartTimezone" },
|
||||
endTimezone: { from: "EndTimezone" },
|
||||
description: { from: "Description" },
|
||||
recurrenceId: { from: "RecurrenceID" },
|
||||
recurrenceRule: { from: "RecurrenceRule" },
|
||||
recurrenceException: { from: "RecurrenceException" },
|
||||
ownerId: { from: "OwnerID", defaultValue: 1 },
|
||||
isAllDay: { type: "boolean", from: "IsAllDay" }
|
||||
}
|
||||
}
|
||||
},
|
||||
filter: {
|
||||
logic: "or",
|
||||
filters: [
|
||||
{ field: "ownerId", operator: "eq", value: 1 },
|
||||
{ field: "ownerId", operator: "eq", value: 2 }
|
||||
]
|
||||
}
|
||||
},
|
||||
resources: [
|
||||
{
|
||||
field: "ownerId",
|
||||
title: "Owner",
|
||||
dataSource: [
|
||||
{ text: "Alex", value: 1, color: "#f8a398" },
|
||||
{ text: "Bob", value: 2, color: "#51a0ed" },
|
||||
{ text: "Charlie", value: 3, color: "#56ca85" }
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -10,11 +10,11 @@
|
|||
// Data management
|
||||
@import "pager/pager";
|
||||
@import "grid/grid";
|
||||
//@import "spreadsheet/spreadsheet";
|
||||
//@import "listview/listview";
|
||||
//@import "pivotgrid/pivotgrid";
|
||||
// @import "spreadsheet/spreadsheet";
|
||||
// @import "listview/listview";
|
||||
// @import "pivotgrid/pivotgrid";
|
||||
// @import "treelist/treelist";
|
||||
//@import "scrollview/scrollview";
|
||||
// @import "scrollview/scrollview";
|
||||
|
||||
|
||||
// Editors
|
||||
|
@ -45,7 +45,7 @@
|
|||
// Scheduling
|
||||
@import "calendar/calendar";
|
||||
@import "gantt/gantt";
|
||||
//@import "scheduler/scheduler";
|
||||
@import "scheduler/scheduler";
|
||||
|
||||
|
||||
// Layout
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
// Data management
|
||||
@import "../pager/pager";
|
||||
@import "../grid/grid";
|
||||
//@import "../spreadsheet/spreadsheet";
|
||||
//@import "../listview/listview";
|
||||
//@import "../pivotgrid/pivotgrid";
|
||||
//@import "../treelist/treelist";
|
||||
//@import "../scrollview/scrollview";
|
||||
// @import "../spreadsheet/spreadsheet";
|
||||
// @import "../listview/listview";
|
||||
// @import "../pivotgrid/pivotgrid";
|
||||
// @import "../treelist/treelist";
|
||||
// @import "../scrollview/scrollview";
|
||||
|
||||
|
||||
// Editors
|
||||
|
@ -46,8 +46,8 @@
|
|||
|
||||
// Scheduling
|
||||
@import "../calendar/calendar";
|
||||
//@import "../gantt/gantt";
|
||||
//@import "../scheduler/scheduler";
|
||||
@import "../gantt/gantt";
|
||||
@import "../scheduler/scheduler";
|
||||
|
||||
|
||||
// Layout
|
||||
|
@ -69,4 +69,4 @@
|
|||
|
||||
// Interactivity & UX
|
||||
@import "../progressbar/progressbar";
|
||||
@import "../scroller/scroller";
|
||||
@import "../scroller/scroller";
|
|
@ -0,0 +1,28 @@
|
|||
@include exports("scheduler/layout") {
|
||||
|
||||
// Layout
|
||||
.k-scheduler {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
|
||||
// Header and footer
|
||||
.k-scheduler-toolbar,
|
||||
.k-scheduler-footer {
|
||||
padding: $padding-y-sm $padding-x-sm;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
|
||||
// Scheduler navigation
|
||||
.k-scheduler-navigation {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
@include exports("scheduler/theme") {
|
||||
|
||||
// Appearance
|
||||
.k-scheduler {}
|
||||
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
@import "../variables";
|
||||
@import "../mixins/all";
|
||||
|
||||
|
||||
// Dependencies
|
||||
@import "../common/base";
|
||||
@import "../common/icons";
|
||||
|
||||
|
||||
// Component
|
||||
@import "layout";
|
||||
@import "theme";
|
Загрузка…
Ссылка в новой задаче