or
var viewModel = kendo.observable({
ordersSource: statesDataSource,
isActive: true,
tabSelected: function (e) {
var selectedTab = $(e.item).text().trim();
this.set("isActive", (selectedTab === "Active"));
},
stateName: "",
stateAbbreviation: "",
isActive: true,
createState: function () {
debugger;
statesDataSource.add({
stateLookupID: 0,
stateName: viewModel.get("stateName"),
StateAbbreviation: viewModel.get("StateAbbreviation"),
isActive: viewModel.get("isActive")
});
}
});
<body> <div id="rootView" data-role="view" data-init="verifyLogin"> </div> <script> var isLoggedIn = false; var app = new kendo.mobile.Application($(document.body), { initial: "rootView" }); function verifyLogin() { app.navigate("http://127.0.0.2:81/Mobile/Account/Login"); } </script></body<div data-role="view" data-title="Login" data-reload="true" id="viewLogin"> <form action="@OurApp.Core.Web.UrlHelper.GetUrlRoot()/Mobile/Account/Login" data-ajax="true" data-ajax-mode="replace" data-ajax-success="onSuccess" data-ajax-update="#loginForm" id="loginForm" method="post"> @Html.AntiForgeryToken() <div> <div> <fieldset> <header> <legend>Login</legend> </header> <div class="widget-inner clearfix"> @Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.") <div class="control-group"> <label class="control-label">@Html.LabelFor(model => model.UserName, new { @class = "bold" })</label> <div class="controls"> @Html.TextBoxFor(model => model.UserName, new { autofocus = "autofocus", @class = "input-block-level", tabindex = "1" }) @Html.ValidationMessageFor(model => model.UserName) </div> </div> <div class="control-group"> <label class="control-label clearfix"> @Html.LabelFor(model => model.Password, new { @class = "bold pull-left" }) </label> <div class="controls"> @Html.PasswordFor(model => model.Password, new { @class = "input-block-level", tabindex = "2" }) @Html.ValidationMessageFor(model => model.Password) </div> </div> <div class="clearfix"> <div class="pull-right" style="margin-left: 16px;"> <button type="submit" class="btn btn-primary disable-onclick" tabindex="4" style="margin-top: 0;">Login</button> </div> <div class="pull-right" style="margin-top: 6px;"> @Html.LabelFor(model => model.RememberMe, new { @class = "pull-left", style = "font-size: 12px;" }) @Html.CheckBoxFor(model => model.RememberMe, new { @class = "pull-left", style = "margin-left: 6px;", tabindex = "3" }) @Html.ValidationMessageFor(model => model.RememberMe) </div> </div> </div> </fieldset> </div> </div> </form> <script type="text/javascript"> $(function () { var form = $("#loginForm"); form.removeData('validator'); form.removeData('unobtrusiveValidation'); $.validator.unobtrusive.parse(form); }); function onSuccess() { alert('success'); } </script></div>public ActionResult Login(){ return PartialView(new LoginViewModel());}[HttpPost]public ActionResult Login(LoginViewModel model){ return PartialView(model);}<!DOCTYPE html><html><head> <title></title> <link href="//cdn.kendostatic.com/2013.1.319/styles/kendo.common.min.css" rel="stylesheet" /> <link href="//cdn.kendostatic.com/2013.1.319/styles/kendo.default.min.css" rel="stylesheet" /> <link href="//twitter.github.io/bootstrap/assets/css/bootstrap.css" rel="stylesheet" /> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script src="//cdn.kendostatic.com/2013.1.319/js/kendo.all.min.js"></script> <script src="//twitter.github.io/bootstrap/assets/js/bootstrap-transition.js"></script> <script src="//twitter.github.io/bootstrap/assets/js/bootstrap-modal.js"></script></head><body><!-- Button to trigger modal --><a href="#myModal" role="button" class="btn" data-toggle="modal">Launch demo modal</a><!-- Modal --><div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button> <h3 id="myModalLabel">Modal header</h3> </div> <div class="modal-body"> <textarea id="editor" rows="10" cols="30" style="width:100%;height:400px"></textarea> </div> <div class="modal-footer"> <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button> <button class="btn btn-primary">Save changes</button> </div></div><script> $("#editor").kendoEditor({ tools: [ "bold", "italic", "underline", "strikethrough", "fontName", "fontSize", "foreColor", "backColor", "justifyLeft", "justifyCenter", "justifyRight", "justifyFull", "insertUnorderedList", "insertOrderedList", "indent", "outdent", "formatBlock", "createLink", "unlink", "insertImage", "subscript", "superscript", "viewHtml" ] }); var editor = $("#editor").data("kendoEditor"); editor.value("test testes");</script></body></html>