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.

93 lines
2.1 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //<?php require_once('../../js_asm.php'); ?>
  2. function loadMetroControlUpper(){
  3. Ext.Ajax.request({
  4. url: '/lib/controller/getMetroUpperSensorEditor.php',
  5. params: {
  6. UID: <?=$UserID;?>,
  7. SID: '<?=$Session;?>'
  8. },
  9. success: function( response, opts ){
  10. var data = Ext.decode( response.responseText );
  11. var tComp = Ext.getCmp('main_content');
  12. if( data.status == 'ok' ){
  13. if( tComp!= null ){
  14. var content = Ext.decode( data.content );
  15. tComp.removeAll( true );
  16. tComp.add( content );
  17. tComp.doLayout();
  18. };
  19. } else {
  20. if( tComp!= null ){
  21. tComp.removeAll( true );
  22. tComp.add( data );
  23. tComp.doLayout();
  24. };
  25. };
  26. },
  27. failure: function(){
  28. }
  29. });
  30. };
  31. function loadMetroControlBottom(){
  32. Ext.Ajax.request({
  33. url: '/lib/controller/getMetroBottomSensorEditor.php',
  34. params: {
  35. UID: <?=$UserID;?>,
  36. SID: '<?=$Session;?>'
  37. },
  38. success: function( response, opts ){
  39. var data = Ext.decode( response.responseText );
  40. var tComp = Ext.getCmp('main_content');
  41. if( data.status == 'ok' ){
  42. if( tComp!= null ){
  43. var content = Ext.decode( data.content );
  44. tComp.removeAll( true );
  45. tComp.add( content );
  46. tComp.doLayout();
  47. };
  48. } else {
  49. if( tComp!= null ){
  50. tComp.removeAll( true );
  51. tComp.add( data );
  52. tComp.doLayout();
  53. };
  54. };
  55. },
  56. failure: function(){
  57. }
  58. });
  59. };
  60. function loadMetroControlFusion(){
  61. Ext.Ajax.request({
  62. url: '/lib/controller/getMetroFusionEditor.php',
  63. params: {
  64. UID: <?=$UserID;?>,
  65. SID: '<?=$Session;?>'
  66. },
  67. success: function( response, opts ){
  68. var data = Ext.decode( response.responseText );
  69. var tComp = Ext.getCmp('main_content');
  70. if( data.status == 'ok' ){
  71. if( tComp!= null ){
  72. var content = Ext.decode( data.content );
  73. tComp.removeAll( true );
  74. tComp.add( content );
  75. tComp.doLayout();
  76. };
  77. } else {
  78. if( tComp!= null ){
  79. tComp.removeAll( true );
  80. tComp.add( data );
  81. tComp.doLayout();
  82. };
  83. };
  84. },
  85. failure: function(){
  86. }
  87. });
  88. };