/
SalesmanPagePuttControl.cshtml
44 lines (41 loc) · 1.07 KB
/
SalesmanPagePuttControl.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<script id="pagePuttTemplate" type="text/x-jsrender">
{{for List}}
<li>
<a href="#">
<img src="../../Content/images/puttPlug.png" />
</a>
</li>
{{/for}}
</script>
<script type="text/javascript">
$(document).bind("pageshow", function (evt) {
debugger;
app.primePuttMat();
app.scorePuttMatRows();
app.teeOff();
});
$('body').live('swipeleft swiperight', function (event) {
if (event.type == "swiperight") {
debugger;
var index = app.getPuttMatBallIndex();
index = index == 0 ? 0 : index - 1;
app.teeOff(index);
}
if (event.type == "swipeleft") {
debugger;
var index = app.getPuttMatBallIndex();
var range = app.getPuttMatHoles() - 1;
index = index == range ? index : index + 1;
app.teeOff(index);
}
event.preventDefault();
});
</script>
}
});
</script>
<div id="puttMat">
<ul id="puttMatList">
</ul>
</div>