or
require.config({
paths: {
jquery: 'lib/jquery-1.7.2.min',
kendo: 'lib/kendo.web.min',
kendoCulture: 'lib/cultures/kendo.culture.es-MX.min',
knockout: 'lib/knockout-2.1.0',
knockout_kendo: 'lib/knockout-kendo.min',
underscore: 'lib/underscore-min',
json2: 'lib/json2',
}
});
require([
'jquery',
'kendo',
'kendoCulture',
'knockout',
'knockout_kendo',
'underscore',
'json2'
], function (
$,
kendo,
kendoCulture,
ko,
knockout_kendo,
_,
json2) {
// Start of Main Function
$(function () {
kendo.culture("es-MX");
$("#tabstrip").kendoTabStrip({
animation:{
open:{
effects:"fadeIn"
}
}
});
// knockout Bindings
});
});
application.router.route(
"/things/:thingId"
,
function
( thingId ) {
var
store = application.managedContext.getEntityStore(
"things"
);
store.find( thingId ) // potentially async call which returns a promise to return a thing
.done(
function
( thing ) {
application.kendoApplication.navigate(
"views/thing-detail.html"
);
application.views.thingDetailViewModel.setSelectedThing( thing );
});
});
function showCalendar(userID) {
var apiUrl = "/svc/pimapi/calendar/" + userID;
$("#scheduler").kendoScheduler({
time: "Europe/Berlin",
views: ["week", "day", "month"],
height: 600,
dataSource: {
type: "json",
transport: {
read: { url: apiUrl }
},
schema: {
data: "ResponseItems",
model: {
fields: {
Title: { from: "Stichwort", type: "string" },
Start: { from: "Terminstart", type: "date" },
End: { from: "Terminende", type: "date" },
Description: { from: "Memo", type: "string" }
}
}
}
}
});
}
{"ResponseItems":[{"Stichwort":"test","Terminstart":"04.09.2013 16:00:00","Terminende":"04.09.2013 16:30:00","Memo":"testtest","Art":"T2"},{"Stichwort":"testtest","Terminstart":"05.09.2013 12:00:00","Terminende":"05.09.2013 13:00:00","Memo":"testetestetst\r\n\r\nPARTY","Art":"T1"}]}
var grid = $('#myTable').kendoGrid({
selectable: "row",
detailInit: function() { /* load detail items with json ajax request */ },
change: function() {.... }
}).data('kendoGrid');