Commit 3aed1b3b8e7f43bda14bbb32d38bd7b69b3b7d54

Authored by Renato De Donato
2 parents 04097cb4 dc2827bb

Merge branch 'master' of http://service.routetopa.eu:7480/WebCompDev/COMPONENTS

datalets/areachart-datalet/areachart-datalet.html
... ... @@ -50,7 +50,7 @@ Example:
50 50  
51 51 <dom-module id="areachart-datalet">
52 52 <template>
53   - <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" title="{{title}}" description="{{description}}"></highcharts-datalet>
  53 + <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" title="{{title}}" description="{{description}}" export_menu="{{export_menu}}"></highcharts-datalet>
54 54 </template>
55 55 <script>
56 56  
... ... @@ -175,8 +175,21 @@ Example:
175 175 behavior : {
176 176 type : Object,
177 177 value : {}
  178 + },
  179 + /**
  180 + * Control the export menu
  181 + * xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
  182 + *
  183 + * @attribute export_menu
  184 + * @type Number
  185 + * @default 15
  186 + */
  187 + export_menu : {
  188 + type : Number,
  189 + value : 15 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
178 190 }
179 191 },
  192 +
180 193 /**
181 194 * 'ready' callback extend the AreachartComponentBehavior with HighchartsComponentBehavior and ColumnchartBehavior
182 195 * and run the Datalet workcycle.
... ...
datalets/areachart_stacked-datalet/areachart_stacked-datalet.html
... ... @@ -50,7 +50,7 @@ Example:
50 50  
51 51 <dom-module name="areachart_stacked-datalet">
52 52 <template>
53   - <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></highcharts-datalet>
  53 + <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" title="{{title}}" description="{{description}}" export_menu="{{export_menu}}"></highcharts-datalet>
54 54 </template>
55 55 <script>
56 56  
... ... @@ -174,6 +174,18 @@ Example:
174 174 behavior : {
175 175 type : Object,
176 176 value : {}
  177 + },
  178 + /**
  179 + * Control the export menu
  180 + * xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
  181 + *
  182 + * @attribute export_menu
  183 + * @type Number
  184 + * @default 15
  185 + */
  186 + export_menu : {
  187 + type : Number,
  188 + value : 15 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
177 189 }
178 190  
179 191 },
... ...
datalets/barchart-datalet/barchart-datalet.html
... ... @@ -50,7 +50,7 @@ Example:
50 50  
51 51 <dom-module name="barchart-datalet">
52 52 <template>
53   - <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></highcharts-datalet>
  53 + <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" title="{{title}}" description="{{description}}" export_menu="{{export_menu}}"></highcharts-datalet>
54 54 </template>
55 55 <script>
56 56  
... ... @@ -139,6 +139,18 @@ Example:
139 139 behavior : {
140 140 type : Object,
141 141 value : {}
  142 + },
  143 + /**
  144 + * Control the export menu
  145 + * xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
  146 + *
  147 + * @attribute export_menu
  148 + * @type Number
  149 + * @default 15
  150 + */
  151 + export_menu : {
  152 + type : Number,
  153 + value : 15 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
142 154 }
143 155 },
144 156  
... ...
datalets/barchart_stacked-datalet/barchart_stacked-datalet.html
... ... @@ -50,7 +50,7 @@ Example:
50 50  
51 51 <dom-module name="barchart_stacked-datalet">
52 52 <template>
53   - <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></highcharts-datalet>
  53 + <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" title="{{title}}" description="{{description}}" export_menu="{{export_menu}}"></highcharts-datalet>
54 54 </template>
55 55 <script>
56 56  
... ... @@ -162,6 +162,18 @@ Example:
162 162 behavior : {
163 163 type : Object,
164 164 value : {}
  165 + },
  166 + /**
  167 + * Control the export menu
  168 + * xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
  169 + *
  170 + * @attribute export_menu
  171 + * @type Number
  172 + * @default 15
  173 + */
  174 + export_menu : {
  175 + type : Number,
  176 + value : 15 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
165 177 }
166 178  
167 179 },
... ...
datalets/base-ajax-json-alasql-datalet/base-ajax-json-alasql-datalet.html
... ... @@ -53,7 +53,7 @@ Example :
53 53  
54 54 <dom-module id="base-ajax-json-alasql-datalet">
55 55 <template>
56   - <base-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></base-datalet>
  56 + <base-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}" export_menu="{{export_menu}}"></base-datalet>
