[Commits] r1651 - sandbox/ahocevar/playground/ux/Printing/examples
commits at geoext.org
commits at geoext.org
Wed Jan 6 22:38:39 CET 2010
Author: ahocevar
Date: 2010-01-06 22:38:39 +0100 (Wed, 06 Jan 2010)
New Revision: 1651
Modified:
sandbox/ahocevar/playground/ux/Printing/examples/PrintMapPanel.js
Log:
fixed layout (especially for Chrome)
Modified: sandbox/ahocevar/playground/ux/Printing/examples/PrintMapPanel.js
===================================================================
--- sandbox/ahocevar/playground/ux/Printing/examples/PrintMapPanel.js 2010-01-06 19:04:06 UTC (rev 1650)
+++ sandbox/ahocevar/playground/ux/Printing/examples/PrintMapPanel.js 2010-01-06 21:38:39 UTC (rev 1651)
@@ -57,15 +57,20 @@
printProvider: printProvider
});
- new Ext.Window({
+ var win = new Ext.Window({
title: "Print",
modal: true,
+ bodyStyle: "padding: 5px; border: none",
+ bodyBorder: false,
+ bodyCfg: {
+ tag: 'center',
+ cls: 'x-panel-body'
+ },
items: [{
xtype: "form",
border: false,
forceLayout: true,
hideLabels: true,
- bodyStyle: "padding: 5px 30px 5px 30px",
defaults: {
anchor: "100%"
},
@@ -83,43 +88,53 @@
plugins: new GeoExt.ux.plugins.PrintProviderField({
printProvider: printProvider
})
- }, printMapPanel]
- }],
- tbar: ["Paper Size:", {
- xtype: "combo",
- width: 98,
- plugins: new GeoExt.ux.plugins.PrintProviderField({
- printProvider: printProvider
- }),
- store: printProvider.layouts,
- displayField: "name",
- typeAhead: true,
- mode: "local",
- forceSelection: true,
- triggerAction: "all",
- selectOnFocus: true
- }, " Resolution:", {
- xtype: "combo",
- width: 62,
- plugins: new GeoExt.ux.plugins.PrintProviderField({
- printProvider: printProvider
- }),
- store: printProvider.dpis,
- displayField: "name",
- tpl: '<tpl for="."><div class="x-combo-list-item">{name} dpi</div></tpl>',
- typeAhead: true,
- mode: "local",
- forceSelection: true,
- triggerAction: "all",
- selectOnFocus: true,
- setValue: function(v) {
- v = parseInt(v) + " dpi";
- Ext.form.ComboBox.prototype.setValue.apply(this, arguments);
+ }]
+ }, printMapPanel],
+ tbar: [
+ "Paper Size:", {
+ xtype: "combo",
+ width: 98,
+ plugins: new GeoExt.ux.plugins.PrintProviderField({
+ printProvider: printProvider
+ }),
+ store: printProvider.layouts,
+ displayField: "name",
+ typeAhead: true,
+ mode: "local",
+ forceSelection: true,
+ triggerAction: "all",
+ selectOnFocus: true
+ }, " Resolution:", {
+ xtype: "combo",
+ width: 62,
+ plugins: new GeoExt.ux.plugins.PrintProviderField({
+ printProvider: printProvider
+ }),
+ store: printProvider.dpis,
+ displayField: "name",
+ tpl: '<tpl for="."><div class="x-combo-list-item">{name} dpi</div></tpl>',
+ typeAhead: true,
+ mode: "local",
+ forceSelection: true,
+ triggerAction: "all",
+ selectOnFocus: true,
+ setValue: function(v) {
+ v = parseInt(v) + " dpi";
+ Ext.form.ComboBox.prototype.setValue.apply(this, arguments);
+ }
+ }, "->", {
+ text: "Print",
+ handler: printMapPanel.print,
+ scope: printMapPanel
}
- }, "->", {
- text: "Print",
- handler: printMapPanel.print,
- scope: printMapPanel
- }]
+ ],
+ listeners: {
+ "resize": function() {
+ printMapPanel.fitMap();
+ win.items.get(0).setWidth(printMapPanel.getWidth());
+ }
+ }
}).show();
+ win.setWidth(win.getWidth() - win.body.getWidth() + 10 +
+ Math.max(320, printMapPanel.getWidth()));
}
More information about the Commits
mailing list