/ext-4.1.0_b3/examples/organizer/OrgPanel.js

https://bitbucket.org/srogerf/javascript · JavaScript · 52 lines · 27 code · 3 blank · 22 comment · 0 complexity · e892d733b5d5ce77eb9c9d08d003cf07 MD5 · raw file

  1. /**
  2. * @class Ext.org.OrgPanel
  3. * @extends Ext.panel.Panel
  4. *
  5. * This class combines the {@link Ext.org.AlbumTree AlbumTree} and {@link Ext.org.ImageView ImageView}
  6. * components into a {@link Ext.layout.container.Border Border} layout.
  7. */
  8. Ext.define('Ext.org.OrgPanel', {
  9. extend: 'Ext.panel.Panel',
  10. requires: 'Ext.layout.container.Border',
  11. layout: 'border',
  12. initComponent: function() {
  13. this.items = [
  14. {
  15. xtype: 'albumtree',
  16. region: 'west',
  17. padding: 5,
  18. width: 200
  19. },
  20. {
  21. xtype: 'panel',
  22. title: 'My Images',
  23. layout: 'fit',
  24. region: 'center',
  25. padding: '5 5 5 0',
  26. items: {
  27. xtype: 'imageview',
  28. /* (add a '/' at the front of this line to turn this on)
  29. listeners: {
  30. containermouseout: function (view, e) {
  31. Ext.log('ct', e.type);
  32. },
  33. containermouseover: function (view, e) {
  34. Ext.log('ct', e.type);
  35. },
  36. itemmouseleave: function (view, record, item, index, e) {
  37. Ext.log('item', e.type, ' id=', record.id);
  38. },
  39. itemmouseenter: function (view, record, item, index, e) {
  40. Ext.log('item', e.type, ' id=', record.id);
  41. }
  42. },/**/
  43. trackOver: true
  44. }
  45. }
  46. ];
  47. this.callParent(arguments);
  48. }
  49. });