or
success:
function
(data) {
var
docs = data.d;
//Get the data
var
doctemplate = kendo.template($(
"#dashwidget-document-template"
).html());
//compile the template
alert(doctemplate);
var
result = doctemplate(docs);
//Run the template, SILENTLY FAILS HERE...NEVER GETS TO THE ALERT
alert(result);
$(
"#document-list"
).html(result);
//display html
},
<
div
id
=
"document-container"
>
<
ul
id
=
"document-list"
>
<
li
>Loading...</
li
>
</
ul
>
</
div
>
<
script
id
=
"dashwidget-document-template"
type
=
"text/x-kendo-template"
>
<
li
>#= Title #</
li
>
</
script
>
$(document).ready(
function
() {
$(
"#grid"
).kendoGrid({
dataSource: {
type:
"json"
,
transport: {
read:
"@Url.Content("
~/reservation/grid
")"
},
schema: {
data:
"results"
,
total:
"total"
},
pageSize: 25,
serverPaging:
true
,
serverSorting:
true
},
height: getGridContentHeight(),
scrollable:
true
,
sortable:
true
,
pageable:
true
,
columns: [
{
field:
"FormattedDate"
,
title:
"Date"
,
width:
"133px"
},
{
field:
"FirstName"
,
title:
"First Name"
},
{
field:
"LastName"
,
title:
"Last Name"
},
{
field:
"TableName"
,
title:
"Table Name"
},
{
field:
"PartySize"
,
title:
"Size"
},
{
field:
"HasNotes"
,
title:
"Notes"
,
template:
"#=HasNotes#"
==
"true"
?
"<a href=\"javascript:void(0)\" onclick=\"openNotes(#=CustomerKey#, #=ReservationKey#)\">View Notes</a>"
:
"N/A"
},
{
title:
" "
,
template:
'<a href="/admin/customer/profile?customerkey=#=CustomerKey#"><img src="@Url.Content("~/Content/Images/customer_profile.png")" alt="" /></a>'
,
width:
"131px"
},
{
title:
" "
,
template:
'<a href="/admin/reservation/change?customerKey=#=CustomerKey#&reservationkey=#=ReservationKey#"><img src="@Url.Content("~/Content/Images/change.png")" alt="" /></a>'
,
width:
"77px"
},
{
title:
" "
,
template:
'<a href="javascript:void(0)" onclick="openCancel(#=ReservationKey#)"><img src="@Url.Content("~/Content/Images/cancel.png")" alt="" /></a>'
,
width:
"77px"
},
{
title:
"Checked In"
,
template:
'<div id="checkin-processing-#=ReservationKey#" class="checkin-processing"><img src="@Url.Content("~/Content/Images/ajax-loader.gif")" alt="" /></div><input id="checkin-#=ReservationKey#" type="checkbox" #=CheckedIn# == true ? "checked=\"checked\"" : "" onclick="checkInOut(#=ReservationKey#, this.checked)" />'
}
]
});
});