/openshift/adei

To get this branch, use:
bzr branch http://darksoft.org/webbzr/openshift/adei

« back to all changes in this revision

Viewing changes to includes/sw/index.html

  • Committer: Suren A. Chilingaryan
  • Date: 2011-01-26 02:48:39 UTC
  • mto: This revision was merged to the branch mainline in revision 212.
  • Revision ID: csa@dside.dyndns.org-20110126024839-nv6qp2ie9stmd2dn
Support of Appled devices by Toni Pirhonen

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html>
 
2
<head>
 
3
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
4
        <meta name="viewport" id="iphone-viewport" content="minimum-scale=1.0, maximum-scale=1.0, width=device-width" />
 
5
        <meta name="apple-mobile-web-app-capable" content="yes" />
 
6
 
 
7
        <link rel="stylesheet" href="spinningwheel.css" type="text/css" media="all" />
 
8
        <script type="text/javascript" src="spinningwheel-min.js?v=1.4"></script>
 
9
 
 
10
        <title>Spinning Wheel for iPhone/iPod touch</title>
 
11
 
 
12
<script type="text/javascript">
 
13
function openWeight() {
 
14
        
 
15
        var numbers = { 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9 };
 
16
        SpinningWheel.addSlot(numbers, 'right');
 
17
        SpinningWheel.addSlot(numbers, 'right');
 
18
        SpinningWheel.addSlot(numbers, 'right');
 
19
        SpinningWheel.addSlot({ separator: '.' }, 'readonly shrink');
 
20
        SpinningWheel.addSlot(numbers, 'right');
 
21
        SpinningWheel.addSlot({ Kg: 'Kg', Lb: 'Lb', St: 'St' }, 'shrink');
 
22
        
 
23
        SpinningWheel.setCancelAction(cancel);
 
24
        SpinningWheel.setDoneAction(done);
 
25
        
 
26
        SpinningWheel.open();
 
27
}
 
28
 
 
29
function openBirthDate() {
 
30
        var now = new Date();
 
31
        var days = { };
 
32
        var years = { };
 
33
        var months = { 1: 'Gen', 2: 'Feb', 3: 'Mar', 4: 'Apr', 5: 'May', 6: 'Jun', 7: 'Jul', 8: 'Aug', 9: 'Sep', 10: 'Oct', 11: 'Nov', 12: 'Dec' };
 
34
        
 
35
        for( var i = 1; i < 32; i += 1 ) {
 
36
                days[i] = i;
 
37
        }
 
38
 
 
39
        for( i = now.getFullYear()-100; i < now.getFullYear()+1; i += 1 ) {
 
40
                years[i] = i;
 
41
        }
 
42
 
 
43
        SpinningWheel.addSlot(years, 'right', 1999);
 
44
        SpinningWheel.addSlot(months, '', 4);
 
45
        SpinningWheel.addSlot(days, 'right', 12);
 
46
        
 
47
        SpinningWheel.setCancelAction(cancel);
 
48
        SpinningWheel.setDoneAction(done);
 
49
        
 
50
        SpinningWheel.open();
 
51
}
 
52
 
 
53
function openOneSlot() {
 
54
        SpinningWheel.addSlot({1: 'Ichi', 2: 'Ni', 3: 'San', 4: 'Shi', 5: 'Go'});
 
55
        
 
56
        SpinningWheel.setCancelAction(cancel);
 
57
        SpinningWheel.setDoneAction(done);
 
58
        
 
59
        SpinningWheel.open();
 
60
}
 
61
 
 
62
function done() {
 
63
        var results = SpinningWheel.getSelectedValues();
 
64
        document.getElementById('result').innerHTML = 'values: ' + results.values.join(' ') + '<br />keys: ' + results.keys.join(', ');
 
65
}
 
66
 
 
67
function cancel() {
 
68
        document.getElementById('result').innerHTML = 'cancelled!';
 
69
}
 
70
 
 
71
 
 
72
window.addEventListener('load', function(){ setTimeout(function(){ window.scrollTo(0,0); }, 100); }, true);
 
73
 
 
74
</script>
 
75
 
 
76
 
 
77
<style type="text/css">
 
78
body { text-align:center; font-family:helvetica; }
 
79
button { font-size:16px; }
 
80
#result { margin:10px; background:#aaa; -webkit-border-radius:8px; padding:8px; font-size:18px; }
 
81
</style>
 
82
 
 
83
</head>
 
84
 
 
85
<body>
 
86
<p>Spinning Wheel slot machine alike widget for iPhone and iPod touch. 
 
87
This demo works only on the simulator and the real devices, it does not work on any other browser.</p>
 
88
<button onclick="openBirthDate()">birth date</button>
 
89
<button onclick="openWeight()">weight</button>
 
90
<button onclick="openOneSlot()">1 slot</button>
 
91
<p id="result">results</p>
 
92
<p><a href="http://cubiq.org/spinning-wheel-on-webkit-for-iphone-ipod-touch/11">Read the related article on cubiq.org</a></p>
 
93
 
 
94
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
 
95
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
 
96
 
 
97
this text is here for the sole purpose of making the page longer
 
98
</body>
 
99
 
 
100
</html>
 
 
b'\\ No newline at end of file'