DEBUG for Crazy IE bug
by siegesan
HTML
<script src="http://cdn.kendostatic.com/2012.1.322/js/kendo.all.min.js"></script>
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.default.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.common.min.css">
<script src="http://demos.kendoui.com/content/shared/js/console.js"></script>
JavaScript
$("#addGuidanceNote").attr("disabled", "disabled");
var newNoteViewModel = kendo.observable({
Summary: "",
NotePriority_ID: 0,
NoteType_ID: 0,
IsEPM: true,
IsTAR: true,
dataEntryComplete: function() {
if ( this.get("ActDesc").length > 0 &&
this.get("ActName").length > 0 )
{
return true;
}
else
{
return false;
}
},
addGuidanceNote: function () {
$.ajax({
url:'@Url.Action("AddGuidanceNote")',
type:"POST",
data: {
guidanceid: viewModel.get("Guidance_ID")
// PUT ALL THE FIELDS YOU ARE GOING TO SEND TO METHOD HERE
}
}).done(function(data, text, jqxhr) {
// HANDLE CLIENT-SIDE UPDATING HERE
var selectedObjective = objectiveDataSource.get(viewModel.get("Guidance_ID"));
// push the new review Note to the viewModel
selectedObjective.Activities.push(data);
viewModel.set("activities", selectedObjective.Activities);
viewModel.set("objective", selectedObjective);
// close the window
$("#win").data("kendoWindow").close();
});
}
});
kendo.bind($("#newItemTemplate"), newNoteViewModel);