[Commits] r2603 - extensions/geoext.ux/ux/SimplePrint/lib/GeoExt.ux
commits at geoext.org
commits at geoext.org
Thu Feb 10 14:10:09 CET 2011
Author: ahocevar
Date: 2011-02-10 14:10:09 +0100 (Thu, 10 Feb 2011)
New Revision: 2603
Modified:
extensions/geoext.ux/ux/SimplePrint/lib/GeoExt.ux/SimplePrint.js
Log:
Make combo boxes configurable, e.g. to add an editable: false option. p=fvanderbiest
Modified: extensions/geoext.ux/ux/SimplePrint/lib/GeoExt.ux/SimplePrint.js
===================================================================
--- extensions/geoext.ux/ux/SimplePrint/lib/GeoExt.ux/SimplePrint.js 2011-02-09 12:16:22 UTC (rev 2602)
+++ extensions/geoext.ux/ux/SimplePrint/lib/GeoExt.ux/SimplePrint.js 2011-02-10 13:10:09 UTC (rev 2603)
@@ -101,7 +101,20 @@
* e.g. for rotating handles when used in a style map context. Read-only.
*/
printPage: null,
-
+
+ /** api: config[comboOptions]
+ * ``Object`` Optional options for the comboboxes. If not provided, the
+ * following will be used:
+ *
+ * .. code-block:: javascript
+ *
+ * {
+ * typeAhead: true,
+ * selectOnFocus: true
+ * }
+ */
+ comboOptions: null,
+
/** private: method[initComponent]
*/
initComponent: function() {
@@ -170,48 +183,47 @@
this.mapPanel.initPlugin(this.printExtent);
var p = this.printExtent.printProvider;
var hideUnique = this.initialConfig.hideUnique !== false;
- !(hideUnique && p.layouts.getCount() <= 1) && this.add({
+ var cbOptions = this.comboOptions || {
+ typeAhead: true,
+ selectOnFocus: true
+ };
+
+ !(hideUnique && p.layouts.getCount() <= 1) && this.add(Ext.applyIf({
xtype: "combo",
fieldLabel: this.layoutText,
store: p.layouts,
+ forceSelection: true,
displayField: "name",
- typeAhead: true,
mode: "local",
- forceSelection: true,
triggerAction: "all",
- selectOnFocus: true,
plugins: new GeoExt.plugins.PrintProviderField({
printProvider: p
})
- });
- !(hideUnique && p.dpis.getCount() <= 1) && this.add({
+ }, cbOptions));
+ !(hideUnique && p.dpis.getCount() <= 1) && this.add(Ext.applyIf({
xtype: "combo",
fieldLabel: this.dpiText,
store: p.dpis,
+ forceSelection: true,
displayField: "name",
- typeAhead: true,
mode: "local",
- forceSelection: true,
triggerAction: "all",
- selectOnFocus: true,
plugins: new GeoExt.plugins.PrintProviderField({
printProvider: p
})
- });
- !(hideUnique && p.scales.getCount() <= 1) && this.add({
+ }, cbOptions));
+ !(hideUnique && p.scales.getCount() <= 1) && this.add(Ext.applyIf({
xtype: "combo",
fieldLabel: this.scaleText,
store: p.scales,
+ forceSelection: true,
displayField: "name",
- typeAhead: true,
mode: "local",
- forceSelection: true,
triggerAction: "all",
- selectOnFocus: true,
plugins: new GeoExt.plugins.PrintPageField({
printPage: this.printPage
})
- });
+ }, cbOptions));
this.initialConfig.hideRotation !== true && this.add({
xtype: "numberfield",
fieldLabel: this.rotationText,
More information about the Commits
mailing list