[Commits] r2015 - in extensions/geoext.ux/ux/PrintPreview: lib/GeoExt.ux resources/css
commits at geoext.org
commits at geoext.org
Fri Mar 19 17:14:51 CET 2010
Author: ahocevar
Date: 2010-03-19 17:14:51 +0100 (Fri, 19 Mar 2010)
New Revision: 2015
Modified:
extensions/geoext.ux/ux/PrintPreview/lib/GeoExt.ux/PrintPreview.js
extensions/geoext.ux/ux/PrintPreview/resources/css/printpreview.css
Log:
made PrintPreview work with Ext 3.2, and removed some nasty IE workarounds.
Modified: extensions/geoext.ux/ux/PrintPreview/lib/GeoExt.ux/PrintPreview.js
===================================================================
--- extensions/geoext.ux/ux/PrintPreview/lib/GeoExt.ux/PrintPreview.js 2010-03-19 15:11:39 UTC (rev 2014)
+++ extensions/geoext.ux/ux/PrintPreview/lib/GeoExt.ux/PrintPreview.js 2010-03-19 16:14:51 UTC (rev 2015)
@@ -10,7 +10,7 @@
/** api: (define)
* module = GeoExt.ux
* class = PrintPreview
- * base_link = `Ext.Panel <http://extjs.com/deploy/dev/docs/?class=Ext.Panel>`_
+ * base_link = `Ext.Container <http://extjs.com/deploy/dev/docs/?class=Ext.Container>`_
*/
/** api: constructor
@@ -20,7 +20,7 @@
* module configuration with two custom fields (by default ``mapTitle`` and
* ``comment``).
*/
-GeoExt.ux.PrintPreview = Ext.extend(Ext.Panel, {
+GeoExt.ux.PrintPreview = Ext.extend(Ext.Container, {
/* begin i18n */
/** api: config[paperSizeText] ``String`` i18n */
@@ -133,14 +133,19 @@
*/
form: null,
+ /** private: property[autoEl]
+ * override
+ */
+ autoEl: "center",
+
+ /** private: property[cls]
+ * override
+ */
+ cls: "x-panel-body x-panel-body-noheader",
+
/** private: method[initComponent]
*/
initComponent: function() {
- this.bodyCfg = Ext.applyIf({
- tag: "center",
- cls: "x-panel-body"
- }, this.bodyCfg);
-
var printMapPanelOptions = {
sourceMap: this.sourceMap,
printProvider: this.printProvider
@@ -159,12 +164,18 @@
this.printProvider = this.printMapPanel.printProvider;
this.form = this.createForm();
- this.tbar = this.createToolbar();
GeoExt.ux.PrintPreview.superclass.initComponent.call(this);
- this.add(this.form);
- this.add(this.printMapPanel);
+ this.add(this.createToolbar());
+ this.add({
+ xtype: "container",
+ style: "padding: 5px",
+ items: [
+ this.form,
+ this.printMapPanel
+ ]
+ });
this.addMapOverlay && this.printMapPanel.add(this.createMapOverlay());
this.printMapPanel.on({
@@ -247,7 +258,7 @@
name: this.mapTitleField,
value: this.mapTitle,
emptyText: this.emptyTitleText,
- anchor: "100%",
+ flex: 1,
hideLabel: true,
plugins: new GeoExt.plugins.PrintProviderField({
printProvider: this.printProvider
@@ -259,21 +270,13 @@
name: "legend",
checked: this.includeLegend,
boxLabel: this.includeLegendText,
- anchor: "100%",
hideLabel: true,
+ ctCls: "gx-item-nowrap",
handler: function(cb, checked) {
this.includeLegend = checked;
},
scope: this
});
-
- // fix for IE which has ColumnLayout problems when some of the
- // container's components don't have a size
- Ext.isIE && this.on("afterlayout", function() {
- var ct = legendCheckbox.ownerCt;
- ct.setWidth(Ext.util.TextMetrics.measure(legendCheckbox.getEl(),
- this.includeLegendText).width + 34);
- }, this)
}
return new Ext.form.FormPanel({
@@ -285,18 +288,15 @@
items: [
this.legend ? {
xtype: "container",
- layout: "column",
- items: [{
- xtype: "container",
- layout: "form",
- columnWidth: 1,
- items: titleCfg
- }, {
- xtype: "container",
- layout: "form",
- style: "padding-left:8px",
- items: legendCheckbox
- }]
+ layout: "hbox",
+ cls: "x-form-item",
+ defaults: {
+ margins: "0 3 0 0"
+ },
+ items: [
+ titleCfg,
+ legendCheckbox
+ ]
} : titleCfg, {
xtype: "textarea",
name: this.commentField,
Modified: extensions/geoext.ux/ux/PrintPreview/resources/css/printpreview.css
===================================================================
--- extensions/geoext.ux/ux/PrintPreview/resources/css/printpreview.css 2010-03-19 15:11:39 UTC (rev 2014)
+++ extensions/geoext.ux/ux/PrintPreview/resources/css/printpreview.css 2010-03-19 16:14:51 UTC (rev 2015)
@@ -27,3 +27,7 @@
height: 24px;
width: 24px;
}
+
+.gx-item-nowrap .x-box-item {
+ white-space: nowrap;
+}
\ No newline at end of file
More information about the Commits
mailing list