1 /** 2 * @fileOverview 3 * Copyright (c) 2013 Regione Autonoma della Sardegna 4 * Published under the GPL license.<br> 5 * See <a href="https://sardegnageoportale.it/webgis/license.txt">https://sardegnageoportale.it/webgis/license.txt</a> 6 * for the full text of the license. 7 * @version 0.1 8 */ 9 10 /** 11 * @require plugins/Tool.js 12 * @require GeoExt/widgets/Action.js 13 */ 14 15 /** 16 * @namespace framework.widgets.doublemap 17 */ 18 Ext.ns("framework.widgets.doublemap"); 19 20 /** 21 * Component that implements the print functionality extending the DoubleMapLinker behavior. 22 * DoublePrintMap redefines the action to perform after the save of map configuration at the moment 23 * started by the click on the print button. 24 * Also it overrides the CSS class that specifies the icon to put on the button with a print icon. 25 * @name_ DoublePrintMap 26 * @class Component that implements the print functionality extending the MapLinker behavior. 27 * @constructor 28 * @extends <a target="_blank" href="framework.widgets.doublemap.DoubleMapLinker.html">framework.widgets.doublemap.DoubleMapLinker</a> 29 */ 30 framework.widgets.doublemap.DoublePrintMap = Ext.extend(framework.widgets.doublemap.DoubleMapLinker, 31 /** 32 * @lends framework.widgets.doublemap.DoublePrintMap.prototype 33 */ 34 { 35 /** 36 * Text for zoom in action tooltip (i18n). 37 * @public 38 * @type string 39 */ 40 tooltip: "Print map..", 41 42 /** 43 * id icon class 44 * @public 45 * @type string 46 */ 47 iconCls: "gxp-icon-print-map", 48 49 /** 50 * This method opens a new browser tab (or reloads the existing one) showing a map configured 51 * as saved in the confiiguration file by the MapLinker, but formatted to print it on A4 paper. 52 * @public 53 * @param {number} id Id of current map configuration 54 */ 55 useMapConfiguration: function(id) { 56 window.open("print.jsp?map="+id,"Stampa","","true"); 57 } 58 }); 59 60 Ext.reg("framework_doubleprintmap", framework.widgets.doublemap.DoublePrintMap); 61