forked from omsmith/navigation-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcourse-menu.html
55 lines (43 loc) · 1.09 KB
/
course-menu.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
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../d2l-polymer-behaviors/d2l-id.html">
<link rel="import" href="find-page-object-behavior.html">
<link rel="import" href="graft-behavior.html">
<dom-module id="d2l-navigation-course-menu">
<template>
<style>
:host {
display: block;
line-height: 1.5rem;
}
</style>
<div class="d2l-navigation-course-menu-container"></div>
</template>
</dom-module>
<script>
Polymer({
is: 'd2l-navigation-course-menu',
listeners: {
'partial-render': '_onPartialRender'
},
behaviors: [
window.D2L.PolymerBehaviors.Navigation.FindPageObjectBehavior,
window.D2L.PolymerBehaviors.Navigation.GraftBehavior
],
properties: {
loaded: Boolean
},
load: function() {
if (this.loaded) {
return;
}
var placeholderId = D2L.Id.getUniqueId();
this.$$('.d2l-navigation-course-menu-container')
.setAttribute('id', placeholderId);
this.graft(placeholderId);
},
_onPartialRender: function() {
this.loaded = true;
this.fire('d2l-navigation-course-menu-loaded');
}
});
</script>