Я хотел бы создать ExtJS FormPanel, который позволяет пользователю изменять порядок списка наборов полей с помощью перетаскивания.
Я вижу, что очень легко сделать наборы полей перемещаемыми с помощью draggable: true, но как мне настроить dropzone? Я пытался следовать ряду примеров, но мне не повезло.
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();
},
});