-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-manager.html
64 lines (59 loc) · 2.12 KB
/
page-manager.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
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../node-manager/node-manager.html">
<link rel="import" href="../paper-dropdown-menu/paper-dropdown-menu.html">
<link rel="import" href="../paper-listbox/paper-listbox.html">
<link rel="import" href="../paper-item/paper-item.html">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../polymerfire/firebase-document.html">
<dom-module id="page-manager">
<template>
<style type="text/css">
:host {
display: none;
}
:host([active]){
display: block;
margin: 0 auto;
width: 80%;
}
.center: {
text-align: center;
}
</style>
<firebase-document
path="/locales"
data="{{locales}}">
</firebase-document>
<div class="center">
<paper-dropdown-menu label="Locale">
<paper-listbox class="dropdown-content">
<template is="dom-repeat" items="[[locales]]">
<paper-item>{{item}}</paper-item>
</template>
</paper-listbox>
</paper-dropdown-menu>
<paper-button on-click="_updateFBNode">Get Page List</paper-button>
</div>
<node-manager fbnode$="{{fbnode}}" route="{{route}}" is-approvals-page$="[[isApprovalsPage]]"></node-manager>
</template>
<script>
Polymer({
is: 'page-manager',
properties: {
isApprovalsPage: {
type: Boolean,
value: false,
notify: true,
reflectToAttribute: true
}
},
_updateFBNode: function() {
var approvalsPage = '';
if(this.isApprovalsPage) {
approvalsPage = 'approvals/'
}
this.fbnode = approvalsPage + 'pages/' + this.$$('paper-dropdown-menu').selectedItemLabel;
}
});
</script>
</dom-module>