MODx.combo.Users = function (config) {
config = config || {};
Ext.applyIf(config, {
xtype:'superboxselect'
,triggerAction: 'all'
,mode: 'remote'
,valueField: "id"
,displayField: "username"
,store: new Ext.data.JsonStore({
id:'id',
autoLoad: true,
root:'results',
fields: ['username', 'id'],
url: MODx.config.connectors_url+'security/user.php',
baseParams:{
action: 'getList'
//,usergroup: 2
}
})
});
MODx.combo.Users.superclass.constructor.call(this, config);
};
Ext.extend(MODx.combo.Users, Ext.ux.form.SuperBoxSelect);
Ext.reg('modx-superbox-user', MODx.combo.Users );
$this->setProperty('owners', implode(',', $_REQUEST['owners'] )); {
xtype: 'modx-superbox-user'
,fieldLabel: _('contactmanagercenter.label_owners')
,name: 'owners[]'
,anchor: '100%'
,id: 'owners'
}
bdListings.combo.Category = function (config) {
config = config || {};
Ext.applyIf(config, {
xtype:'superboxselect'
,triggerAction: 'all'
,extraItemCls: 'x-tag'
,mode: 'remote'
,width: 350
,fields: ['id','name']
,displayField: 'name'
,valueField: 'id'
,store: new Ext.data.JsonStore({
id:'id',
autoLoad: true,
root:'results',
fields: ['name', 'id', 'is_parent'],
remoteSort: true,
url: bdListings.config.connector_url,
baseParams:{
action: 'mgr/category/getcombo'
}
,listeners: {
'load': {fn:function(store, records, options ) {
this.hiddenName = 'categorylist[]';
//this.setWidth('350');
}
},scope : this
}
})
,listeners: {
'beforeselect': {fn:function(combo, record, index ) {
if (record.data.is_parent == '1'){
return false;
}
}
},scope : this
}
});
bdListings.combo.Category.superclass.constructor.call(this, config);
this.store.load();
};
Ext.extend(bdListings.combo.Category, Ext.ux.form.SuperBoxSelect);
Ext.reg('bdlisting-combo-category', bdListings.combo.Category);
{
name: 'categorylist',
hiddenName: 'categorylist',
fieldLabel: _('bdlistings.category')+'*',
xtype: 'bdlisting-combo-category',
allowNegative: false,
anchor: '0 0',
allowBlank: false,
id: 'bdl-win-'+config.id+'-category'
}
Ext.extend(bdListings.combo.Category, Ext.ux.form.SuperBoxSelect,{
onResize: function(w, h, rw, rh) {
/*
var reduce = Ext.isIE6 ? 4 : Ext.isIE7 ? 1 : Ext.isIE8 ? 1 : 0;
if (this.wrapEl) {
this._width = w;
this.outerWrapEl.setWidth(w - reduce);
if (this.renderFieldBtns) {
reduce += (this.buttonWrap.getWidth() + 20);
this.wrapEl.setWidth(w - reduce)
}
}
Ext.ux.form.SuperBoxSelect.superclass.onResize.call(this, w, h, rw, rh);
this.autoSize();
*/
}
});
seems I could fix the superboxselect-size-issue for my situation by overwriting the onResize - function with an empty function:
Ext.extend(bdListings.combo.Category, Ext.ux.form.SuperBoxSelect,{ onResize: function(w, h, rw, rh) { /* var reduce = Ext.isIE6 ? 4 : Ext.isIE7 ? 1 : Ext.isIE8 ? 1 : 0; if (this.wrapEl) { this._width = w; this.outerWrapEl.setWidth(w - reduce); if (this.renderFieldBtns) { reduce += (this.buttonWrap.getWidth() + 20); this.wrapEl.setWidth(w - reduce) } } Ext.ux.form.SuperBoxSelect.superclass.onResize.call(this, w, h, rw, rh); this.autoSize(); */ } });