57 57 </template>
58 58  
59 59 <script src="static/js/alasql.min.js"></script>
... ...
datalets/base-ajax-json-jsonpath-datalet/base-ajax-json-jsonpath-datalet.html
... ... @@ -52,7 +52,7 @@ Example :
52 52  
53 53 <dom-module id="base-ajax-json-jsonpath-datalet">
54 54 <template>
55   - <base-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></base-datalet>
  55 + <base-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}" export_menu="{{export_menu}}"></base-datalet>
56 56 </template>
57 57  
58 58 <script src="static/js/vendor/jsonpath-0.8.5.js"></script>
... ...
datalets/base-datalet/base-datalet.html
... ... @@ -100,6 +100,46 @@ Example :
100 100 font-style: italic;
101 101 color: #727272;
102 102 }
  103 +/*EXPORT*/
  104 + .export
  105 + {
  106 + cursor: pointer;
  107 + background-image:url("./static/images/more_horiz_grey600_36x36.png");
  108 + background-repeat: no-repeat;
  109 + position: absolute;
  110 + padding: 31px;
  111 + right: 21px;
  112 + top: 85px;
  113 + }
  114 +
  115 + .highcharts-contextmenu
  116 + {
  117 + position: absolute;
  118 + right: 50px;
  119 + top: 114px;
  120 + display: none;
  121 + border: solid 1px #000000;
  122 + }
  123 +
  124 + .highcharts-contextmenu-container
  125 + {
  126 + background: rgb(255, 255, 255);
  127 + }
  128 +
  129 + .highcharts-contextmenu-container div
  130 + {
  131 + cursor: pointer;
  132 + padding: 0px 10px;
  133 + color: rgb(48, 48, 48);
  134 + font-size: 11px;
  135 + background: none;
  136 + }
  137 +
  138 + .highcharts-contextmenu-container div:hover
  139 + {
  140 + background: #cccccc;
  141 + }
  142 +/*EXPORT*/
103 143 </style>
104 144  
105 145 <div id="base_datalet_imgWaitDatalet">
... ... @@ -121,6 +161,18 @@ Example :
121 161 <div><a href="http://www.routetopa.eu/" target="_blank"><img id="rtpalogo" src="static/images/rtpalogo.png" ></a></div>
122 162 </div>
123 163  
  164 + <div id="export">
  165 + <div class="export" on-click="showHideExportMenu"></div>
  166 + <div class="highcharts-contextmenu" id="highcharts-contextmenu">
  167 + <div class="highcharts-contextmenu-container">
  168 + <div id="export_html" on-click="exportToHTML">Export to HTML</div>
  169 + <div id="export_png" on-click="exportToIMG">Export to PNG</div>
  170 + <div id="export_rtf">Export to RTF</div>
  171 + <div id="export_my_space" on-click="importToMySpace">Import in My Space</div>
  172 + </div>
  173 + </div>
  174 + </div>
  175 +
