This is a migrated thread and some comments may be shown as answers.

Scheduler style not applied properly

2 Answers 157 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Prabhu
Top achievements
Rank 1
Prabhu asked on 14 Mar 2014, 02:56 PM
Hi,

I am using a scheduler in htm file in asp .net (non MVC) application. When I run the file in any browser the styles are not applied properly. Below I have provided the entire code. Please take a look what is wrong in the code.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>    
    <link href="Styles/kendo.common.min.css" rel="stylesheet" type="text/css" />    
    <link href="Styles/kendo.default.min.css" rel="stylesheet" type="text/css" />
    <link href="Styles/kendo.rtl.min.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery.min.js" type="text/javascript"></script>
    <script src="Scripts/kendo.web.min.js" type="text/javascript"></script>    
</head>
<body>
    <div id="example" class="k-content">
        <div id="people">
            <input checked type="checkbox" id="alex" value="1">
            <input checked type="checkbox" id="bob" value="2">
            <input type="checkbox" id="charlie" value="3">
        </div>
        <div id="scheduler">
        </div>
    </div>
    <script type="text/javascript">
        $(function () {
            $("#scheduler").kendoScheduler({
                date: new Date("2013/6/13"),
                startTime: new Date("2013/6/13 07:00 AM"),
                height: 600,
                views: [
            "day",
            { type: "month", selected: true }            
        ],
                timezone: "Etc/UTC",
                dataSource: {
                    batch: true,
                    transport: {
                        read: {
                            url: "http://demos.telerik.com/kendo-ui/service/tasks",
                            dataType: "jsonp"
                        },
                        update: {
                            url: "http://demos.telerik.com/kendo-ui/service/tasks/update",
                            dataType: "jsonp"
                        },
                        create: {
                            url: "http://demos.telerik.com/kendo-ui/service/tasks/create",
                            dataType: "jsonp"
                        },
                        destroy: {
                            url: "http://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" }
                ]
            }
        ]
            });

            $("#people :checkbox").change(function (e) {
                var checked = $.map($("#people :checked"), function (checkbox) {
                    return parseInt($(checkbox).val());
                });

                var scheduler = $("#scheduler").data("kendoScheduler");

                scheduler.dataSource.filter({
                    operator: function (task) {
                        return $.inArray(task.ownerId, checked) >= 0;
                    }
                });
            });
        });
    </script>
    <style scoped>
        .k-nav-current > .k-link span + span
        {
            max-width: 200px;
            display: inline-block;
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;
            vertical-align: top;
        }
        
        #people
        {            
            height: 115px;
            position: relative;
        }
        #alex
        {
            position: absolute;
            left: 404px;
            top: 81px;
        }
        #bob
        {
            position: absolute;
            left: 519px;
            top: 81px;
        }
        #charlie
        {
            position: absolute;
            left: 634px;
            top: 81px;
        }
    </style>
</body>
</html>

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 14 Mar 2014, 03:30 PM
Hello Prabhu,

The kendo.common.min.css file is not registered - please verify that the file is accessible and available at the expected location.

Regards,
Dimo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Prabhu
Top achievements
Rank 1
answered on 14 Mar 2014, 04:04 PM
Thanks Dimo. It works now.
Tags
Scheduler
Asked by
Prabhu
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Prabhu
Top achievements
Rank 1
Share this question
or