[Commits] r2062 - in sandbox/pgiraud/playground/print-multipage/geoext.ux/ux: PrintPreview/examples PrintPreview/lib/GeoExt.ux PrintPreview/resources/css SimplePrint/lib/GeoExt.ux
commits at geoext.org
commits at geoext.org
Mon Mar 29 15:34:42 CEST 2010
Author: pgiraud
Date: 2010-03-29 15:34:42 +0200 (Mon, 29 Mar 2010)
New Revision: 2062
Modified:
sandbox/pgiraud/playground/print-multipage/geoext.ux/ux/PrintPreview/examples/PrintPreview.html
sandbox/pgiraud/playground/print-multipage/geoext.ux/ux/PrintPreview/examples/PrintPreview.js
sandbox/pgiraud/playground/print-multipage/geoext.ux/ux/PrintPreview/lib/GeoExt.ux/PrintPreview.js
sandbox/pgiraud/playground/print-multipage/geoext.ux/ux/PrintPreview/resources/css/printpreview.css
sandbox/pgiraud/playground/print-multipage/geoext.ux/ux/SimplePrint/lib/GeoExt.ux/SimplePrint.js
Log:
svn merge -r 1951:HEAD http://svn.geoext.org/extensions/geoext.ux
Modified: sandbox/pgiraud/playground/print-multipage/geoext.ux/ux/PrintPreview/examples/PrintPreview.html
===================================================================
--- sandbox/pgiraud/playground/print-multipage/geoext.ux/ux/PrintPreview/examples/PrintPreview.html 2010-03-29 13:19:51 UTC (rev 2061)
+++ sandbox/pgiraud/playground/print-multipage/geoext.ux/ux/PrintPreview/examples/PrintPreview.html 2010-03-29 13:34:42 UTC (rev 2062)
@@ -6,7 +6,7 @@
<script type="text/javascript" src="http://extjs.cachefly.net/ext-3.0.0/ext-all.js"></script>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-3.0.0/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-3.0.0/examples/shared/examples.css" />
- <script src="http://www.openlayers.org/api/2.8/OpenLayers.js"></script>
+ <script src="http://dev.openlayers.org/nightly/OpenLayers.js"></script>
<script type="text/javascript" src="../../../../geoext/lib/GeoExt.js"></script>
<!-- script and css resources for this ux -->
Modified: sandbox/pgiraud/playground/print-multipage/geoext.ux/ux/PrintPreview/examples/PrintPreview.js
===================================================================
--- sandbox/pgiraud/playground/print-multipage/geoext.ux/ux/PrintPreview/examples/PrintPreview.js 2010-03-29 13:19:51 UTC (rev 2061)
+++ sandbox/pgiraud/playground/print-multipage/geoext.ux/ux/PrintPreview/examples/PrintPreview.js 2010-03-29 13:34:42 UTC (rev 2062)
@@ -45,7 +45,6 @@
resizable: false,
width: 360,
items: new GeoExt.ux.PrintPreview({
- bodyStyle: "padding:5px",
printProvider: {
// using get for remote service access without same origin
// restriction. For async requests, we would set method to "POST".
Modified: sandbox/pgiraud/playground/print-multipage/geoext.ux/ux/PrintPreview/lib/GeoExt.ux/PrintPreview.js
===================================================================
--- sandbox/pgiraud/playground/print-multipage/geoext.ux/ux/PrintPreview/lib/GeoExt.ux/PrintPreview.js 2010-03-29 13:19:51 UTC (rev 2061)
+++ sandbox/pgiraud/playground/print-multipage/geoext.ux/ux/PrintPreview/lib/GeoExt.ux/PrintPreview.js 2010-03-29 13:34:42 UTC (rev 2062)
@@ -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",
+ cls: "gx-printpreview",
+ items: [
+ this.form,
+ this.printMapPanel
+ ]
+ });
this.addMapOverlay && this.printMapPanel.add(this.createMapOverlay());
this.printMapPanel.on({
@@ -181,6 +192,7 @@
this.printProvider.on({
"beforeprint": this.busyMask.show,
"print": this.busyMask.hide,
+ "printexception": this.busyMask.hide,
scope: this.busyMask
});
},
@@ -206,7 +218,7 @@
forceSelection: true,
triggerAction: "all",
selectOnFocus: true
- }, " ");
+ }, " ");
this.printProvider.dpis.getCount() > 1 && items.push(this.resolutionText, {
xtype: "combo",
width: 62,
@@ -225,7 +237,7 @@
v = parseInt(v) + " dpi";
Ext.form.ComboBox.prototype.setValue.apply(this, arguments);
}
- });
+ }, " ");
items.push("->", {
text: this.printText,
iconCls: "icon-print",
@@ -235,7 +247,10 @@
},
scope: this
});
- return new Ext.Toolbar(items);
+ return {
+ xtype: "toolbar",
+ items: items
+ };
},
/** private: method[createForm]
@@ -247,7 +262,8 @@
name: this.mapTitleField,
value: this.mapTitle,
emptyText: this.emptyTitleText,
- anchor: "100%",
+ margins: "0 5 0 0",
+ flex: 1,
hideLabel: true,
plugins: new GeoExt.plugins.PrintProviderField({
printProvider: this.printProvider
@@ -259,21 +275,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 +293,12 @@
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",
+ items: [
+ titleCfg,
+ legendCheckbox
+ ]
} : titleCfg, {
xtype: "textarea",
name: this.commentField,
Modified: sandbox/pgiraud/playground/print-multipage/geoext.ux/ux/PrintPreview/resources/css/printpreview.css
===================================================================
--- sandbox/pgiraud/playground/print-multipage/geoext.ux/ux/PrintPreview/resources/css/printpreview.css 2010-03-29 13:19:51 UTC (rev 2061)
+++ sandbox/pgiraud/playground/print-multipage/geoext.ux/ux/PrintPreview/resources/css/printpreview.css 2010-03-29 13:34:42 UTC (rev 2062)
@@ -2,6 +2,15 @@
background-image: url(../images/silk/printer.png);
}
+.gx-printpreview {
+ padding: 5px 0 5px 0;
+}
+
+/* fixes textarea scrollbar issue in FF on OSX */
+.gx-printpreview textarea.x-form-field {
+ padding: 1px 1px 1px 3px;
+}
+
.gx-map-overlay {
z-index: 1000;
position: absolute;
@@ -27,3 +36,7 @@
height: 24px;
width: 24px;
}
+
+.gx-item-nowrap .x-box-item {
+ white-space: nowrap;
+}
\ No newline at end of file
Modified: sandbox/pgiraud/playground/print-multipage/geoext.ux/ux/SimplePrint/lib/GeoExt.ux/SimplePrint.js
===================================================================
--- sandbox/pgiraud/playground/print-multipage/geoext.ux/ux/SimplePrint/lib/GeoExt.ux/SimplePrint.js 2010-03-29 13:19:51 UTC (rev 2061)
+++ sandbox/pgiraud/playground/print-multipage/geoext.ux/ux/SimplePrint/lib/GeoExt.ux/SimplePrint.js 2010-03-29 13:34:42 UTC (rev 2062)
@@ -201,13 +201,10 @@
})
});
this.initialConfig.hideRotation !== true && this.add({
- xtype: "textfield",
+ xtype: "numberfield",
fieldLabel: this.rotationText,
name: "rotation",
enableKeyEvents: true,
- validator: function(v) {
- return !isNaN(v)
- },
plugins: new GeoExt.plugins.PrintPageField({
printPage: this.printPage
})
More information about the Commits
mailing list