-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.html
91 lines (91 loc) · 3.38 KB
/
demo.html
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
<title>io-menu demo</title>
<script src="../webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../show-and-tell/show-and-tell.html">
<link rel="import" href="io-menu.html">
<style type="text/css">
html {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
body{
margin: 0.5rem;
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 13px;
background: #f3eee8;
}
.demo {
padding: 0.5rem;
margin: 0.5rem 0;
background: white;
position: relative;
}
.demo > :nth-child(2){
margin: 2em;
}
</style>
</head>
<body unresolved fullbleed>
<h2>io-menu Demos</h2>
<p>A custom menu element with a simple API and lots of customization options.</p>
<p>Documentation is available <a href="./index.html">here</a>.</p>
<div class="demo" style="">
<show-and-tell></show-and-tell>
<io-menu autoExpand fixed search></io-menu>
</div>
<script>
var menu;
window.addEventListener('polymer-ready', function() {
menu = document.querySelector('io-menu');
menu.options = [
{ label: 'Options', icon: 'close', options: [
{ label: 'Option1', options: [
{ label: 'Suboption1', action: function() { alert('Suboption1'); }, tooltip: 'This is a tooltip.' },
{ label: 'Suboption2', action: function(msg) { alert(msg); }, arguments: ['Suboption2'] },
{ label: 'Suboption3', action: function(msg1, msg2) { alert(msg1 + msg2); }, arguments: ['Suboption', '3'] }
] },
{ label: 'Option2', options: [
{ label: 'Suboption4', action: alert, arguments: ['Suboption4'] },
{ label: 'Suboption5', action: alert, arguments: ['Suboption', '5'] },
{ label: 'Suboption6', action: alert, arguments: 'Suboption 6' }
] },
{ label: 'Option3', options: [
{ label: 'suboption7' },
{ label: 'suboption8' },
{ label: 'suboption9' }
] }
] },
{ type: 'divider' },
{ label: 'Suboptions', autoExpand: false, options: [
{ label: 'Suboption1', options: [
{ label: 'Suboption2', horizontal: true, options: [
{ label: 'suboption3a' },
{ label: 'suboption3b' },
{ label: 'suboption3c' },
{ label: 'Suboption3d', options: [
{ label: 'Suboption4', options: [
{ label: 'Suboption5', options: [
{ label: 'Suboption6' }
] }
] }
] }
] }
] }
] }
];
});
setTimeout(function(){
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-53420116-1', 'auto');
ga('send', 'pageview');
},1000);
</script>
</body>
</html>