bf28e75e
Luigi Serra
selection control...
|
1
2
3
4
5
6
|
<link rel="import" href="../../bower_components/polymer/polymer.html"/>
<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"/>
<link rel="import" href="../../bower_components/paper-input/paper-textarea.html"/>
|
49cc918f
Luigi Serra
selection control...
|
7
8
|
<link rel="import" href="../../controllets/paper-card-controllet/paper-card-controllet.html"/>
|
bf28e75e
Luigi Serra
selection control...
|
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<dom-module id="create-card-controllet">
<template>
<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;
padding-bottom: 30px;
|
49cc918f
Luigi Serra
selection control...
|
24
|
width: 100%;
|
bf28e75e
Luigi Serra
selection control...
|
25
26
27
28
29
|
}
paper-material {
background-color: white;
border-width: 1em;
|
49cc918f
Luigi Serra
selection control...
|
30
31
|
padding: 5px;
margin-bottom: 20px;
|
bf28e75e
Luigi Serra
selection control...
|
32
33
34
|
}
paper-fab {
|
49cc918f
Luigi Serra
selection control...
|
35
36
|
position: relative;
left: 90%;
|
bf28e75e
Luigi Serra
selection control...
|
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
--paper-fab-background:#2196F3;
}
#content ::content {
/*padding: 0 16px 8px;*/
padding: 0 16px 8px;
font-weight: 300;
color: var(--secondary-text-color);
line-height: 24px;
max-height: 400px;
position:relative;
overflow: auto;
}
::content.buttons {
margin-top: 8px;
}
::content paper-button, ::content paper-icon-button {
font-weight: 500;
color: var(--accent-color);
}
.avatar
{
display: inline-block;
|
49cc918f
Luigi Serra
selection control...
|
61
62
|
height: 0.7em;
width: 0.7em;
|
bf28e75e
Luigi Serra
selection control...
|
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
border-radius: 50%;
background: var(--paper-blue-500);
color: white;
line-height: 2em;
font-size: 1.87em;
text-align: center;
}
.title
{
position: relative;
left: 0px;
/*top: 0.60vh;
margin-left: 20px;*/
}
.big
{
font-size: 1.37em;
color: var(--google-grey-500);
}
.medium
{
font-size: 1em;
padding-bottom: 0.5em;
color : #000000;
font-weight: bold;
}
.small
{
font-size: 0.8em;
padding-top: 10px;
color: var(--paper-blue-500);
font-weight: bold;
}
|
49cc918f
Luigi Serra
selection control...
|
101
102
|
paper-textarea.custom_textarea{
/*max-width:40vw;*/
|
bf28e75e
Luigi Serra
selection control...
|
103
104
|
}
|
49cc918f
Luigi Serra
selection control...
|
105
106
107
|
div.vertical{
margin: 20px;
}
|
bf28e75e
Luigi Serra
selection control...
|
108
|
|
bf28e75e
Luigi Serra
selection control...
|
109
|
|
49cc918f
Luigi Serra
selection control...
|
110
|
</style>
|
bf28e75e
Luigi Serra
selection control...
|
111
112
113
|
<div class="horizontal layout">
|
49cc918f
Luigi Serra
selection control...
|
114
|
<div class="vertical layout" style="width: 60%;">
|
bf28e75e
Luigi Serra
selection control...
|
115
|
|
49cc918f
Luigi Serra
selection control...
|
116
117
|
<div class="horizontal layout">
<div class="avatar"></div>
|
bf28e75e
Luigi Serra
selection control...
|
118
|
<div class="title">
|
49cc918f
Luigi Serra
selection control...
|
119
120
|
<div class="big">Title</div>
<div class="small">This is the tile for your new card. It'll be visualized in the bottom black section.</div>
|
bf28e75e
Luigi Serra
selection control...
|
121
|
</div>
|
49cc918f
Luigi Serra
selection control...
|
122
|
</div>
|
bf28e75e
Luigi Serra
selection control...
|
123
|
|
49cc918f
Luigi Serra
selection control...
|
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
<paper-material animated elevation="2">
<paper-textarea class="custom_textarea" id="title"
label=""
char-counter
maxlength="30"
rows="1"
value="{{title}}">
</paper-textarea>
</paper-material>
<template is="dom-if" if="{{checkType(type, 'link')}}">
<div class="horizontal layout">
<div class="avatar"></div>
|
bf28e75e
Luigi Serra
selection control...
|
139
|
<div class="title">
|
49cc918f
Luigi Serra
selection control...
|
140
141
|
<div class="big">Link</div>
<div class="small">This is the link you want to share.</div>
|
bf28e75e
Luigi Serra
selection control...
|
142
|
</div>
|
49cc918f
Luigi Serra
selection control...
|
143
|
</div>
|
bf28e75e
Luigi Serra
selection control...
|
144
|
|
49cc918f
Luigi Serra
selection control...
|
145
146
147
148
149
150
151
152
153
154
|
<paper-material animated elevation="2">
<paper-textarea class="custom_textarea" id="link"
label=""
auto-validate
pattern="^(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|www\\.){1}([0-9A-Za-z-\\.@:%_\+~#=]+)+((\\.[a-zA-Z]{2,3})+)(/(.)*)?(\\?(.)*)?"
error-message="Urls only!"
value="{{link}}">
</paper-textarea>
</paper-material>
|
bf28e75e
Luigi Serra
selection control...
|
155
|
|
49cc918f
Luigi Serra
selection control...
|
156
|
</template>
|
bf28e75e
Luigi Serra
selection control...
|
157
158
|
|
49cc918f
Luigi Serra
selection control...
|
159
|
<template is="dom-if" if="{{checkType(type, 'text')}}">
|
bf28e75e
Luigi Serra
selection control...
|
160
|
|
49cc918f
Luigi Serra
selection control...
|
161
162
|
<div class="horizontal layout">
<div class="avatar"></div>
|
bf28e75e
Luigi Serra
selection control...
|
163
|
<div class="title">
|
49cc918f
Luigi Serra
selection control...
|
164
165
|
<div class="big">Text content</div>
<div class="small">It's the text content of your card. It'll be visualize in the body(yellow top section).</div>
|
bf28e75e
Luigi Serra
selection control...
|
166
|
</div>
|
49cc918f
Luigi Serra
selection control...
|
167
|
</div>
|
bf28e75e
Luigi Serra
selection control...
|
168
|
|
49cc918f
Luigi Serra
selection control...
|
169
170
171
172
173
174
175
176
177
178
179
180
181
|
<paper-material animated elevation="2">
<paper-textarea class="custom_textarea" id="text"
label=""
char-counter
max-rows="6"
rows="6"
maxlength="1024"
value="{{text}}">
</paper-textarea>
</paper-material>
</template>
|
bf28e75e
Luigi Serra
selection control...
|
182
|
|
49cc918f
Luigi Serra
selection control...
|
183
184
185
186
187
188
|
<div class="horizontal layout">
<div class="avatar"></div>
<div class="title">
<div class="big">Comment</div>
<div class="small">Copy and paste/drag and drop in the textarea the url of datasource</div>
</div>
|
bf28e75e
Luigi Serra
selection control...
|
189
190
|
</div>
|
49cc918f
Luigi Serra
selection control...
|
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
|
<paper-material animated elevation="2">
<paper-textarea class="custom_textarea" id="comment"
label=""
char-counter
maxlength="100"
value="{{comment}}">
</paper-textarea>
</paper-material>
</div>
<div class="vertical layout" style="width: 40%;">
<paper-fab mini icon="add-circle" on-click="_handleFabClick"></paper-fab>
<div id="card_preview">
<paper-card-controllet
class="grid-item"
width="300"
height="300"
type="{{type}}"
text="{{comment}}"
legend="{{title}}">
</paper-card-controllet>
</div>
</div>
|
bf28e75e
Luigi Serra
selection control...
|
219
220
221
222
223
224
225
226
227
228
229
230
231
232
|
</div>
</template>
<script src="../shared_js/perfect-scrollbar/js/min/perfect-scrollbar.jquery.min.js"></script>
<script>
Polymer({
is: "create-card-controllet",
properties: {
type:{
type: String,
value: "text"
|
49cc918f
Luigi Serra
selection control...
|
233
234
235
236
237
238
239
240
241
242
243
244
245
|
},
title:{
type: String,
value: "Title"
},
content:{
type: String,
value: undefined
},
comment:{
type: String,
value: "comment"
|
bf28e75e
Luigi Serra
selection control...
|
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
|
}
},
ready: function(){
},
checkType: function(type, check){
return (type == check);
},
_handleFabClick: function(e){
this.fire('create-card-controllet_button-clicked', {data : this});
}
})
</script>
</dom-module>
|