or
<
a
data-rel
=
"modalview"
href
=
"#myModalView?someParam=123"
data-role
=
"button"
>Open MV </
a
>
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
>
01.
<!DOCTYPE html>
02.
<
html
>
03.
<
head
>
04.
<
title
>Social Leaderboard</
title
>
05.
<
link
rel
=
"stylesheet"
type
=
"text/css"
href
=
"https://da7xgjtj801h2.cloudfront.net/2013.3.1119/styles/kendo.common.min.css"
>
06.
<
link
rel
=
"stylesheet"
type
=
"text/css"
href
=
"https://da7xgjtj801h2.cloudfront.net/2013.3.1119/styles/kendo.default.min.css"
>
07.
<
link
rel
=
"stylesheet"
type
=
"text/css"
href
=
"https://da7xgjtj801h2.cloudfront.net/2013.3.1119/styles/kendo.mobile.all.min.css"
>
08.
09.
<
script
src
=
"https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"
type
=
"application/javascript"
></
script
>
10.
<
script
src
=
"https://da7xgjtj801h2.cloudfront.net/2013.3.1119/js/kendo.mobile.min.js"
type
=
"application/javascript"
></
script
>
11.
12.
<
script
>
13.
this.application = new kendo.mobile.Application(document.body);
14.
15.
$(document).ready(function Start(){
16.
$("#view-modal").data("kendoMobileModalView").open();
17.
});
18.
</
script
>
19.
</
head
>
20.
<
body
>
21.
<
div
data-role
=
"view"
data-title
=
"Modal Test"
id
=
"view-modaltest"
>
22.
<
header
data-role
=
"header"
>
23.
<
div
data-role
=
"navbar"
>
24.
<
a
data-role
=
"button"
data-align
=
"left"
id
=
"btnBack"
>Back</
a
>
25.
<
span
data-role
=
"view-title"
>Leaderboard</
span
>
26.
</
div
>
27.
<
ul
data-role
=
"buttongroup"
data-index
=
"0"
data-select
=
"OnSelectTimeFrame"
>
28.
<
li
>All-Time</
li
>
29.
<
li
>Monthly</
li
>
30.
<
li
>Weekly</
li
>
31.
</
ul
>
32.
</
header
>
33.
<
footer
data-role
=
"footer"
>
34.
<
div
data-role
=
"tabstrip"
class
=
"tabstrip"
data-select
=
"OnSelectLeaderboard"
>
35.
<
a
data-icon
=
"globe"
>Global</
a
>
36.
<
a
data-icon
=
"contacts"
>Friends</
a
>
37.
</
div
>
38.
</
footer
>
39.
</
div
>
40.
41.
<
div
data-role
=
"modalview"
id
=
"view-modal"
style
=
"width: 300px; height: 240px;"
>
42.
<
header
data-role
=
"header"
>
43.
<
div
data-role
=
"navbar"
>
44.
<
span
>Challenge Friend</
span
>
45.
</
div
>
46.
</
header
>
47.
<
div
>
49.
<
span
> X </
span
>
51.
</
div
>
52.
<
div
>
53.
<
a
data-role
=
"button"
id
=
"btnOKChallenge"
>OK</
a
>
54.
<
a
data-role
=
"button"
id
=
"btnCancelChallenge"
>Cancel</
a
>
55.
</
div
>
56.
</
div
>
57.
</
body
>
58.
</
html
>