124 176 </div>
125 177  
126 178 </template>
... ... @@ -145,6 +197,9 @@ Example :
145 197 * @method ready
146 198 */
147 199 ready: function(){
  200 +
  201 + this.setExportMenu();
  202 +
148 203 if(this.dataUrl != undefined) {
149 204  
150 205 var urlSource = this.dataUrl.split("/")[0] + "//" + this.dataUrl.split("/")[2];
... ... @@ -194,7 +249,133 @@ Example :
194 249 this.$.base_datalet_container.innerHTML = "";
195 250 this.$.base_datalet_container.style.margin = 0;
196 251 this.$.base_datalet_container.style.border = 0;
  252 + },
  253 +
  254 + setExportMenu: function()
  255 + {
  256 + // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
  257 + var bitmask = this.export_menu;
  258 + var menu = ["export_html", "export_png", "export_rtf", "export_my_space"];
  259 +
  260 + if(bitmask == 15) return;
  261 +
  262 + if(bitmask == 0)
  263 + {
  264 + this.$.export.style.display = "none";
  265 + return;
  266 + }
  267 +
  268 + //var max_i = Math.floor(Math.log2(this.export_menu))+1;
  269 + for(var i=0; i<menu.length; i++)
  270 + {
  271 + if(bitmask % 2 == 0)
  272 + this.$[menu[i]].style.display = "none";
  273 +
  274 + bitmask = Math.floor(bitmask/2);
  275 + }
  276 + },
  277 +
  278 + showHideExportMenu: function()
  279 + {
  280 + if(this.$["highcharts-contextmenu"].style.display == "block")
  281 + this.$["highcharts-contextmenu"].style.display = "none";
  282 + else
  283 + this.$["highcharts-contextmenu"].style.display = "block";
  284 + },
  285 +
  286 + exportToHTML: function () {
  287 + var parent = this.parentElement;
  288 + var html = '';
  289 + while(!parent.hasAttribute("data-url"))
  290 + parent = parent.parentElement;
  291 +
  292 + html += '<'+parent.is;
  293 + for(var i=0; i<parent.attributes.length; i++)
  294 + html += ' '+parent.attributes[i].name+'=\''+parent.attributes[i].value+'\'';
  295 + html += '></'+parent.is+'>';
  296 +
  297 + var dataletImport = '\<script type="text/javascript" src="https://cdn.jsdelivr.net/webcomponentsjs/0.7.16/webcomponents-lite.min.js"\>\<\/script\>\n' +
  298 + '\<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"\>\<\/script\>\n' +
  299 + '<!-- REMOVE THE PREVIOUS SCRIPT TAGS IF YOUR PAGE ALREADY USES JQUERY AND POLYFILL LIBRARIES -->\n';
  300 +
  301 + var dataletLink = '<link rel="import" href="http://deep.routetopa.eu/COMPONENTS/datalets/'+parent.is+'/'+parent.is+'.html" /> \n';
  302 +
  303 + window.prompt("Copy to clipboard: Ctrl+C, Enter", dataletImport+dataletLink+html);
  304 + },
  305 +
  306 +
  307 + exportToIMG: function () {
  308 + var parent = this.parentElement;
  309 + while(!parent.hasAttribute("data-url"))
  310 + parent = parent.parentElement;
  311 +
  312 +
  313 + var svg = $(parent.is + " .highcharts-container");
  314 + svg = $(svg[0]).html();
  315 +
  316 + var xhr = new XMLHttpRequest();
  317 +
  318 + xhr.onreadystatechange = function(){
  319 + if (this.readyState == 4 && this.status == 200){
  320 + var blob = new Blob([this.response], {type:'octet/stream'});
  321 + var downloadUrl = window.URL.createObjectURL(blob);
  322 + var a = document.createElement("a");
  323 + a.href = downloadUrl;
  324 + a.download = "image.png";
  325 + document.body.appendChild(a);
  326 + a.click();
  327 + //window.URL.revokeObjectURL(downloadUrl);
  328 + }
  329 + };
  330 +
  331 + //xhr.open('POST', 'http://172.16.15.77/DEEalerProvider/DEEP/export/export-datalet-as-img', true);
  332 + xhr.open('POST', 'http://stage.routetopa.eu/deep/DEEP/export/export-datalet-as-img', true);
  333 + xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  334 +
  335 + var post = 'svg_data=' + window.encodeURIComponent(svg);
  336 + xhr.responseType = 'blob';
  337 + xhr.send(post);
  338 + },
  339 +
  340 + importToMySpace: function() {
  341 + var parent = this.parentElement;
  342 + var html = '';
  343 + while(!parent.hasAttribute("data-url"))
  344 + parent = parent.parentElement;
  345 +
  346 + var params = {};
  347 + var fields;
  348 + var component = parent.is;
  349 +
  350 + for(var i=0; i<parent.attributes.length; i++)
  351 + params[parent.attributes[i].name] = parent.attributes[i].value;
  352 +
  353 + delete params["fields"];
  354 + fields = parent.attributes["fields"].value.replace(/\[|\]/g, "");
  355 + params = JSON.stringify(params);
  356 +
  357 + $.ajax({
  358 + type: 'post',
  359 + url: ODE.ajax_private_room_datalet,
  360 + data: {"component":component, "fields":fields, "params":params, "data":""},
  361 + dataType: 'JSON',
  362 + success: function(data){
  363 + if(data.status == "ok")
  364 + {
  365 + alert("Datalet added to private room");
  366 + }
  367 + else
  368 + {
  369 + alert("Error");
  370 + }
  371 + },
  372 + error: function( XMLHttpRequest, textStatus, errorThrown ){
  373 + OW.error(textStatus);
  374 + },
  375 + complete: function(){}
  376 + });
197 377 }
  378 +
198 379 });
199 380 </script>
200 381 </dom-module>
201 382 \ No newline at end of file
... ...
datalets/base-datalet/static/images/more_horiz_grey600_36x36.png 0 โ†’ 100644

250 Bytes

datalets/base-datalet/static/images/more_horiz_white_36x36.png 0 โ†’ 100644

