I'd like to build an ExtJS FormPanel that allows the user to reorder a list of field sets using drag and drop.
I see it's very easy to make the field sets moveable by using draggable: true, but how do I set up the dropzone? I've tried to follow a number of examples, but not had much luck.
MyApp.FormPanel = Ext.extend(Ext.FormPanel,{
title: 'Fields',
fieldSetCount: 0,
constructor: function(config){
Ext.apply(this, config);
this.tbar = [{
text: 'Add Field Set',
handler: this.addFieldSet,
scope: this
}];
MyApp.FormPanel.superclass.constructor.call(this, config);
},
addFieldSet: function(){
this.add({
xtype: 'fieldset',
title: 'Fieldset ' + this.fieldSetCount++,
draggable: true
});
this.doLayout();
},
});