forked from fluxio/io-menu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.html
68 lines (68 loc) · 2.39 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>io-menu demo</title>
<script src="../webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="io-menu.html">
<style type="text/css">
html {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
body{
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
background: #ddd;
}
</style>
</head>
<body unresolved fullbleed>
<demo-app fit></demo-app>
<polymer-element name="demo-app">
<template>
Right-click or long-tap anywhere!
<io-menu options="{{options}}" search></io-menu>
</template>
<script>
Polymer({
options: [
{ label: 'Options', icon: 'chevron-right', 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', options: [
{ label: 'Suboption1', options: [
{ label: 'Suboption2', options: [
{ label: 'suboption3a' },
{ label: 'suboption3b' },
{ label: 'suboption3c' },
{ label: 'Suboption3d', options: [
{ label: 'Suboption4', options: [
{ label: 'Suboption5', options: [
{ label: 'Suboption6' }
] }
] }
] }
] }
] }
] }
]
});
</script>
</polymer-element>
</body>
</html>