243 Bytes

datalets/base-datalet/static/images/more_vert_white_32x32.png 0 โ†’ 100644

218 Bytes

datalets/bubblechart-datalet/bubblechart-datalet.html
... ... @@ -59,7 +59,7 @@ Examples:
59 59  
60 60 <dom-module id="bubblechart-datalet">
61 61 <template>
62   - <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></highcharts-datalet>
  62 + <base-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}" export_menu="{{export_menu}}"></base-datalet>
63 63 </template>
64 64 <script>
65 65 var BubblechartBehavior = {
... ... @@ -177,6 +177,18 @@ Examples:
177 177 behavior : {
178 178 type : Object,
179 179 value : {}
  180 + },
  181 + /**
  182 + * Control the export menu
  183 + * xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
  184 + *
  185 + * @attribute export_menu
  186 + * @type Number
  187 + * @default 15
  188 + */
  189 + export_menu : {
  190 + type : Number,
  191 + value : 15 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
180 192 }
181 193 },
182 194 /**
... ...
datalets/columnchart-datalet/columnchart-datalet.html
... ... @@ -50,7 +50,7 @@ Example:
50 50  
51 51 <dom-module id="columnchart-datalet">
52 52 <template>
53   - <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></highcharts-datalet>
  53 + <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" title="{{title}}" description="{{description}}" export_menu="{{export_menu}}"></highcharts-datalet>
54 54 </template>
55 55 <script>
56 56  
... ... @@ -184,6 +184,18 @@ Example:
184 184 behavior : {
185 185 type : Object,
186 186 value : {}
  187 + },
  188 + /**
  189 + * Control the export menu
  190 + * xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
  191 + *
  192 + * @attribute export_menu
  193 + * @type Number
  194 + * @default 15
  195 + */
  196 + export_menu : {
  197 + type : Number,
  198 + value : 15 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
187 199 }
188 200 },
189 201  
... ...
datalets/columnchart_stacked-datalet/columnchart_stacked-datalet.html
... ... @@ -50,7 +50,7 @@ Example:
50 50  
51 51 <dom-module name="columnchart_stacked-datalet">
52 52 <template>
53   - <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></highcharts-datalet>
  53 + <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" title="{{title}}" description="{{description}}" export_menu="{{export_menu}}"></highcharts-datalet>
54 54 </template>
55 55 <script>
56 56  
... ... @@ -162,8 +162,19 @@ Example:
162 162 behavior : {
163 163 type : Object,
164 164 value : {}
  165 + },
  166 + /**
  167 + * Control the export menu
  168 + * xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
  169 + *
  170 + * @attribute export_menu
  171 + * @type Number
  172 + * @default 15
  173 + */
  174 + export_menu : {
  175 + type : Number,
  176 + value : 15 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
165 177 }
166   -
167 178 },
168 179  
169 180 /**
... ...
datalets/datasetexplorer-datalet/datasetexplorer-datalet.html
... ... @@ -126,7 +126,7 @@ Example:
126 126 <div id="treemap_placeholder">
127 127 <treemap-tooltip id="treemap_tooltip"></treemap-tooltip>
128 128 </div>
129   - <base-ajax-json-jsonpath-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}"></base-ajax-json-jsonpath-datalet>
  129 + <base-ajax-json-jsonpath-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" export_menu="{{export_menu}}"></base-ajax-json-jsonpath-datalet>
130 130 <!--<treemap-tooltip id="treemap_tooltip"></treemap-tooltip>-->
131 131 </template>
132 132  
... ... @@ -276,6 +276,18 @@ Example:
276 276 height : {
277 277 type : Number,
278 278 value: 700
  279 + },
  280 + /**
  281 + * Control the export menu
  282 + * xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
  283 + *
  284 + * @attribute export_menu
  285 + * @type Number
  286 + * @default 15
  287 + */
  288 + export_menu : {
  289 + type : Number,
  290 + value : 15 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
279 291 }
280 292 },
281 293  
... ...
datalets/datatable-datalet/datatable-datalet.html
... ... @@ -54,7 +54,7 @@ Example:
54 54  
55 55 <table id="datatable" class="stripe row-border" cellspacing="0" style="height: auto; width: auto;">
56 56 </table>
57   - <base-ajax-json-alasql-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></base-ajax-json-alasql-datalet>
  57 + <base-ajax-json-alasql-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}" export_menu="{{export_menu}}"></base-ajax-json-alasql-datalet>
