or
<script id="editor" type="text/x-kendo-template"> <div > <h3>Create appointment</h3> <p> <label>Notes: <textarea name="notes"></textarea></label> </p> <p> <label>Employee: <select ng-controller="Employees" name="employee_uid" class="form-control" required> <option ng-selected="{{e.uid == @Model.m_sesson.m_staffGuid}}" value="{{e.uid}}" ng-repeat="e in employees" >{{e.first_name}} {{e.last_name}}</option> </select> </label> <p> <label>Client: <select ng-controller="Clients" name="client_uid" class="form-control" required> <option value="{{c.uid}}" ng-repeat="c in clients" >{{c.first_name}} {{c.last_name}}</option> </select> </label> </p> <p> <label>Start: <input data-role="datetimepicker" name="start" /></label> </p> <p> <label>End: <input data-role="datetimepicker" name="end" /></label> </p> </div></script>schema: { model: { id: "taskId", // The "id" of the event is the "taskId" field fields: { // Describe the scheduler event fields and map them to the fields returned by the remote service taskId: { from: "uid", // The 'TaskID' server-side field is mapped to the 'taskId' client-side field type: "number" }, client_uid: { type: "number" }, employee_uid: { type: "number" }, notes: { type: "text"}, start: { type: "date" }, end: { type: "date" }, title: { from: "notes", defaultValue: "No title", validation: { required: true } }, description: { from: "Description", defaultValue: "No description" }, recurrenceId: { from: "RecurrenceID", defaultValue: null }, recurrenceRule: { from: "RecurrenceRule", defaultValue: null }, recurrenceException: { from: "RecurrenceException", defaultValue: null }, isAllDay: { type: "boolean", from: "IsAllDay", defaultValue: false } } } }<script id="fileTemplate" type="text/x-kendo-template"> <span class='k-progress'></span> <div class='file-wrapper'> <span class='file-icon #=addExtensionClass(files[0].extension)#'></span> <h4 class='file-heading file-name-heading'>Name: #=name#</h4> <h4 class='file-heading file-size-heading'>Size: #=size# bytes</h4> <label></label> <select id="uploadType" class="uploadType" name="uploadType"> <option>Unknown</option> <option>Type A</option> <option>Type B</option> <option>Type C</option> <option>Type D</option> </select> <button type='button' class='k-upload-action'></button> </div></script>$(document).ready(function () { $("#files").kendoUpload({ multiple: true, async: { saveUrl: '@Url.Action("Save", "DataUpload")', autoUpload: false }, template: kendo.template($("#fileTemplate").html()), error: onError });});function onError(e){ ???How do I get error information to use here???}[HttpPost]public ActionResult Save(IEnumerable<HttpPostedFileBase> files, ???){ //I need to know what type was selected before I can decide what //processing should be done for the file. So, I assume I need another //Param that contains he type selected by the user. return Content("");}var checkinSearchResultsListView = new kendo.View("#checkin-search-results-list-view-template",{model: checkinSearchModel, init: checkinSearchModel.initSearchResultsListGrid, show: checkinSearchModel.onShowListGrid});var checkinSearchResultsDetailView = new kendo.View("#checkin-search-results-detail-view-template",{model: checkinSearchModel, init: checkinSearchModel.initSearchResultsDetailGrid, show: checkinSearchModel.onShowDetailGrid});getSearchResults : new kendo.data.DataSource({ transport: { read: { url: function(options) { return "/4DACTION/WEB_CheckinSearch/" + JSON.stringify(options); }, type: 'POST', dataType: "json", complete: function(jqXHR) { var response = dataGetComplete(jqXHR); console.log(response.success); if (response.success.resultsType == "0"){ // No results checkinSearchModel.set('noResultsVisible', true); } else if (response.success.resultsType == "1") { console.log('-----showing detail view-----'); // List of family members results mainLayout.showIn("#checkin-content", checkinSearchResultsDetailView); } else if (response.success.resultsType == "2") { console.log('-----showing list view-----'); // List of families results ; multiple results mainLayout.showIn("#checkin-content", checkinSearchResultsListView); } } } }, schema: { data: function(response) { console.log(response.success); if(response.success.resultsType == "1"){ return response.success.resultsDetails; } else { return response.success.resultsList; } }, total: function (response) { return response.success.total; } }, pageSize: 10 }),initSearchResultsListGrid : function(e){ e.preventDefault(); $("#search-results-list-grid").kendoGrid({ dataSource: checkinSearchModel.get('getSearchResults'), rowTemplate: $('#checkin-search-results-list-row-template').html(), altRowTemplate: $('#checkin-search-results-list-row-alt-template').html(), selectable: "row", sortable: true, autoBind: true, pageable: { pageSizes: true, pageSizes: [10,25,50,100,500] }, columns: [ { title: 'Name', field: "lastName", sortable: true }, { title: 'Address', hidden: false }] });},initSearchResultsDetailGrid : function(e){ e.preventDefault(); $("#search-results-detail-grid").kendoGrid({ dataSource: checkinSearchModel.get('getSearchResults'), rowTemplate: $('#checkin-search-results-detail-row-template').html(), altRowTemplate: $('#checkin-search-results-detail-row-template').html(), selectable: "row", pageable: { pageSizes: true, pageSizes: [10,25,50,100,500] }, columns: [ { title: 'Name', sortable: true }, { title: 'Checking into' }, { title: 'Currently in' }, { title: ' ', width: 85 }, { title: ' ', width: 85 }, { title: ' ', width: 85 }] });},
//Initialize New Routerrouter = new kendo.Router({ init: function () { main.render("#root") }});<section class="header main"> <nav> <a id="nav-toggle" href="#"><span></span></a> <ul> <li><a id="linkHome" href="#">Home</a></li> <li><a id="linkClients" href="#">Clients</a></li> <li><a id="linkReports" href="#">Reports</a></li> </ul> </nav> <div class="brandmark"> <img src="/images/brandmark-snap-light.png"> </div> <div class="searchBox"> <input type="search" class="k-input toggle"> </div></section><!-- / .header.main --><div id="content" > </div><script> var router; var menu; //Initialize New Router router = new kendo.Router({ init: function () { router.navigate("HomeSA"); } }); router.route("/", function () { }); router.route(":firstLevel", function (firstLevel) { $("#content").load("Content/" + firstLevel + "Page.html"); }); $(function () { router.start(); $("#linkHome").click(function () { router.navigate("HomeSA"); $('section.main.header ul').slideToggle(); return false; }); $("#linkReports").click(function () { router.navigate("Report"); $('section.main.header ul').slideToggle(); return false; }); $("#linkClients").click(function () { router.navigate("Client"); $('section.main.header ul').slideToggle(); return false; }); });