Commit c32314bb3a9270e90e43646644518c74659e0b46
Merge branch 'master' of http://service.routetopa.eu:7480/WebCompDev/COMPONENTS
Showing
3 changed files
with
57 additions
and
14 deletions
controllets/document-card-controllet/document-card-controllet.html
@@ -21,10 +21,11 @@ | @@ -21,10 +21,11 @@ | ||
21 | } | 21 | } |
22 | 22 | ||
23 | #content { | 23 | #content { |
24 | - padding: 4px 4px 0px 4px; | ||
25 | position:relative; | 24 | position:relative; |
25 | + padding: 2px; | ||
26 | + /*padding: 4px 4px 0px 4px; | ||
26 | width: 98%; | 27 | width: 98%; |
27 | - height: 90%; | 28 | + height: 90%;*/ |
28 | } | 29 | } |
29 | 30 | ||
30 | .footer { | 31 | .footer { |
@@ -115,17 +116,19 @@ | @@ -115,17 +116,19 @@ | ||
115 | <paper-material id="paper_card_container" elevation="{{elevation}}"> | 116 | <paper-material id="paper_card_container" elevation="{{elevation}}"> |
116 | 117 | ||
117 | <div id="content"> | 118 | <div id="content"> |
118 | - <iframe id="resource" src="{{resourceUrl}}?userName={{userName}}"></iframe> | 119 | + <iframe id="resource" src="{{resourceUrl}}?userName={{userName}}&showControls={{showControls}}&showLineNumbers=false&pageview=true"></iframe> |
119 | <!--<iframe id="resource" src="{{resourceUrl}}"></iframe>--> | 120 | <!--<iframe id="resource" src="{{resourceUrl}}"></iframe>--> |
120 | </div> | 121 | </div> |
121 | 122 | ||
122 | - <paper-fab id="fullscreen-button" class="open" mini icon="fullscreen" on-click="_handleOpenClick"></paper-fab> | 123 | + <template id="dom-if" if="{{showControls}}"> |
124 | + <paper-fab id="fullscreen-button" class="open" mini icon="fullscreen" on-click="_handleOpenClick"></paper-fab> | ||
123 | 125 | ||
124 | - <paper-dialog id="fullscreen_container" entry-animation="scale-up-animation" exit-animation="fade-out-animation"> | ||
125 | - <!--with-backdrop--> | ||
126 | - <div id="fullscreen_content"></div> | ||
127 | - <paper-button id="info_close_button" dialog-confirm autofocus>x</paper-button> | ||
128 | - </paper-dialog> | 126 | + <paper-dialog id="fullscreen_container" entry-animation="scale-up-animation" exit-animation="fade-out-animation"> |
127 | + <!--with-backdrop--> | ||
128 | + <div id="fullscreen_content"></div> | ||
129 | + <paper-button id="info_close_button" dialog-confirm autofocus>x</paper-button> | ||
130 | + </paper-dialog> | ||
131 | + </template> | ||
129 | 132 | ||
130 | </paper-material> | 133 | </paper-material> |
131 | 134 | ||
@@ -134,7 +137,6 @@ | @@ -134,7 +137,6 @@ | ||
134 | <script src="../shared_js/perfect-scrollbar/js/min/perfect-scrollbar.jquery.min.js"></script> | 137 | <script src="../shared_js/perfect-scrollbar/js/min/perfect-scrollbar.jquery.min.js"></script> |
135 | 138 | ||
136 | <script> | 139 | <script> |
137 | - _this = null; | ||
138 | 140 | ||
139 | Polymer({ | 141 | Polymer({ |
140 | is: "document-card-controllet", | 142 | is: "document-card-controllet", |
@@ -174,6 +176,12 @@ | @@ -174,6 +176,12 @@ | ||
174 | type: String, | 176 | type: String, |
175 | value: undefined | 177 | value: undefined |
176 | }, | 178 | }, |
179 | + | ||
180 | + showControls: { | ||
181 | + type: Boolean, | ||
182 | + value: false | ||
183 | + }, | ||
184 | + | ||
177 | lang:{ | 185 | lang:{ |
178 | type: String, | 186 | type: String, |
179 | value: navigator.language | 187 | value: navigator.language |
@@ -187,7 +195,6 @@ | @@ -187,7 +195,6 @@ | ||
187 | $(this.$.fullscreen_container).perfectScrollbar(); | 195 | $(this.$.fullscreen_container).perfectScrollbar(); |
188 | }, | 196 | }, |
189 | 197 | ||
190 | - | ||
191 | _changeWidth: function(){ | 198 | _changeWidth: function(){ |
192 | //this.style.width = this.width + "px"; | 199 | //this.style.width = this.width + "px"; |
193 | //this.$.paper_card_container.style.width = this.width + "px"; | 200 | //this.$.paper_card_container.style.width = this.width + "px"; |
controllets/postit-container-controllet/postit-container-controllet.html
@@ -58,7 +58,7 @@ | @@ -58,7 +58,7 @@ | ||
58 | transition: 0.2s ease-out; | 58 | transition: 0.2s ease-out; |
59 | } | 59 | } |
60 | 60 | ||
61 | - .window { | 61 | + .postitwindow { |
62 | /*height: 80vh; | 62 | /*height: 80vh; |
63 | width: 120vh;*/ | 63 | width: 120vh;*/ |
64 | display: none; | 64 | display: none; |
@@ -246,7 +246,7 @@ | @@ -246,7 +246,7 @@ | ||
246 | </p> | 246 | </p> |
247 | </div> | 247 | </div> |
248 | 248 | ||
249 | - <paper-material id="window" class="window" elevation="0"> | 249 | + <paper-material id="window" class="postitwindow" elevation="0"> |
250 | 250 | ||
251 | <div class="transparent"></div> | 251 | <div class="transparent"></div> |
252 | 252 |
datalets/base-datalet/base-datalet.html
@@ -367,7 +367,43 @@ Example : | @@ -367,7 +367,43 @@ Example : | ||
367 | 367 | ||
368 | var post = 'svg_data=' + window.encodeURIComponent(svg) + '&datalet=' + parent.is + '&dataset=' + this.$.base_datalet_link.getAttribute("href"); | 368 | var post = 'svg_data=' + window.encodeURIComponent(svg) + '&datalet=' + parent.is + '&dataset=' + this.$.base_datalet_link.getAttribute("href"); |
369 | xhr.responseType = 'blob'; | 369 | xhr.responseType = 'blob'; |
370 | - xhr.send(post); | 370 | + |
371 | + //OpenDataSoft check | ||
372 | + if(this.dataUrl.indexOf("/records/") > -1 ) | ||
373 | + { | ||
374 | + var urlSource = this.dataUrl.split("/")[0] + "//" + this.dataUrl.split("/")[2]; | ||
375 | + | ||
376 | + var i; | ||
377 | + if(this.dataUrl.indexOf("&") > -1) | ||
378 | + i = this.dataUrl.indexOf("&"); | ||
379 | + else | ||
380 | + i = this.dataUrl.length; | ||
381 | + | ||
382 | + $.ajax({ | ||
383 | + url: urlSource + "/api/dataset/1.0/" + this.dataUrl.substring(this.dataUrl.indexOf("=")+1, i), | ||
384 | + dataType: "json", | ||
385 | + success: function(e){ | ||
386 | + post += '&name=' + e.metas.title + '&description=' + e.metas.description + '&created=' + e.metas.data_processed + '&lastModified=' + e.metas.modified; | ||
387 | + xhr.send(post); | ||
388 | + } | ||
389 | + }); | ||
390 | + } | ||
391 | + else if(this.dataUrl.indexOf("datastore_search?resource_id") > -1 ) | ||
392 | + { | ||
393 | + $.ajax({ | ||
394 | + url: this.dataUrl.replace("datastore_search?resource_id", "resource_show?id"), | ||
395 | + dataType: "json", | ||
396 | + success: function(e){ | ||
397 | + post += '&name=' + e.result.name + '&description=' + e.result.description + '&created=' + e.result.created + '&format=' + e.result.format + '&lastModified=' + e.result.last_modified; | ||
398 | + xhr.send(post); | ||
399 | + } | ||
400 | + }); | ||
401 | + } | ||
402 | + else | ||
403 | + { | ||
404 | + xhr.send(post); | ||
405 | + } | ||
406 | + | ||
371 | }, | 407 | }, |
372 | 408 | ||
373 | importToMySpace: function() { | 409 | importToMySpace: function() { |