diff --git a/datalets/areachart-datalet/areachart-datalet.html b/datalets/areachart-datalet/areachart-datalet.html index 392979f..62812da 100755 --- a/datalets/areachart-datalet/areachart-datalet.html +++ b/datalets/areachart-datalet/areachart-datalet.html @@ -50,7 +50,7 @@ Example: diff --git a/datalets/base-ajax-json-jsonpath-datalet/base-ajax-json-jsonpath-datalet.html b/datalets/base-ajax-json-jsonpath-datalet/base-ajax-json-jsonpath-datalet.html index 6a9da05..b374ce2 100755 --- a/datalets/base-ajax-json-jsonpath-datalet/base-ajax-json-jsonpath-datalet.html +++ b/datalets/base-ajax-json-jsonpath-datalet/base-ajax-json-jsonpath-datalet.html @@ -52,7 +52,7 @@ Example : diff --git a/datalets/base-datalet/base-datalet.html b/datalets/base-datalet/base-datalet.html index 4b75474..02e6a8d 100755 --- a/datalets/base-datalet/base-datalet.html +++ b/datalets/base-datalet/base-datalet.html @@ -100,6 +100,46 @@ Example : font-style: italic; color: #727272; } +/*EXPORT*/ + .export + { + cursor: pointer; + background-image:url("./static/images/more_horiz_grey600_36x36.png"); + background-repeat: no-repeat; + position: absolute; + padding: 31px; + right: 21px; + top: 85px; + } + + .highcharts-contextmenu + { + position: absolute; + right: 50px; + top: 114px; + display: none; + border: solid 1px #000000; + } + + .highcharts-contextmenu-container + { + background: rgb(255, 255, 255); + } + + .highcharts-contextmenu-container div + { + cursor: pointer; + padding: 0px 10px; + color: rgb(48, 48, 48); + font-size: 11px; + background: none; + } + + .highcharts-contextmenu-container div:hover + { + background: #cccccc; + } +/*EXPORT*/
@@ -121,6 +161,18 @@ Example :
+
+
+
+
+
Export to HTML
+
Export to PNG
+
Export to RTF
+
Import in My Space
+
+
+
+ @@ -145,6 +197,9 @@ Example : * @method ready */ ready: function(){ + + this.setExportMenu(); + if(this.dataUrl != undefined) { var urlSource = this.dataUrl.split("/")[0] + "//" + this.dataUrl.split("/")[2]; @@ -194,7 +249,133 @@ Example : this.$.base_datalet_container.innerHTML = ""; this.$.base_datalet_container.style.margin = 0; this.$.base_datalet_container.style.border = 0; + }, + + setExportMenu: function() + { + // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all) + var bitmask = this.export_menu; + var menu = ["export_html", "export_png", "export_rtf", "export_my_space"]; + + if(bitmask == 15) return; + + if(bitmask == 0) + { + this.$.export.style.display = "none"; + return; + } + + //var max_i = Math.floor(Math.log2(this.export_menu))+1; + for(var i=0; i'; + + var dataletImport = '\
\ No newline at end of file diff --git a/datalets/base-datalet/static/images/more_horiz_grey600_36x36.png b/datalets/base-datalet/static/images/more_horiz_grey600_36x36.png new file mode 100644 index 0000000..09b4f8f --- /dev/null +++ b/datalets/base-datalet/static/images/more_horiz_grey600_36x36.png diff --git a/datalets/base-datalet/static/images/more_horiz_white_36x36.png b/datalets/base-datalet/static/images/more_horiz_white_36x36.png new file mode 100644 index 0000000..c84cbcc --- /dev/null +++ b/datalets/base-datalet/static/images/more_horiz_white_36x36.png diff --git a/datalets/base-datalet/static/images/more_vert_white_32x32.png b/datalets/base-datalet/static/images/more_vert_white_32x32.png new file mode 100644 index 0000000..c47aef6 --- /dev/null +++ b/datalets/base-datalet/static/images/more_vert_white_32x32.png diff --git a/datalets/bubblechart-datalet/bubblechart-datalet.html b/datalets/bubblechart-datalet/bubblechart-datalet.html index 849c2fa..61eb2c3 100755 --- a/datalets/bubblechart-datalet/bubblechart-datalet.html +++ b/datalets/bubblechart-datalet/bubblechart-datalet.html @@ -59,7 +59,7 @@ Examples: @@ -102,6 +102,18 @@ Example: behavior : { type : Object, value : {} + }, + /** + * Control the export menu + * xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all) + * + * @attribute export_menu + * @type Number + * @default 15 + */ + export_menu : { + type : Number, + value : 9 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all) } }, diff --git a/datalets/dynamic-datatable-datalet/dynamic-datatable-datalet.html b/datalets/dynamic-datatable-datalet/dynamic-datatable-datalet.html index d6cc134..91bacc2 100755 --- a/datalets/dynamic-datatable-datalet/dynamic-datatable-datalet.html +++ b/datalets/dynamic-datatable-datalet/dynamic-datatable-datalet.html @@ -54,7 +54,7 @@ Example: - + @@ -116,6 +116,18 @@ Example: fields : { observer: '_reload' + }, + /** + * Control the export menu + * xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all) + * + * @attribute export_menu + * @type Number + * @default 15 + */ + export_menu : { + type : Number, + value : 15 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all) } // filters : { diff --git a/datalets/google_piechart-datalet/google_piechart-datalet.html b/datalets/google_piechart-datalet/google_piechart-datalet.html index 0512dba..ae22d1c 100755 --- a/datalets/google_piechart-datalet/google_piechart-datalet.html +++ b/datalets/google_piechart-datalet/google_piechart-datalet.html @@ -53,7 +53,7 @@ options={{options}}> - + @@ -144,6 +144,18 @@ pieHole: { type: Number, value: 0 + }, + /** + * Control the export menu + * xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all) + * + * @attribute export_menu + * @type Number + * @default 15 + */ + export_menu : { + type : Number, + value : 15 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all) } }, diff --git a/datalets/heatmap-datalet/heatmap-datalet.html b/datalets/heatmap-datalet/heatmap-datalet.html index bddf2dc..257f2c2 100755 --- a/datalets/heatmap-datalet/heatmap-datalet.html +++ b/datalets/heatmap-datalet/heatmap-datalet.html @@ -51,7 +51,7 @@ Example: - + diff --git a/datalets/leafletjs-datalet/leafletjs-datalet.html b/datalets/leafletjs-datalet/leafletjs-datalet.html index 5e85879..da6c005 100755 --- a/datalets/leafletjs-datalet/leafletjs-datalet.html +++ b/datalets/leafletjs-datalet/leafletjs-datalet.html @@ -56,7 +56,7 @@ Example:
- + @@ -159,6 +159,18 @@ Example: behavior : { type : Object, value : {} + }, + /** + * Control the export menu + * xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all) + * + * @attribute export_menu + * @type Number + * @default 15 + */ + export_menu : { + type : Number, + value : 9 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all) } }, diff --git a/datalets/linechart-datalet/linechart-datalet.html b/datalets/linechart-datalet/linechart-datalet.html index 1a2883a..50129eb 100755 --- a/datalets/linechart-datalet/linechart-datalet.html +++ b/datalets/linechart-datalet/linechart-datalet.html @@ -50,7 +50,7 @@ Example: @@ -199,6 +199,18 @@ Example: behavior : { type : Object, value : {} + }, + /** + * Control the export menu + * xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all) + * + * @attribute export_menu + * @type Number + * @default 15 + */ + export_menu : { + type : Number, + value : 15 // xxxx BITMASK. FROM RIGHT : HTML, PNG, RTF, MY SPACE (eg. 1111 show all, 0000 hide all) } },