Browse Source

update djextdirect to v0.8

Natenom/support-murmur-13-1446181288462
Michael Ziegler 11 years ago
parent
commit
d96024b4ad
  1. 2
      pyweb/djextdirect/__init__.py
  2. 24
      pyweb/djextdirect/formprovider.py
  3. 3
      pyweb/djextdirect/provider.py

2
pyweb/djextdirect/__init__.py

@ -15,7 +15,7 @@
* GNU General Public License for more details.
"""
VERSION = ( 0, 7 )
VERSION = ( 0, 8 )
VERSIONSTR = "v%d.%d" % VERSION

24
pyweb/djextdirect/formprovider.py

@ -15,7 +15,7 @@
* GNU General Public License for more details.
"""
import json as json
import json
import functools
@ -57,13 +57,6 @@ Ext.ux.%(clsname)s = function( config ){
this.api = %(apiconf)s;
for( var i = 0; i < this.items.length; i++ ){
if( this.items[i].xtype == "choicescombo" ){
this.items[i].pk = config.pk;
this.items[i].api = this.api;
}
}
Ext.ux.%(clsname)s.superclass.constructor.call( this );
this.form.api = this.api;
@ -130,26 +123,25 @@ Ext.ux.ChoicesCombo = function( config ){
});
this.triggerAction = 'all';
this.store = new Ext.data.DirectStore({
baseParams: {'pk': this.pk, 'field': this.name},
directFn: this.api.choices,
baseParams: {'pk': this.ownerCt.pk, 'field': this.name},
directFn: this.ownerCt.api.choices,
paramOrder: ['pk', 'field'],
reader: new Ext.data.JsonReader({
successProperty: 'success',
idProperty: this.valueField,
root: 'data',
fields: [this.valueField, this.displayField]
})
});
}),
autoLoad: true
});
Ext.ux.ChoicesCombo.superclass.constructor.call( this );
this.store.load();
};
};
Ext.extend( Ext.ux.ChoicesCombo, Ext.form.ComboBox, {
});
});
Ext.reg( 'choicescombo', Ext.ux.ChoicesCombo );
"""

3
pyweb/djextdirect/provider.py

@ -15,8 +15,7 @@
* GNU General Public License for more details.
"""
import json as json
import json
import inspect
import functools
import traceback

Loading…
Cancel
Save