58 58 </template>
59 59  
60 60 <script type="text/javascript" src="js/DataTables/datatables.js"></script>
... ... @@ -102,6 +102,18 @@ Example:
102 102 behavior : {
103 103 type : Object,
104 104 value : {}
  105 + },
  106 + /**
  107 + * Control the export menu
  108 + * xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
  109 + *
  110 + * @attribute export_menu
  111 + * @type Number
  112 + * @default 15
  113 + */
  114 + export_menu : {
  115 + type : Number,
  116 + value : 9 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
105 117 }
106 118 },
107 119  
... ...
datalets/dynamic-datatable-datalet/dynamic-datatable-datalet.html
... ... @@ -54,7 +54,7 @@ Example:
54 54  
55 55 <span id="_span"></span>
56 56  
57   - <base-ajax-json-alasql-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}"></base-ajax-json-alasql-datalet>
  57 + <base-ajax-json-alasql-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}" export_menu="{{export_menu}}"></base-ajax-json-alasql-datalet>
58 58 </template>
59 59  
60 60 <script type="text/javascript" src="js/DataTables/datatables.js"></script>
... ... @@ -116,6 +116,18 @@ Example:
116 116  
117 117 fields : {
118 118 observer: '_reload'
  119 + },
  120 + /**
  121 + * Control the export menu
  122 + * xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
  123 + *
  124 + * @attribute export_menu
  125 + * @type Number
  126 + * @default 15
  127 + */
  128 + export_menu : {
  129 + type : Number,
  130 + value : 15 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
119 131 }
120 132  
121 133 // filters : {
... ...
datalets/google_piechart-datalet/google_piechart-datalet.html
... ... @@ -53,7 +53,7 @@
53 53 options={{options}}>
54 54 </google-chart>
55 55  
56   - <base-ajax-json-jsonpath-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}"></base-ajax-json-jsonpath-datalet>
  56 + <base-ajax-json-jsonpath-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" export_menu="{{export_menu}}"></base-ajax-json-jsonpath-datalet>
57 57  
58 58 </template>
59 59  
... ... @@ -144,6 +144,18 @@
144 144 pieHole: {
145 145 type: Number,
146 146 value: 0
  147 + },
  148 + /**
  149 + * Control the export menu
  150 + * xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
  151 + *
  152 + * @attribute export_menu
  153 + * @type Number
  154 + * @default 15
  155 + */
  156 + export_menu : {
  157 + type : Number,
  158 + value : 15 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
147 159 }
148 160  
149 161 },
... ...
datalets/heatmap-datalet/heatmap-datalet.html
... ... @@ -51,7 +51,7 @@ Example:
51 51  
52 52 <dom-module id="heatmap-datalet">
53 53 <template>
54   - <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></highcharts-datalet>
  54 + <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" title="{{title}}" description="{{description}}" export_menu="{{export_menu}}"></highcharts-datalet>
55 55 </template>
56 56 <script>
57 57  
... ... @@ -189,6 +189,18 @@ Example:
189 189 behavior : {
190 190 type : Object,
191 191 value : {}
  192 + },
  193 + /**
  194 + * Control the export menu
  195 + * xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
  196 + *
  197 + * @attribute export_menu
  198 + * @type Number
  199 + * @default 15
  200 + */
  201 + export_menu : {
  202 + type : Number,
  203 + value : 15 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
192 204 }
193 205 },
194 206  
... ...
datalets/highcharts-datalet/highcharts-datalet.html
... ... @@ -57,11 +57,11 @@ Example :
57 57  
58 58 <template>
59 59 <div id="container" style="width:auto; height:auto;"></div>
60   - <base-ajax-json-alasql-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></base-ajax-json-alasql-datalet>
  60 + <base-ajax-json-alasql-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}" export_menu="{{export_menu}}"></base-ajax-json-alasql-datalet>
61 61 </template>
62 62  
63 63 <script src="static/js/highcharts.js"></script>
64   - <script src="static/js/exporting.js"></script>
  64 + <!--<script src="static/js/exporting.js"></script>-->
65 65 <script src="static/js/highcharts-more.js"></script>
66 66 <script src="static/themes/themes.js"></script>
67 67  
... ...
datalets/leafletjs-datalet/leafletjs-datalet.html
... ... @@ -56,7 +56,7 @@ Example:
56 56 </style>
57 57  
58 58 <div id="leafletjs"></div>
59   - <base-ajax-json-alasql-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></base-ajax-json-alasql-datalet>
  59 + <base-ajax-json-alasql-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}" export_menu="{{export_menu}}"></base-ajax-json-alasql-datalet>
