Commit c76a9f859a9dac130604ef707908cce683f973ea
1 parent
6a138ebb
card and controllet updates
Showing
4 changed files
with
109 additions
and
28 deletions
controllets/create-card-controllet/create-card-controllet.html
controllets/data-sevc-controllet/data-sevc-controllet.html
... | ... | @@ -226,29 +226,6 @@ Example: |
226 | 226 | overflow: auto; |
227 | 227 | } |
228 | 228 | |
229 | - paper-tabs, paper-toolbar | |
230 | - { | |
231 | - background-color: var(--paper-blue-500); | |
232 | - color: #ffffff; | |
233 | - box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.2); | |
234 | - } | |
235 | - | |
236 | - paper-toolbar paper-tabs | |
237 | - { | |
238 | - box-shadow: none; | |
239 | - --paper-tabs-selection-bar-color : var(--google-gray-500); | |
240 | - } | |
241 | - | |
242 | - paper-tabs[noink][no-bar] paper-tab.iron-selected | |
243 | - { | |
244 | - background-color: var(--google-gray-500); | |
245 | - } | |
246 | - | |
247 | - paper-tabs[align-bottom] | |
248 | - { | |
249 | - box-shadow: 0px -2px 6px rgba(0, 0, 0, 0.15); | |
250 | - } | |
251 | - | |
252 | 229 | #idm_fields_main_container{ |
253 | 230 | position: relative; |
254 | 231 | height: 60vh; |
... | ... | @@ -282,6 +259,28 @@ Example: |
282 | 259 | padding : 30px; |
283 | 260 | } |
284 | 261 | |
262 | + paper-tabs, paper-toolbar | |
263 | + { | |
264 | + background-color: var(--paper-blue-500); | |
265 | + color: #ffffff; | |
266 | + box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.2); | |
267 | + --paper-tabs-selection-bar-color: var(--google-gray-500); | |
268 | + } | |
269 | + | |
270 | + paper-toolbar paper-tabs | |
271 | + { | |
272 | + box-shadow: none; | |
273 | + } | |
274 | + | |
275 | + paper-tabs[noink][no-bar] paper-tab.iron-selected | |
276 | + { | |
277 | + background-color: var(--google-gray-500); | |
278 | + } | |
279 | + | |
280 | + paper-tabs[align-bottom] | |
281 | + { | |
282 | + box-shadow: 0px -2px 6px rgba(0, 0, 0, 0.15); | |
283 | + } | |
285 | 284 | </style> |
286 | 285 | |
287 | 286 | <iron-ajax | ... | ... |
controllets/generic-cards-container-controllet/generic-cards-container-controllet.html
controllets/paper-card-controllet/paper-card-controllet.html
... | ... | @@ -18,9 +18,6 @@ |
18 | 18 | --paper-fab-background: var(--accent-color); |
19 | 19 | font-family: 'Roboto', sans-serif; |
20 | 20 | padding-bottom: 30px; |
21 | - | |
22 | - /*Test*/ | |
23 | - | |
24 | 21 | } |
25 | 22 | |
26 | 23 | paper-material { |
... | ... | @@ -62,9 +59,11 @@ |
62 | 59 | position:relative; |
63 | 60 | overflow: auto; |
64 | 61 | } |
62 | + | |
65 | 63 | ::content.buttons { |
66 | 64 | margin-top: 8px; |
67 | 65 | } |
66 | + | |
68 | 67 | ::content paper-button, ::content paper-icon-button { |
69 | 68 | font-weight: 500; |
70 | 69 | color: var(--accent-color); |
... | ... | @@ -91,6 +90,49 @@ |
91 | 90 | height: 24px; |
92 | 91 | --paper-fab-background:#cccccc; |
93 | 92 | } |
93 | + | |
94 | + .fullscreen{ | |
95 | + position: absolute; | |
96 | + top: 36px; | |
97 | + right: 54px; | |
98 | + --iron-icon-height: 18px; | |
99 | + --iron-icon-width: 18px; | |
100 | + width: 24px; | |
101 | + height: 24px; | |
102 | + --paper-fab-background:#cccccc; | |
103 | + } | |
104 | + | |
105 | + #fullscreen_container{ | |
106 | + position: fixed; | |
107 | + width: 80%; | |
108 | + height: 75%; | |
109 | + right: 0; | |
110 | + left: 0; | |
111 | + top: 5%; | |
112 | + margin-right: auto; | |
113 | + margin-left: auto; | |
114 | + z-index: 1000; | |
115 | + display: none; | |
116 | + padding: 20px; | |
117 | + } | |
118 | + | |
119 | + .close_fullscreen{ | |
120 | + position: absolute; | |
121 | + top: 5px; | |
122 | + right: 1vw; | |
123 | + --iron-icon-height: 18px; | |
124 | + --iron-icon-width: 18px; | |
125 | + width: 24px; | |
126 | + height: 24px; | |
127 | + --paper-fab-background:#cccccc; | |
128 | + } | |
129 | + | |
130 | + #fullscreen_content{ | |
131 | + position: relative; | |
132 | + height: 100%; | |
133 | + width: 100%; | |
134 | + } | |
135 | + | |
94 | 136 | </style> |
95 | 137 | |
96 | 138 | |
... | ... | @@ -107,6 +149,9 @@ |
107 | 149 | |
108 | 150 | <div class="legend horizontal layout center"> |
109 | 151 | <span>{{cardTitle}}</span> |
152 | + | |
153 | + <paper-fab class="fullscreen" mini icon="fullscreen" on-click="_handleFullscreenClick"></paper-fab> | |
154 | + | |
110 | 155 | <!-- Adding icon based on card type --> |
111 | 156 | |
112 | 157 | <template is="dom-if" if="{{checkType(cardType, 'text')}}"> |
... | ... | @@ -143,6 +188,11 @@ |
143 | 188 | </template> |
144 | 189 | </div> |
145 | 190 | |
191 | + <paper-material elevation="4" id="fullscreen_container"> | |
192 | + <paper-fab class="close_fullscreen" mini icon="close" on-click="_handleCloseFullscreenClick"></paper-fab> | |
193 | + <div id="fullscreen_content"></div> | |
194 | + </paper-material> | |
195 | + | |
146 | 196 | </div> |
147 | 197 | </paper-material> |
148 | 198 | |
... | ... | @@ -209,8 +259,28 @@ |
209 | 259 | }, |
210 | 260 | |
211 | 261 | _handleDeleteClick: function(e){ |
212 | - this.fire('paper-card-controllet_delete-clicked', {data : this}); | |
213 | - } | |
262 | + this.fire('paper-card-controllet_delete-clicked', {data : this}); | |
263 | + }, | |
264 | + | |
265 | + _handleFullscreenClick: function(e){ | |
266 | + | |
267 | + switch(this.cardType){ | |
268 | + case 'text': | |
269 | + this.$.fullscreen_content.style.backgroundColor = "#ffc"; | |
270 | + break; | |
271 | + case 'link': | |
272 | + window.open(this.getAttribute('card-link'),'_blank'); | |
273 | + return; | |
274 | + } | |
275 | + | |
276 | + this.$.fullscreen_container.style.display = "inline-block"; | |
277 | + this.$.fullscreen_content.innerHTML = this.$.content.innerHTML; | |
278 | + }, | |
279 | + | |
280 | + _handleCloseFullscreenClick: function(e){ | |
281 | + | |
282 | + this.$.fullscreen_container.style.display = "none"; | |
283 | + } | |
214 | 284 | }) |
215 | 285 | </script> |
216 | 286 | ... | ... |