I have a kendo view that is bound to a kendo.observable with accept and reject actions. When reject is selected, I pop up a modalview that includes an input which requires comments as why they are rejecting. The modal has two buttons, Reject and Cancel. If the users hits accept, I want to send the input back to the original views viewModel. I also expect all execution to stop when the modal is open, but it continues to run.
Here is a snippet of the viewModel and the modal view.
vm:
utils.showReject();
html:
Here is a snippet of the viewModel and the modal view.
vm:
var viewModel = kendo.observable({ accept: function () { // ajax call }, reject: function () { utils.showReject(); // modalview // get response from showReject (i.e., if they hit Reject, // give me their comments from the input) // ajax call with comments from above }});var showReject = function () { $("#reject-view").show().data().kendoMobileModalView.open(); }<div data-role="modalview" id="reject-view" style="display: none; width: 70%;"> <div data-role="header"> <div data-role="navbar"> <span>Are you sure?</span><br /> <textarea rows="3" placeholder="Enter Reject Reason" style="width: 95%; padding: 5px;"></textarea><br /> <a data-click="app.closeModal" data-modalid="#reject-view" data-role="button">Reject</a> <a data-click="app.closeModal" data-modalid="#reject-view" data-role="button">Cancel</a> </div> </div> </div>