Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. Booking.Quote = Ext.extend(Ext.Panel, {
  2. border: false,
  3. frame: false,
  4. labelWidth: 120,
  5. bodyStyle: 'background-color: #0D0D0D',
  6. style: { padding: '5 0 5 0' },
  7.  
  8. initComponent: function() {
  9. var config = {items: [{
  10. xtype: 'panel',
  11. labelWidth: 120,
  12. itemId: 'sumary',
  13. style: { padding: '5 0 5 0' }
  14. }, {
  15. xtype: 'fieldset',
  16. itemId: 'Map',
  17. autoHeight: true,
  18. items: [{
  19. xtype: 'gmappanel',
  20. zoomLevel: 3,
  21. style:{marginleft:'-10'},
  22. gmapType: 'map',
  23. itemId: 'my_map',
  24. height: 300,
  25. width: '100%' ,
  26. border: true,
  27. mapConfOpts: ['enableScrollWheelZoom','enableDoubleClickZoom','enableDragging'],
  28. setCenter: {
  29. lat: 43,
  30. lng: 11
  31. }
  32. }]
  33. }
  34. ]};
  35.  
  36. Ext.apply(this, Ext.apply(this.initialConfig, config));
  37.  
  38. Booking.Quote.superclass.initComponent.apply(this, arguments);
  39. },
  40.  
  41. onRender: function() {
  42. Booking.Quote.superclass.onRender.apply(this, arguments);
  43. },
  44.  
  45. setHtml: function(html){
  46. this.getComponent('sumary').body.update(html);
  47. this.getComponent('sumary').doLayout();
  48. },
  49.  
  50. addMarker: function(lat, lng){
  51. this.getComponent('Map').getComponent('my_map').addMarker(new google.maps.LatLng(lat, lng), [lat, lng]);
  52. }
  53. });
  54.  
  55. Ext.reg('quoteForm', Booking.Quote);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement