Web Interface For Lite Argus Control modules
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.3 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*!
  2. * Ext JS Library 3.3.1
  3. * Copyright(c) 2006-2010 Sencha Inc.
  4. * licensing@sencha.com
  5. * http://www.sencha.com/license
  6. */
  7. Ext.onReady(function(){
  8. var propsGrid = new Ext.grid.PropertyGrid({
  9. renderTo: 'prop-grid',
  10. width: 300,
  11. autoHeight: true,
  12. propertyNames: {
  13. tested: 'QA',
  14. borderWidth: 'Border Width'
  15. },
  16. source: {
  17. '(name)': 'Properties Grid',
  18. grouping: false,
  19. autoFitColumns: true,
  20. productionQuality: false,
  21. created: new Date(Date.parse('10/15/2006')),
  22. tested: false,
  23. version: 0.01,
  24. borderWidth: 1
  25. },
  26. viewConfig : {
  27. forceFit: true,
  28. scrollOffset: 2 // the grid will never have scrollbars
  29. }
  30. });
  31. // simulate updating the grid data via a button click
  32. new Ext.Button({
  33. renderTo: 'button-container',
  34. text: 'Update source',
  35. handler: function(){
  36. propsGrid.setSource({
  37. '(name)': 'Property Grid',
  38. grouping: false,
  39. autoFitColumns: true,
  40. productionQuality: true,
  41. created: new Date(),
  42. tested: false,
  43. version: 0.8,
  44. borderWidth: 2
  45. });
  46. }
  47. });
  48. });