-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstrolch-wc-notification-detail.html
81 lines (64 loc) · 2.46 KB
/
strolch-wc-notification-detail.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
<!-- Components -->
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../iron-ajax/iron-ajax.html">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../strolch-wc-util-behavior/strolch-wc-component-behavior.html">
<link rel="import" href="../strolch-wc-localize-behavior/strolch-wc-localize-behavior.html">
<link rel="import" href="../strolch-wc-raw-text/strolch-wc-raw-text.html">
<link rel="import" href="../strolch-wc-styles/strolch-wc-styles.html">
<link rel="import" href="./strolch-wc-notifications-behavior.html">
<link rel="import" href="./strolch-wc-notification.html">
<dom-module id="strolch-wc-notification-detail">
<template>
<!-- Style -->
<style is="custom-style" include="strolch-wc-styles">
:host {
}
paper-dialog {
width: 600px;
}
</style>
<!-- Content -->
<paper-dialog id="dlg" modal on-iron-overlay-closed="close">
<iron-a11y-keys keys="esc" on-keys-pressed="close"></iron-a11y-keys>
<h2>[[notification.title]]</h2>
<strolch-wc-raw-text text="[[notification.text]]"></strolch-wc-raw-text>
<dl class="g-dl">
<dt>[[localize('validFrom')]]</dt>
<dd>[[formatDateTimeDashIfEmpty(notification.visibleFrom)]]</dd>
<dt>[[localize('validTo')]]</dt>
<dd>[[formatDateTimeDashIfEmpty(notification.visibleTo)]]</dd>
</dl>
<div class="buttons">
<paper-button dialog-confirm autofocus>[[localize('close')]]</paper-button>
</div>
</paper-dialog>
</template>
<script>
Polymer({
<!-- Settings -->
is: "strolch-wc-notification-detail",
<!-- Behaviors -->
behaviors: [
StrolchLocalizeBehavior, StrolchNotificationsBehavior
],
<!-- Properties -->
properties: {
localesPath: {
type: String
},
notification: {
type: Object
}
},
<!-- Functions -->
open: function (notification) {
this.notification = notification;
this.$.dlg.open();
},
close: function () {
this.$.dlg.close();
},
});
</script>
</dom-module>