eb240478
Luigi Serra
public room cards...
|
1
|
<link rel="import" href="../../bower_components/polymer/polymer.html"/>
|
1b49624d
isisadmin
paper-card-contro...
|
2
3
4
|
<link rel="import" href="../../bower_components/paper-material/paper-material.html"/>
<link rel="import" href="../../bower_components/paper-fab/paper-fab.html"/>
<link rel="import" href="../../bower_components/iron-icons/iron-icons.html"/>
|
b4190b56
Renato De Donato
myspace update
|
5
6
|
<link rel="import" href="../../bower_components/paper-dialog/paper-dialog.html"/>
<link rel="import" href="../../bower_components/neon-animation/neon-animation.html"/>
|
1b49624d
isisadmin
paper-card-contro...
|
7
|
|
1b49624d
isisadmin
paper-card-contro...
|
8
9
|
<dom-module id="paper-card-controllet">
|
1b49624d
isisadmin
paper-card-contro...
|
10
|
<template>
|
eb240478
Luigi Serra
public room cards...
|
11
12
13
|
<link rel="stylesheet" href="../shared_js/perfect-scrollbar/css/perfect-scrollbar.min.css">
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<style>
|
eb240478
Luigi Serra
public room cards...
|
14
|
|
b4190b56
Renato De Donato
myspace update
|
15
16
17
|
#paper_card_container {
font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 16px;
|
eb240478
Luigi Serra
public room cards...
|
18
|
background-color: white;
|
eb240478
Luigi Serra
public room cards...
|
19
20
|
}
|
b4190b56
Renato De Donato
myspace update
|
21
22
23
|
#content {
padding: 4px 4px 0px 4px;
position:relative;
|
eb240478
Luigi Serra
public room cards...
|
24
|
}
|
7383b38e
Luigi Serra
paper-card-contro...
|
25
|
|
0fc2aafe
Luigi Serra
updates
|
26
|
.legend {
|
7383b38e
Luigi Serra
paper-card-contro...
|
27
|
position: relative;
|
b4190b56
Renato De Donato
myspace update
|
28
29
30
31
|
top: -48px;
height: 32px;
padding: 16px 0px 0px 8px;
z-index: 1000;
|
7383b38e
Luigi Serra
paper-card-contro...
|
32
|
background: rgba(0,0,0,0.8);
|
eb240478
Luigi Serra
public room cards...
|
33
|
color: white;
|
b4190b56
Renato De Donato
myspace update
|
34
|
font-weight: 700;
|
a1f9b957
Luigi Serra
create card updates
|
35
|
word-wrap: break-word;
|
eb240478
Luigi Serra
public room cards...
|
36
|
}
|
eb240478
Luigi Serra
public room cards...
|
37
|
|
b4190b56
Renato De Donato
myspace update
|
38
39
|
.footer {
height: 16px;
|
eb240478
Luigi Serra
public room cards...
|
40
|
}
|
c76a9f85
Luigi Serra
card and controll...
|
41
|
|
b4190b56
Renato De Donato
myspace update
|
42
43
44
45
46
47
48
49
50
51
|
.comment {
position: relative;
top: -50px;
height: 50px;
background-color: white;
padding: 8px;
font-size: small;
color: #727272;
word-wrap: break-word;
overflow: hidden;
|
eb240478
Luigi Serra
public room cards...
|
52
|
}
|
c76a9f85
Luigi Serra
card and controll...
|
53
|
|
b4190b56
Renato De Donato
myspace update
|
54
55
56
57
|
paper-fab {
position: absolute;
z-index: 10;
--paper-fab-background:#2196F3;
|
eb240478
Luigi Serra
public room cards...
|
58
|
}
|
7383b38e
Luigi Serra
paper-card-contro...
|
59
|
|
b4190b56
Renato De Donato
myspace update
|
60
61
62
63
|
paper-fab.open {
/*bottom: 28px;*/
bottom: -20px;
right: 8px;
|
7383b38e
Luigi Serra
paper-card-contro...
|
64
|
}
|
36f13d09
Luigi Serra
selection control...
|
65
|
|
b4190b56
Renato De Donato
myspace update
|
66
|
paper-fab.modify {
|
36f13d09
Luigi Serra
selection control...
|
67
|
top: -12px;
|
b4190b56
Renato De Donato
myspace update
|
68
|
right: 20px;
|
36f13d09
Luigi Serra
selection control...
|
69
70
71
72
|
--iron-icon-height: 18px;
--iron-icon-width: 18px;
width: 24px;
height: 24px;
|
b4190b56
Renato De Donato
myspace update
|
73
|
--paper-fab-background:#B6B6B6;
|
36f13d09
Luigi Serra
selection control...
|
74
|
}
|
c76a9f85
Luigi Serra
card and controll...
|
75
|
|
b4190b56
Renato De Donato
myspace update
|
76
77
78
|
paper-fab.delete {
top: -12px;
right: -12px;
|
c76a9f85
Luigi Serra
card and controll...
|
79
80
81
82
|
--iron-icon-height: 18px;
--iron-icon-width: 18px;
width: 24px;
height: 24px;
|
b4190b56
Renato De Donato
myspace update
|
83
|
--paper-fab-background:#B6B6B6;
|
c76a9f85
Luigi Serra
card and controll...
|
84
85
|
}
|
b4190b56
Renato De Donato
myspace update
|
86
87
88
89
90
91
92
|
paper-dialog {
margin: 0px;
padding: 0px;
}
#fullscreen_container {
display: inline;
|
c76a9f85
Luigi Serra
card and controll...
|
93
94
|
position: fixed;
width: 80%;
|
b4190b56
Renato De Donato
myspace update
|
95
|
height: 70vh;
|
c76a9f85
Luigi Serra
card and controll...
|
96
97
|
right: 0;
left: 0;
|
b4190b56
Renato De Donato
myspace update
|
98
|
top: 64px;
|
c76a9f85
Luigi Serra
card and controll...
|
99
100
|
margin-right: auto;
margin-left: auto;
|
35420b08
Luigi Serra
paper-card-contro...
|
101
|
z-index: 1100;
|
b4190b56
Renato De Donato
myspace update
|
102
103
|
padding: 8px;
background-color: white;
|
c76a9f85
Luigi Serra
card and controll...
|
104
105
|
}
|
b4190b56
Renato De Donato
myspace update
|
106
107
|
#fullscreen_content {
margin: 0px;
|
c76a9f85
Luigi Serra
card and controll...
|
108
|
}
|
eb240478
Luigi Serra
public room cards...
|
109
110
111
|
</style>
|
b4190b56
Renato De Donato
myspace update
|
112
|
<paper-material id="paper_card_container" elevation="{{elevation}}">
|
eb240478
Luigi Serra
public room cards...
|
113
|
|
b4190b56
Renato De Donato
myspace update
|
114
|
<paper-fab class="modify" mini icon="create" on-click="_handleModifyClick"></paper-fab>
|
eb240478
Luigi Serra
public room cards...
|
115
|
|
b4190b56
Renato De Donato
myspace update
|
116
|
<paper-fab class="delete" mini icon="delete" on-click="_handleDeleteClick"></paper-fab>
|
c76a9f85
Luigi Serra
card and controll...
|
117
|
|
b4190b56
Renato De Donato
myspace update
|
118
119
120
|
<div id="content">
<content></content>
</div>
|
c76a9f85
Luigi Serra
card and controll...
|
121
|
|
b4190b56
Renato De Donato
myspace update
|
122
|
<div class="legend">
|
7383b38e
Luigi Serra
paper-card-contro...
|
123
|
|
b4190b56
Renato De Donato
myspace update
|
124
|
{{cardTitle}}
|
7383b38e
Luigi Serra
paper-card-contro...
|
125
|
|
b4190b56
Renato De Donato
myspace update
|
126
|
<template is="dom-if" if="{{checkType(cardType, 'link')}}">
|
7383b38e
Luigi Serra
paper-card-contro...
|
127
|
|
b4190b56
Renato De Donato
myspace update
|
128
|
<paper-fab class="open" mini icon="link" on-click="_handleOpenClick"></paper-fab>
|
7383b38e
Luigi Serra
paper-card-contro...
|
129
|
|
b4190b56
Renato De Donato
myspace update
|
130
|
</template>
|
7383b38e
Luigi Serra
paper-card-contro...
|
131
|
|
b4190b56
Renato De Donato
myspace update
|
132
|
<template is="dom-if" if="{{checkType(cardType, 'text')}}">
|
7383b38e
Luigi Serra
paper-card-contro...
|
133
|
|
b4190b56
Renato De Donato
myspace update
|
134
|
<paper-fab class="open" mini icon="text-format" on-click="_handleOpenClick"></paper-fab>
|
7383b38e
Luigi Serra
paper-card-contro...
|
135
|
|
b4190b56
Renato De Donato
myspace update
|
136
|
</template>
|
7383b38e
Luigi Serra
paper-card-contro...
|
137
|
|
b4190b56
Renato De Donato
myspace update
|
138
|
<template is="dom-if" if="{{checkType(cardType, 'datalet')}}">
|
7383b38e
Luigi Serra
paper-card-contro...
|
139
|
|
b4190b56
Renato De Donato
myspace update
|
140
|
<paper-fab class="open" mini icon="assessment" on-click="_handleOpenClick"></paper-fab>
|
7383b38e
Luigi Serra
paper-card-contro...
|
141
|
|
b4190b56
Renato De Donato
myspace update
|
142
|
</template>
|
7383b38e
Luigi Serra
paper-card-contro...
|
143
|
|
b4190b56
Renato De Donato
myspace update
|
144
|
</div>
|
7383b38e
Luigi Serra
paper-card-contro...
|
145
|
|
b4190b56
Renato De Donato
myspace update
|
146
147
148
|
<div class="footer">
<div class="comment">{{comment}}</div>
</div>
|
eb240478
Luigi Serra
public room cards...
|
149
|
|
b4190b56
Renato De Donato
myspace update
|
150
151
152
153
|
<paper-dialog id="fullscreen_container" entry-animation="scale-up-animation" exit-animation="fade-out-animation">
<!--with-backdrop-->
<div id="fullscreen_content"></div>
</paper-dialog>
|
c76a9f85
Luigi Serra
card and controll...
|
154
|
|
1b49624d
isisadmin
paper-card-contro...
|
155
|
</paper-material>
|
eb240478
Luigi Serra
public room cards...
|
156
|
|
1b49624d
isisadmin
paper-card-contro...
|
157
158
|
</template>
|
eb240478
Luigi Serra
public room cards...
|
159
160
|
<script src="../shared_js/perfect-scrollbar/js/min/perfect-scrollbar.jquery.min.js"></script>
|
1b49624d
isisadmin
paper-card-contro...
|
161
162
|
<script>
Polymer({
|
eb240478
Luigi Serra
public room cards...
|
163
|
is: "paper-card-controllet",
|
1b49624d
isisadmin
paper-card-contro...
|
164
|
properties: {
|
b4190b56
Renato De Donato
myspace update
|
165
|
|
1b49624d
isisadmin
paper-card-contro...
|
166
167
|
width: {
type: Number,
|
563db87f
isisadmin
bug fix
|
168
|
observer: "_changeWidth"
|
1b49624d
isisadmin
paper-card-contro...
|
169
|
},
|
b4190b56
Renato De Donato
myspace update
|
170
|
|
eb240478
Luigi Serra
public room cards...
|
171
172
|
height: {
type: Number,
|
563db87f
isisadmin
bug fix
|
173
|
observer: "_changeHeight"
|
eb240478
Luigi Serra
public room cards...
|
174
|
},
|
b4190b56
Renato De Donato
myspace update
|
175
176
177
178
179
180
|
elevation:{
type: Number,
value: 3
},
|
4b412909
Luigi Serra
paper-card-contro...
|
181
|
cardType:{
|
eb240478
Luigi Serra
public room cards...
|
182
183
|
type: String,
value: "text"
|
6f8e74f7
Luigi Serra
card update
|
184
|
},
|
b4190b56
Renato De Donato
myspace update
|
185
|
|
0fc2aafe
Luigi Serra
updates
|
186
|
cardTitle:{
|
6f8e74f7
Luigi Serra
card update
|
187
|
type: String,
|
67b280f4
Luigi Serra
search feature
|
188
|
value: ""
|
b9dd9495
Luigi Serra
selection control...
|
189
|
},
|
b4190b56
Renato De Donato
myspace update
|
190
191
192
193
|
comment:{//cardDescription
cardType: String,
value: ""
|
6f8e74f7
Luigi Serra
card update
|
194
195
196
197
|
}
},
|
e27db669
isisadmin
paper card contro...
|
198
|
attached: function(){
|
4b412909
Luigi Serra
paper-card-contro...
|
199
|
if(this.cardType == "text"){
|
b4190b56
Renato De Donato
myspace update
|
200
|
this.$.content.style.backgroundColor = "#FFFFCC";
|
eb240478
Luigi Serra
public room cards...
|
201
|
}
|
b4190b56
Renato De Donato
myspace update
|
202
|
$(this.$.fullscreen_container).perfectScrollbar();
|
1b49624d
isisadmin
paper-card-contro...
|
203
|
},
|
eb240478
Luigi Serra
public room cards...
|
204
|
|
b4190b56
Renato De Donato
myspace update
|
205
206
207
|
_changeWidth: function(){
this.style.width = this.width + "px";
this.$.content.style.width = this.width - 8 + "px";
|
eb240478
Luigi Serra
public room cards...
|
208
209
|
},
|
b4190b56
Renato De Donato
myspace update
|
210
211
212
|
_changeHeight: function(){
this.style.height = this.height + 64 + "px";
this.$.content.style.height = this.height - 4 + "px";
|
6f8e74f7
Luigi Serra
card update
|
213
|
$(this.$.content).perfectScrollbar();
|
1b49624d
isisadmin
paper-card-contro...
|
214
|
},
|
eb240478
Luigi Serra
public room cards...
|
215
216
217
|
checkType: function(type, check){
return (type == check);
|
9d4a34db
Luigi Serra
selection control...
|
218
219
|
},
|
b4190b56
Renato De Donato
myspace update
|
220
|
_handleDeleteClick: function(){
|
c76a9f85
Luigi Serra
card and controll...
|
221
222
223
|
this.fire('paper-card-controllet_delete-clicked', {data : this});
},
|
b4190b56
Renato De Donato
myspace update
|
224
225
226
|
_handleModifyClick: function(){
this.fire('paper-card-controllet_details-clicked', {data : this});
},
|
c76a9f85
Luigi Serra
card and controll...
|
227
|
|
b4190b56
Renato De Donato
myspace update
|
228
229
|
_handleOpenClick: function(){
var html;
|
c76a9f85
Luigi Serra
card and controll...
|
230
231
|
switch(this.cardType){
case 'text':
|
b4190b56
Renato De Donato
myspace update
|
232
|
this.$.fullscreen_container.style.backgroundColor = "#ffc";
|
c76a9f85
Luigi Serra
card and controll...
|
233
234
|
break;
case 'link':
|
b4190b56
Renato De Donato
myspace update
|
235
|
window.open(this.getAttribute('card-link'), '_blank');
|
c76a9f85
Luigi Serra
card and controll...
|
236
237
238
|
return;
}
|
35420b08
Luigi Serra
paper-card-contro...
|
239
|
var html = this.$.content.innerHTML;
|
35420b08
Luigi Serra
paper-card-contro...
|
240
241
|
this.$.fullscreen_content.innerHTML = html;
|
b4190b56
Renato De Donato
myspace update
|
242
243
|
this.$.fullscreen_container.open();
this.$.fullscreen_container.style.display = "inline";//datalet resize in chrome
|
c76a9f85
Luigi Serra
card and controll...
|
244
|
}
|
b4190b56
Renato De Donato
myspace update
|
245
|
|
1b49624d
isisadmin
paper-card-contro...
|
246
247
248
|
})
</script>
|
1b49624d
isisadmin
paper-card-contro...
|
249
|
</dom-module>
|