Changeset 2603
- Timestamp:
- 02/10/11 14:10:09 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
extensions/geoext.ux/ux/SimplePrint/lib/GeoExt.ux/SimplePrint.js
r2557 r2603 102 102 */ 103 103 printPage: null, 104 104 105 /** api: config[comboOptions] 106 * ``Object`` Optional options for the comboboxes. If not provided, the 107 * following will be used: 108 * 109 * .. code-block:: javascript 110 * 111 * { 112 * typeAhead: true, 113 * selectOnFocus: true 114 * } 115 */ 116 comboOptions: null, 117 105 118 /** private: method[initComponent] 106 119 */ … … 171 184 var p = this.printExtent.printProvider; 172 185 var hideUnique = this.initialConfig.hideUnique !== false; 173 !(hideUnique && p.layouts.getCount() <= 1) && this.add({ 186 var cbOptions = this.comboOptions || { 187 typeAhead: true, 188 selectOnFocus: true 189 }; 190 191 !(hideUnique && p.layouts.getCount() <= 1) && this.add(Ext.applyIf({ 174 192 xtype: "combo", 175 193 fieldLabel: this.layoutText, 176 194 store: p.layouts, 195 forceSelection: true, 177 196 displayField: "name", 178 typeAhead: true,179 197 mode: "local", 180 forceSelection: true,181 198 triggerAction: "all", 182 selectOnFocus: true,183 199 plugins: new GeoExt.plugins.PrintProviderField({ 184 200 printProvider: p 185 201 }) 186 } );187 !(hideUnique && p.dpis.getCount() <= 1) && this.add( {202 }, cbOptions)); 203 !(hideUnique && p.dpis.getCount() <= 1) && this.add(Ext.applyIf({ 188 204 xtype: "combo", 189 205 fieldLabel: this.dpiText, 190 206 store: p.dpis, 207 forceSelection: true, 191 208 displayField: "name", 192 typeAhead: true,193 209 mode: "local", 194 forceSelection: true,195 210 triggerAction: "all", 196 selectOnFocus: true,197 211 plugins: new GeoExt.plugins.PrintProviderField({ 198 212 printProvider: p 199 213 }) 200 } );201 !(hideUnique && p.scales.getCount() <= 1) && this.add( {214 }, cbOptions)); 215 !(hideUnique && p.scales.getCount() <= 1) && this.add(Ext.applyIf({ 202 216 xtype: "combo", 203 217 fieldLabel: this.scaleText, 204 218 store: p.scales, 219 forceSelection: true, 205 220 displayField: "name", 206 typeAhead: true,207 221 mode: "local", 208 forceSelection: true,209 222 triggerAction: "all", 210 selectOnFocus: true,211 223 plugins: new GeoExt.plugins.PrintPageField({ 212 224 printPage: this.printPage 213 225 }) 214 } );226 }, cbOptions)); 215 227 this.initialConfig.hideRotation !== true && this.add({ 216 228 xtype: "numberfield",