Form.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. Ext.define('SimpleTasks.view.tasks.Form', {
  2. extend: 'Ext.form.Panel',
  3. xtype: 'taskForm',
  4. requires: [
  5. 'Ext.layout.container.HBox',
  6. 'Ext.form.field.Date',
  7. 'Ext.ux.TreePicker'
  8. ],
  9. layout: 'hbox',
  10. cls: 'tasks-new-form',
  11. initComponent: function() {
  12. this.items = [
  13. {
  14. xtype: 'component',
  15. cls: 'tasks-new',
  16. width: 24,
  17. height: 24
  18. },
  19. {
  20. xtype: 'textfield',
  21. name: 'title',
  22. emptyText: 'Add a new task'
  23. },
  24. {
  25. xtype: 'treepicker',
  26. name: 'list_id',
  27. displayField: 'name',
  28. store: Ext.create('SimpleTasks.store.Lists', {storeId: 'Lists-TaskForm'}),
  29. width: 195
  30. },
  31. {
  32. xtype: 'datefield',
  33. name: 'due',
  34. value: new Date(),
  35. width: 85
  36. }
  37. ];
  38. this.callParent(arguments);
  39. }
  40. });