60 60  
61 61 </template>
62 62  
... ... @@ -159,6 +159,18 @@ Example:
159 159 behavior : {
160 160 type : Object,
161 161 value : {}
  162 + },
  163 + /**
  164 + * Control the export menu
  165 + * xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
  166 + *
  167 + * @attribute export_menu
  168 + * @type Number
  169 + * @default 15
  170 + */
  171 + export_menu : {
  172 + type : Number,
  173 + value : 9 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
162 174 }
163 175 },
164 176  
... ...
datalets/linechart-datalet/linechart-datalet.html
... ... @@ -50,7 +50,7 @@ Example:
50 50  
51 51 <dom-module id="linechart-datalet">
52 52 <template>
53   - <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></highcharts-datalet>
  53 + <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" title="{{title}}" description="{{description}}" export_menu="{{export_menu}}"></highcharts-datalet>
54 54 </template>
55 55 <script>
56 56  
... ... @@ -160,6 +160,18 @@ Example:
160 160 behavior : {
161 161 type : Object,
162 162 value : {}
  163 + },
  164 + /**
  165 + * Control the export menu
  166 + * xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
  167 + *
  168 + * @attribute export_menu
  169 + * @type Number
  170 + * @default 15
  171 + */
  172 + export_menu : {
  173 + type : Number,
  174 + value : 15 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
163 175 }
164 176 },
165 177  
... ...
datalets/piechart-datalet/piechart-datalet.html
... ... @@ -48,7 +48,7 @@ Example:
48 48 -->
49 49 <dom-module id="piechart-datalet">
50 50 <template>
51   - <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></highcharts-datalet>
  51 + <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" title="{{title}}" description="{{description}}" export_menu="{{export_menu}}"></highcharts-datalet>
52 52 </template>
53 53 <script>
54 54  
... ... @@ -141,6 +141,18 @@ Example:
141 141 behavior : {
142 142 type : Object,
143 143 value : {}
  144 + },
  145 + /**
  146 + * Control the export menu
  147 + * xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
  148 + *
  149 + * @attribute export_menu
  150 + * @type Number
  151 + * @default 15
  152 + */
  153 + export_menu : {
  154 + type : Number,
  155 + value : 15 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
144 156 }
145 157 },
146 158  
... ...
datalets/scatterchart-datalet/scatterchart-datalet.html
... ... @@ -50,7 +50,7 @@ Example:
50 50  
51 51 <dom-module id="scatterchart-datalet">
52 52 <template>
53   - <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></highcharts-datalet>
  53 + <highcharts-datalet id="charts" data-url="{{dataUrl}}" fields="{{fields}}" title="{{title}}" description="{{description}}" export_menu="{{export_menu}}"></highcharts-datalet>
54 54 </template>
55 55 <script>
56 56 var ScatterchartBehavior = {
... ... @@ -160,6 +160,18 @@ Example:
160 160 behavior : {
161 161 type : Object,
162 162 value : {}
  163 + },
  164 + /**
  165 + * Control the export menu
  166 + * xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
  167 + *
  168 + * @attribute export_menu
  169 + * @type Number
  170 + * @default 15
  171 + */
  172 + export_menu : {
  173 + type : Number,
  174 + value : 15 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
163 175 }
164 176 },
165 177  
... ...
datalets/treemap-datalet/treemap-datalet.html
... ... @@ -110,7 +110,7 @@ Example:
110 110 }
111 111 </style>
112 112 <div id="treemap_placeholder"></div>
113   - <base-ajax-json-alasql-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}"></base-ajax-json-alasql-datalet>
  113 + <base-ajax-json-alasql-datalet data-url="{{dataUrl}}" fields="{{fields}}" data="{{data}}" title="{{title}}" description="{{description}}" export_menu="{{export_menu}}"></base-ajax-json-alasql-datalet>
114 114 </template>
115 115  
116 116 <script src="../shared_js/d3.js"></script>
... ... @@ -199,6 +199,18 @@ Example:
199 199 behavior : {
200 200 type : Object,
201 201 value : {}
  202 + },
  203 + /**
  204 + * Control the export menu
  205 + * xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
  206 + *
  207 + * @attribute export_menu
  208 + * @type Number
  209 + * @default 15
  210 + */
  211 + export_menu : {
  212 + type : Number,
  213 + value : 15 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all)
202 214 }
203 215 },
204 216  
... ...