97f5fe0e
Andrea Petta
cocreation paper ...
|
1
2
|
<link rel="import" href="../../bower_components/polymer/polymer.html"/>
<link rel="import" href="../../bower_components/paper-card/paper-card.html"/>
|
bbfe6cb7
Luigi Serra
updates
|
3
|
<link rel="import" href="../../bower_components/paper-fab/paper-fab.html">
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
4
5
6
|
<link rel="import" href="../../bower_components/paper-icon-button/paper-icon-button.html"/>
<link rel="import" href="../../bower_components/paper-button/paper-button.html"/>
<link rel="import" href="../../bower_components/iron-icon/iron-icon.html"/>
|
4710a0b6
Renato De Donato
cocreation card
|
7
|
<link rel="import" href="../../bower_components/paper-tooltip/paper-tooltip.html">
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
8
|
|
4710a0b6
Renato De Donato
cocreation card
|
9
|
<script src="../../locales/cocreation_paper_card_ln.js"></script>
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
10
11
12
13
14
15
|
<dom-module id="cocreation-paper-card-controllet">
<template>
<style>
|
4710a0b6
Renato De Donato
cocreation card
|
16
17
18
19
20
21
|
#card_container {
height: 200px;
width: 300px;
margin-top: 32px;
margin-left: 32px;
margin-right: -3.7px;
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
22
23
|
}
|
4710a0b6
Renato De Donato
cocreation card
|
24
25
26
27
|
#card_container * {
font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 24px;
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
28
29
|
}
|
4710a0b6
Renato De Donato
cocreation card
|
30
31
32
33
34
|
.card-content {
padding: 12px;
height: 103px;
/*overflow: hidden;*/
background: #E0E0E0;
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
35
36
|
}
|
4710a0b6
Renato De Donato
cocreation card
|
37
38
39
40
41
|
.card-actions {
padding: 12px;
height: 48px;
/*overflow: hidden;*/
border-color: #2196F3;
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
42
43
|
}
|
4710a0b6
Renato De Donato
cocreation card
|
44
45
46
47
48
49
50
51
52
53
|
paper-button {
height: 48px;
width: 136px;/*+2*/
padding: 12px;
margin: 0;
font-weight: 700;
background: #FFFFFF;
color: #000000;
--paper-button-ink-color: #2196F3;
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
54
55
|
}
|
4710a0b6
Renato De Donato
cocreation card
|
56
57
58
|
paper-button.info {
cursor: help;
float: right;
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
59
60
|
}
|
4710a0b6
Renato De Donato
cocreation card
|
61
62
63
|
paper-button.info:hover {
color: #000000;
}
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
64
|
|
4710a0b6
Renato De Donato
cocreation card
|
65
66
|
paper-button:hover {
color: #2196F3;
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
67
68
|
}
|
4710a0b6
Renato De Donato
cocreation card
|
69
70
71
72
73
74
75
76
|
paper-icon-button[icon="info-outline"] {
cursor: help;
float: right;
height: 48px;
width: 48px;
padding: 8px;
color: #000000;
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
77
78
|
}
|
4710a0b6
Renato De Donato
cocreation card
|
79
80
81
|
paper-tooltip {
min-width: 400px;
--paper-tooltip-background: black;
|
bbfe6cb7
Luigi Serra
updates
|
82
83
|
}
|
4710a0b6
Renato De Donato
cocreation card
|
84
|
paper-fab {
|
f689abd6
Luigi Serra
updates
|
85
|
position: absolute;
|
4710a0b6
Renato De Donato
cocreation card
|
86
87
88
89
90
91
92
|
z-index: 10;
--paper-fab-background:#2196F3;
}
paper-fab.delete {
top: -12px;
right: -12px;
|
f689abd6
Luigi Serra
updates
|
93
94
95
96
|
--iron-icon-height: 18px;
--iron-icon-width: 18px;
width: 24px;
height: 24px;
|
4710a0b6
Renato De Donato
cocreation card
|
97
|
--paper-fab-background:#B6B6B6;
|
f689abd6
Luigi Serra
updates
|
98
99
|
}
|
4710a0b6
Renato De Donato
cocreation card
|
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
#card_container br {
display: block;
margin-top: 8px;
content: " ";
}
#card_container p {
margin: 0;
padding: 0;
}
#card_container p .title{
font-weight: 700;
color: #2196F3;
white-space: nowrap;
}
#card_container p .description{
}
#card_container .name{
font-size: 18px;
font-weight: 700;
color: #2196F3;
height: 32px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
130
|
|
4710a0b6
Renato De Donato
cocreation card
|
131
132
133
|
#card_container .owner{
font-size: 14px;
height: 47px;
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
134
|
|
4710a0b6
Renato De Donato
cocreation card
|
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
#card_container .time{
display: flex;
flex-direction: row;
height: 24px;
}
#card_container .from {
width: 50%;
font-size: 12px;
}
#card_container .to {
width: 50%;
font-size: 12px;
}
paper-fab.type {
bottom: -20px;
right: 12px;
cursor: auto;
}
</style>
<paper-card id="card_container">
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
165
|
<div class="card-content">
|
4710a0b6
Renato De Donato
cocreation card
|
166
167
168
169
170
171
172
173
174
175
176
177
|
<template is="dom-if" if="{{isOwner}}">
<paper-fab id="card_delete" class="delete" mini icon="delete" on-click="_handleDeleteClick"></paper-fab>
</template>
<div class="name">{{name}}</div>
<div class="owner">{{owner}}</div>
<div class="time">
<div class="from">
<iron-icon class="icon-from" icon="alarm"></iron-icon> {{from}}
</div>
<div class="to">
<iron-icon class="icon-to" icon="alarm-off"></iron-icon> {{to}}
</div>
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
178
|
</div>
|
4710a0b6
Renato De Donato
cocreation card
|
179
180
181
182
183
184
|
<template is="dom-if" if="{{!checkRoomType(roomType)}}">
<paper-fab mini icon="assessment" class="type" noink></paper-fab>
</template>
<template is="dom-if" if="{{checkRoomType(roomType)}}">
<paper-fab mini icon="description" class="type" noink></paper-fab>
</template>
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
185
186
|
</div>
<div class="card-actions">
|
4710a0b6
Renato De Donato
cocreation card
|
187
188
189
190
191
192
193
194
195
196
197
|
<paper-button on-click="_onExplore"><span id="explore"></span></paper-button>
<paper-button id="goal_button" class="info"><span id="goal"></span></paper-button>
<!--<paper-icon-button id="goal_button" icon="info-outline" noink></paper-icon-button>-->
<paper-tooltip for="goal_button" position="bottom" offset="-8">
<p>
<span class="title" id="tooltip_goal"></span>
<br>
<span class="description">{{goal}}</span>
</p>
</paper-tooltip>
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
198
|
</div>
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
199
200
201
202
203
204
205
206
207
208
209
210
211
|
</paper-card>
</template>
<script src="../shared_js/perfect-scrollbar/js/min/perfect-scrollbar.jquery.min.js"></script>
<script>
Polymer({
is: "cocreation-paper-card-controllet",
properties: {
name:{
type: String,
|
4710a0b6
Renato De Donato
cocreation card
|
212
|
value: ""
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
213
214
215
|
},
owner:{
type: String,
|
4710a0b6
Renato De Donato
cocreation card
|
216
|
value: ""
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
217
218
219
|
},
from:{
type: String,
|
4710a0b6
Renato De Donato
cocreation card
|
220
|
value: ""
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
221
222
223
|
},
to:{
type: String,
|
4710a0b6
Renato De Donato
cocreation card
|
224
|
value: ""
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
225
226
227
|
},
goal:{
type: String,
|
4710a0b6
Renato De Donato
cocreation card
|
228
|
value: ""
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
229
|
},
|
13c53ccd
Luigi Serra
cards updates
|
230
231
232
|
roomUrl: {
type: String,
value: undefined
|
bbfe6cb7
Luigi Serra
updates
|
233
234
235
236
|
},
roomType:{
type: String,
value: undefined
|
f689abd6
Luigi Serra
updates
|
237
238
239
240
241
242
243
244
|
},
isOwner: {
type: Boolean,
value: false
},
roomId:{
type: Number,
value: undefined
|
13c53ccd
Luigi Serra
cards updates
|
245
|
}
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
246
247
248
|
},
attached: function(){
|
4710a0b6
Renato De Donato
cocreation card
|
249
|
cocreation_room_ln["ln"] = ODE.user_language;
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
250
|
|
4710a0b6
Renato De Donato
cocreation card
|
251
252
253
|
this.$.goal.innerHTML = cocreation_room_ln["goal_" + cocreation_room_ln["ln"]];
this.$.tooltip_goal.innerHTML = cocreation_room_ln["goal_" + cocreation_room_ln["ln"]];
this.$.explore.innerHTML = cocreation_room_ln["explore_" + cocreation_room_ln["ln"]];
|
13c53ccd
Luigi Serra
cards updates
|
254
255
|
},
|
f689abd6
Luigi Serra
updates
|
256
257
258
259
|
_handleDeleteClick: function(e){
this.fire("cocreation-paper-card-controllet_delete", {roomId: this.roomId});
},
|
13c53ccd
Luigi Serra
cards updates
|
260
261
|
_onExplore: function(e){
window.location = this.roomUrl;
|
bbfe6cb7
Luigi Serra
updates
|
262
|
},
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
263
|
|
bbfe6cb7
Luigi Serra
updates
|
264
|
checkRoomType: function(type){
|
f689abd6
Luigi Serra
updates
|
265
|
return (type == "knowledge") ? true : false;
|
bbfe6cb7
Luigi Serra
updates
|
266
|
}
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
267
268
269
270
|
})
</script>
</dom-module>
|