Web UI for ARGUS server
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.

185 lines
4.0 KiB

6 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
6 years ago
​
​
​
6 years ago
6 years ago
​
6 years ago
6 years ago
​
​
​
​
​
​
​
​
​
​
​
​
6 years ago
6 years ago
​
​
6 years ago
​
​
​
6 years ago
6 years ago
6 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
6 years ago
6 years ago
6 years ago
​
6 years ago
​
6 years ago
6 years ago
​
​
​
​
​
​
​
​
​
6 years ago
​
​
6 years ago
​
​
  1. //<?php require_once('../../js_asm.php'); ?>
  2. var winW = <?=0+$CUser->Data['width'];?>;
  3. var winH = <?=0+$CUser->Data['height'];?>;
  4. var PanelH = winH-90;
  5. function Refresh(){
  6. window.location="/?t="+123;
  7. };
  8. function updateUserScreenResolution( x, y ){
  9. Ext.Ajax.request({
  10. url: '/lib/controller/updateUserSettings.php',
  11. params: {
  12. SAID: <?=$SiteID;?>,
  13. UID: <?=$UserID;?>,
  14. SID: '<?=$Session;?>',
  15. SSS: 15,
  16. WID: x,
  17. HEI: y
  18. },
  19. success: function( response, opts ){
  20. Refresh();
  21. },
  22. failure: function( response, opts ) {
  23. Ext.Msg.show({
  24. title:'Request Failure!',
  25. msg: 'Ajax Request failed!',
  26. buttons: Ext.Msg.OK,
  27. icon: Ext.MessageBox.INFO
  28. });
  29. }
  30. });
  31. };
  32. function CheckWindowSize(delay){
  33. if (parseInt(navigator.appVersion)>3) {
  34. if (navigator.appName=="Netscape") {
  35. winW2 = window.innerWidth;
  36. winH2 = window.innerHeight;
  37. if ( winH2<700 ) winH2=700;
  38. };
  39. if (navigator.appName.indexOf("Microsoft")!=-1) {
  40. winW2 = document.body.offsetWidth;
  41. winH2 = document.body.offsetHeight;
  42. if ( winH2<700 ) winH2=700;
  43. };
  44. };
  45. //alert(winW2+':'+winW+' '+winH2+':'+winH);
  46. if ( winW2 != winW || winH2!=winH ){
  47. updateUserScreenResolution( winW2, winH2 );
  48. };
  49. };
  50. Ext.onReady(function(){
  51. //Check Screen Size
  52. //alert( winW + 'x' + winH );
  53. CheckWindowSize();
  54. var viewport = new Ext.Viewport({
  55. id: 'main_viewport',
  56. layout:'border',
  57. items: [{
  58. xtype: 'panel',
  59. region: 'north',
  60. baseCls: 'x-plain',
  61. height: 50,
  62. items:[{
  63. xtype: 'panel',
  64. id:'top',
  65. baseCls: 'x-plain',
  66. html: '<p style="padding:10px;color:#556677;font-size:11px;"><img src="/style/img/logo32.png">&nbsp;R-Goose Security System</p>'
  67. }]
  68. },{
  69. xtype: 'panel',
  70. id:'btns',
  71. region:'west',
  72. bsaseCls:'x-plain',
  73. title: 'R-Goose System',
  74. collapsible: true,
  75. split:true,
  76. width:150,
  77. minWidth: 100,
  78. maxWidth: 250,
  79. layout:'accordion',
  80. margins: '5 0 5 5',
  81. cmargins:'5 5 5 5',
  82. layoutConfig:{
  83. animate:true
  84. },
  85. items: [{
  86. title: 'Dashboard',
  87. layout: 'vbox',
  88. height: 120,
  89. pack: 'center',
  90. align : 'strech',
  91. items:[{
  92. xtype: 'button',
  93. width: '100%',
  94. id:'go_home',
  95. text: 'Go Home',
  96. handler: function( b, e ){
  97. loadDashBoard();
  98. }
  99. },{
  100. xtype: 'button',
  101. width: '100%',
  102. id:'go_monitor',
  103. text: 'Monitor Events',
  104. handler: function( b, e ){
  105. loadTimeLine();
  106. }
  107. },{
  108. xtype: 'button',
  109. width: '100%',
  110. id:'go_out',
  111. text: 'Logout',
  112. handler: function( b, e ){
  113. window.location = '/login.php?UID=1';
  114. }
  115. }]
  116. },{
  117. title: 'System Settings',
  118. layout: 'vbox',
  119. height: 120,
  120. pack: 'center',
  121. align : 'strech',
  122. items:[{
  123. xtype: 'button',
  124. width: '100%',
  125. id:'sys_edit',
  126. text: 'Edit Connections',
  127. handler: function( b, e ){
  128. loadSystemEditor();
  129. }
  130. },{
  131. xtype: 'button',
  132. width: '100%',
  133. id:'map_edit',
  134. text: 'Edit Locations',
  135. handler: function( b, e ){
  136. loadLocationEditor();
  137. }
  138. },{
  139. xtype: 'button',
  140. width: '100%',
  141. id:'logout',
  142. text: 'Logout',
  143. handler: function( b, e ){
  144. window.location = '/login.php?UID=1';
  145. }
  146. }]
  147. },{
  148. title: 'Profile Settings',
  149. html: '<p>Panel content!</p>'
  150. }]
  151. },{
  152. xtype: 'panel',
  153. region:'center',
  154. margins: '5 5 5 0',
  155. id: 'main_content',
  156. title: 'System Dashboard',
  157. items:[{
  158. xtype: 'portal',
  159. id: 'main_portal',
  160. frame: false,
  161. border: false,
  162. items:{
  163. html: '<p style="padding:10px;color:#556677;font-size:11px;"><center><img src="/style/img/logo.png"></center></p>'
  164. },
  165. listeners:{
  166. drop: function( a ){
  167. updateDashBoardItemLayout( a.panel.id, a.columnIndex, a.position );
  168. }
  169. }
  170. }]
  171. }]
  172. });
  173. loadDashBoard();
  174. });