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.

52 lines
1.5 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. // basic tabs 1, built from existing content
  9. var tabs = new Ext.TabPanel({
  10. renderTo: 'tabs1',
  11. width:450,
  12. activeTab: 0,
  13. frame:true,
  14. defaults:{autoHeight: true},
  15. items:[
  16. {contentEl:'script', title: 'Short Text'},
  17. {contentEl:'markup', title: 'Long Text'}
  18. ]
  19. });
  20. // second tabs built from JS
  21. var tabs2 = new Ext.TabPanel({
  22. renderTo: document.body,
  23. activeTab: 0,
  24. width:600,
  25. height:250,
  26. plain:true,
  27. defaults:{autoScroll: true},
  28. items:[{
  29. title: 'Normal Tab',
  30. html: "My content was added during construction."
  31. },{
  32. title: 'Ajax Tab 1',
  33. autoLoad:'ajax1.htm'
  34. },{
  35. title: 'Ajax Tab 2',
  36. autoLoad: {url: 'ajax2.htm', params: 'foo=bar&wtf=1'}
  37. },{
  38. title: 'Event Tab',
  39. listeners: {activate: handleActivate},
  40. html: "I am tab 4's content. I also have an event listener attached."
  41. },{
  42. title: 'Disabled Tab',
  43. disabled:true,
  44. html: "Can't see me cause I'm disabled"
  45. }
  46. ]
  47. });
  48. function handleActivate(tab){
  49. alert(tab.title + ' was activated.');
  50. }
  51. });