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
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
|
<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"/>
<link rel="import" href="../../bower_components/iron-collapse/iron-collapse.html"/>
<dom-module id="cocreation-paper-card-controllet">
<template>
<style>
iron-icon{
padding-left: 5px;
padding-right: 5px;
--iron-icon-height: 16px;
--iron-icon-width: 16px;
}
iron-icon.icon-from{
--iron-icon-fill-color : #000000;
}
iron-icon.icon-to{
--iron-icon-fill-color : #ff0000;
}
paper-card.cocreation {
width: 310px;
}
.from, .to {
font-size: 13px;
color: #CCCCCC;
}
.rate-content {
@apply(--layout-flex);
float: left;
width: 100%;
}
.rate-header { @apply(--paper-font-headline); }
.rate-name { color: var(--paper-grey-600); margin: 10px 0; }
paper-icon-button.rate-icon {
--iron-icon-fill-color: white;
--iron-icon-stroke-color: var(--paper-grey-600);
}
.collapse-content {
width: 200px;
padding: 15px;
}
iron-collapse.iron-collapse-over
{
position: absolute;
left: -1px;
margin:0;
padding:0;
z-index:10;
background-color: #FFFFFF;
border: solid 1px #E6E6E6;
border-top: none !important;
min-width: 310px;
min-height: 188px;
}
|
bbfe6cb7
Luigi Serra
updates
|
71
72
73
74
75
76
77
|
.badge{
position: absolute;
right: 5px;
bottom: 5px;
background: #2196F3;
}
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
78
79
80
81
82
83
84
85
86
87
88
89
90
|
</style>
<paper-card class="cocreation">
<div class="rate-content">
<div class="card-content">
<div class="rate-header">{{name}}</div>
<div class="rate-name">{{owner}}</div>
<div>
<iron-icon class="icon-from" icon="alarm"></iron-icon>
<span class="from">{{from}}</span>
<iron-icon class="icon-to" icon="alarm-off"></iron-icon>
<span class="to">{{to}}</span>
|
bbfe6cb7
Luigi Serra
updates
|
91
|
<template is="dom-if" if="{{!checkRoomType(roomType)}}">
|
d194a8ba
Luigi Serra
updates
|
92
|
<paper-fab mini disabled icon="assessment" class="badge data"></paper-fab>
|
bbfe6cb7
Luigi Serra
updates
|
93
94
|
</template>
<template is="dom-if" if="{{checkRoomType(roomType)}}">
|
d194a8ba
Luigi Serra
updates
|
95
|
<paper-fab mini disabled icon="description" class="badge knowledge"></paper-fab>
|
bbfe6cb7
Luigi Serra
updates
|
96
|
</template>
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
97
98
99
|
</div>
</div>
<div class="card-actions">
|
13c53ccd
Luigi Serra
cards updates
|
100
|
<paper-button on-click="_onExplore">Explore</paper-button>
|
d194a8ba
Luigi Serra
updates
|
101
|
<paper-icon-button icon="expand-less" on-click="_toggle" style="float:right;"></paper-icon-button>
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
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
130
131
132
133
134
135
136
137
138
139
|
<iron-collapse class="iron-collapse-over" id="more_info" no-animation>
<div class="collapse-content">
{{goal}}
</div>
</iron-collapse>
</div>
</div>
</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,
value: "text"
},
owner:{
type: String,
value: "text"
},
from:{
type: String,
value: "text"
},
to:{
type: String,
value: "text"
},
goal:{
type: String,
value: "text"
},
|
13c53ccd
Luigi Serra
cards updates
|
140
141
142
|
roomUrl: {
type: String,
value: undefined
|
bbfe6cb7
Luigi Serra
updates
|
143
144
145
146
|
},
roomType:{
type: String,
value: undefined
|
13c53ccd
Luigi Serra
cards updates
|
147
|
}
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
148
149
150
151
152
153
154
155
156
157
|
},
attached: function(){
},
_toggle: function(){
var moreInfo = this.$.more_info;
var iconButton = Polymer.dom(event).localTarget;
iconButton.icon = moreInfo.opened ? 'expand-less' : 'expand-more';
moreInfo.toggle();
|
13c53ccd
Luigi Serra
cards updates
|
158
159
160
161
|
},
_onExplore: function(e){
window.location = this.roomUrl;
|
bbfe6cb7
Luigi Serra
updates
|
162
|
},
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
163
|
|
bbfe6cb7
Luigi Serra
updates
|
164
165
166
167
168
169
|
checkRoomType: function(type){
if(type == "knowledge")
return true;
else
return false;
}
|
97f5fe0e
Andrea Petta
cocreation paper ...
|
170
171
172
173
|
})
</script>
</dom-module>
|