eb240478
Luigi Serra
public room cards...
|
1
|
<link rel="import" href="../../bower_components/polymer/polymer.html"/>
|
1b49624d
isisadmin
paper-card-contro...
|
2
3
4
5
|
<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"/>
|
1b49624d
isisadmin
paper-card-contro...
|
6
7
|
<dom-module id="paper-card-controllet">
|
1b49624d
isisadmin
paper-card-contro...
|
8
|
<template>
|
eb240478
Luigi Serra
public room cards...
|
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
|
<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>
:host {
display: inline-block;
margin: 0 8px 8px ;
font-size: 14px;
text-align: justify;
line-height: 10px;
--paper-fab-background: var(--accent-color);
font-family: 'Roboto', sans-serif;
}
paper-material {
border-radius: 2px;
background-color: white;
}
.preview {
position: relative;
margin-bottom: 24px;
}
.preview img {
border-top-right-radius: 2px;
border-top-left-radius: 2px;
width: 100%;
}
.legend {
position: absolute;
background: rgba(0,0,0,0.4);
bottom: -50px;
color: white;
height: 50px;
padding: 0 16px;
left: 0; right: 0;
z-index: 1;
}
paper-fab {
position: absolute;
right: 10px;
bottom: -18px;
z-index: 10;
--paper-fab-background:#2196F3;
}
#content ::content {
/*padding: 0 16px 8px;*/
padding: 0 8px 4px;
font-weight: 300;
color: var(--secondary-text-color);
line-height: 24px;
max-height: 400px;
position:relative;
overflow: hidden;
}
::content.buttons {
margin-top: 8px;
}
::content paper-button, ::content paper-icon-button {
font-weight: 500;
color: var(--accent-color);
}
</style>
<paper-material animated elevation="{{elevation}}" flex>
|
1b49624d
isisadmin
paper-card-contro...
|
75
|
<div class="vertical layout">
|
eb240478
Luigi Serra
public room cards...
|
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
<div class="preview">
<!--<template is="dom-if" if="{{checkType(type,'image')}}">
<template is="dom-if" if="{{img}}">
<img src="{{img}}" height="{{height}}" alt="">
</template>
</template>-->
<template is="dom-if" if="{{legend}}">
<div class="legend horizontal layout center">
<span>{{legend}}</span>
<template is="dom-if" if="{{icon}}">
<paper-fab mini icon="{{icon}}"></paper-fab>
</template>
</div>
</template>
|
1b49624d
isisadmin
paper-card-contro...
|
92
|
</div>
|
eb240478
Luigi Serra
public room cards...
|
93
94
95
|
<div id="content">
<content></content>
|
1b49624d
isisadmin
paper-card-contro...
|
96
|
</div>
|
eb240478
Luigi Serra
public room cards...
|
97
|
|
1b49624d
isisadmin
paper-card-contro...
|
98
99
|
</div>
</paper-material>
|
eb240478
Luigi Serra
public room cards...
|
100
|
|
1b49624d
isisadmin
paper-card-contro...
|
101
102
|
</template>
|
eb240478
Luigi Serra
public room cards...
|
103
104
|
<script src="../shared_js/perfect-scrollbar/js/min/perfect-scrollbar.jquery.min.js"></script>
|
1b49624d
isisadmin
paper-card-contro...
|
105
106
|
<script>
Polymer({
|
eb240478
Luigi Serra
public room cards...
|
107
|
is: "paper-card-controllet",
|
1b49624d
isisadmin
paper-card-contro...
|
108
109
110
|
properties: {
width: {
type: Number,
|
1b49624d
isisadmin
paper-card-contro...
|
111
112
|
observer: "_changeWidth",
},
|
eb240478
Luigi Serra
public room cards...
|
113
114
115
116
117
118
119
120
|
height: {
type: Number,
observer: "_changeHeight",
},
type:{
type: String,
value: "text"
}
|
1b49624d
isisadmin
paper-card-contro...
|
121
|
},
|
eb240478
Luigi Serra
public room cards...
|
122
|
|
1b49624d
isisadmin
paper-card-contro...
|
123
124
|
_changeWidth: function(data){
this.style.width = data + "px";
|
eb240478
Luigi Serra
public room cards...
|
125
126
127
128
129
130
131
132
|
this.querySelector("#content").width = (data-50) + "px";
//$(this.$.content).perfectScrollbar();
},
_changeHeight: function(data){
this.style.height = data + "px";
this.querySelector("#content").height = (data-50) + "px";
//$(this.$.content).perfectScrollbar();
|
1b49624d
isisadmin
paper-card-contro...
|
133
|
},
|
eb240478
Luigi Serra
public room cards...
|
134
135
136
137
|
checkType: function(type, check){
return (type == check);
}
|
1b49624d
isisadmin
paper-card-contro...
|
138
139
140
|
})
</script>
|
1b49624d
isisadmin
paper-card-contro...
|
141
|
</dom-module>
|