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.

682 lines
17 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //<?php require_once('../../js_asm.php'); ?>
  2. function ssShowSS() {
  3. ssStopTimer();
  4. document.removeEventListener( "mousemove", ssResetTimer );
  5. document.removeEventListener( "mousedown", ssResetTimer );
  6. document.removeEventListener( "keypress", ssResetTimer );
  7. document.removeEventListener( "touchmove", ssResetTimer );
  8. document.addEventListener( "mousemove", ssHideSS, false );
  9. document.addEventListener( "mousedown", ssHideSS, false );
  10. document.addEventListener( "keypress", ssHideSS, false );
  11. document.addEventListener( "touchmove", ssHideSS, false );
  12. document.getElementById('ss_bg').className='ss_bg_overlay';
  13. document.getElementById('ss_content').className='ss_overlay';
  14. ssShowTime();
  15. if( ssInterval == null ){
  16. ssInterval = window.setInterval( ssShowTime, 333 );
  17. };
  18. ssIsActive = true;
  19. };
  20. function ssShowTime(){
  21. document.getElementById('ss_content').style.fontSize = '240px';
  22. var currentdate = new Date();
  23. var cTime = (( currentdate.getHours()<10 )? '0'+currentdate.getHours(): currentdate.getHours() ) + ":" + (( currentdate.getMinutes()<10 )? '0'+currentdate.getMinutes(): currentdate.getMinutes() ) + ":" + (( currentdate.getSeconds()<10 )? '0'+currentdate.getSeconds(): currentdate.getSeconds() );
  24. document.getElementById('ss_content').innerHTML= cTime;
  25. };
  26. function ssResetTimer() {
  27. ssStopTimer();
  28. ssStartTimer();
  29. };
  30. function ssStartTimer() {
  31. if( ssTimer == null ){
  32. ssTimer = window.setTimeout( ssShowSS, ssTimeOut );
  33. };
  34. };
  35. function ssStopTimer() {
  36. if( ssTimer ){
  37. window.clearTimeout( ssTimer );
  38. ssTimer = null;
  39. };
  40. };
  41. function ssSetupTimer() {
  42. document.addEventListener( "mousemove", ssResetTimer, false);
  43. document.addEventListener( "mousedown", ssResetTimer, false);
  44. document.addEventListener( "keypress", ssResetTimer, false);
  45. document.addEventListener( "touchmove", ssResetTimer, false);
  46. ssStartTimer();
  47. };
  48. function ssHideSS(){
  49. document.getElementById('ss_bg').className='ss_hidden';
  50. document.getElementById('ss_content').className='ss_hidden';
  51. document.removeEventListener( "mousemove", ssHideSS );
  52. document.removeEventListener( "mousedown", ssHideSS );
  53. document.removeEventListener( "keypress", ssHideSS );
  54. document.removeEventListener( "touchmove", ssHideSS );
  55. if( ssInterval != null ){
  56. window.clearInterval( ssInterval );
  57. ssInterval = null;
  58. };
  59. ssSetupTimer();
  60. ssIsActive = false;
  61. };
  62. var sndBeep = null;
  63. var sndExcl = null;
  64. function playSound( t ){
  65. if( SoundEnable ){
  66. switch( t ){
  67. case 1:{
  68. if( sndBeep == null ) sndBeep = new Howl({
  69. src: [
  70. '/style/assets/audio/beep-07a.mp3',
  71. '/style/assets/audio/beep-07a.wav'
  72. ],
  73. loop: false,
  74. volume: 0.99,
  75. onend: function() {
  76. //console.log('Finished!');
  77. }
  78. });
  79. sndBeep.volume( SoundMode / 3 );
  80. if( !sndBeep.playing() ) sndBeep.play();
  81. break;
  82. };
  83. default:{
  84. if( sndExcl == null ) sndExcl = new Howl({
  85. src: [
  86. '/style/assets/audio/button-42.mp3',
  87. '/style/assets/audio/button-42.wav'
  88. ],
  89. loop: false,
  90. volume: 0.99
  91. });
  92. sndExcl.volume( SoundMode / 3 );
  93. if( !sndExcl.playing() ) sndExcl.play();
  94. };
  95. };
  96. };
  97. };
  98. function doRefresh(){
  99. if( mWindowID ){
  100. window.location="/?w="+mWindowID+"&t=" + uuidv4();
  101. } else {
  102. refreshAuxWindows();
  103. window.location="/?t=" + uuidv4();
  104. };
  105. };
  106. function doLogout(){
  107. if( mWindowID ){
  108. window.location = '/login.php?w='+mWindowID+'&UID=1';
  109. } else {
  110. closeAuxWindows();
  111. window.location = '/login.php?UID=1';
  112. };
  113. };
  114. function stopStatusUpdater(){
  115. if( tlInterval!= null ){
  116. window.clearInterval( tlInterval );
  117. tlInterval = null;
  118. };
  119. };
  120. function failureAJAXFunction( responce, opts ){
  121. if( tlInterval!= null ){
  122. window.clearInterval( tlInterval );
  123. tlInterval = null;
  124. };
  125. doLogout();
  126. };
  127. function updateUserScreenResolution( x, y ){
  128. Ext.Ajax.request({
  129. url: '/lib/controller/updateUserSettings.php',
  130. params: {
  131. UID: <?=$UserID;?>,
  132. SID: '<?=$Session;?>',
  133. SSS: 15,
  134. WID: x,
  135. HEI: y
  136. },
  137. success: function( response, opts ){
  138. doRefresh();
  139. },
  140. failure: failureAJAXFunction
  141. });
  142. };
  143. function setUserContent( c_id ){
  144. initView = c_id;
  145. Ext.Ajax.request({
  146. url: '/lib/controller/updateUserSettings.php',
  147. params: {
  148. UID: <?=$UserID;?>,
  149. SID: '<?=$Session;?>',
  150. SSS: 26,
  151. CID: initView
  152. },
  153. success: function(){
  154. content_lvl0 = Math.floor( initView / 1000 );
  155. content_lvl1 = Math.floor( ( initView % 1000 )/ 100 );
  156. content_lvl2 = Math.floor( ( initView % 100 )/ 10 );
  157. content_lvl3 = initView % 10;
  158. },
  159. failure: failureAJAXFunction
  160. });
  161. };
  162. function updateUserContent(){
  163. cid = content_lvl3 + content_lvl2 * 10 + content_lvl1*100 + content_lvl0*1000;
  164. if( initView != cid ) {
  165. setUserContent( cid );
  166. return true;
  167. };
  168. return false;
  169. };
  170. var gSessionValidatorInterval = null;
  171. function sessionValidator(){
  172. var cTS = (new Date())/1000;
  173. Ext.Ajax.request({
  174. url: '/lib/controller/validateUserSession.php',
  175. params: {
  176. UID: <?=$UserID;?>,
  177. SID: '<?=$Session;?>',
  178. CTS: cTS
  179. },
  180. success: function( response, opts ){
  181. var data = Ext.decode(response.responseText);
  182. if( !data.sessionIsValid ){
  183. playSound();
  184. Ext.Msg.show({
  185. title:'<?=$Labels->GetLabel('_REQ_FAILURE_');?>',
  186. msg: '<?=$Labels->GetLabel('_AJX_REQFAILURE_');?>',
  187. buttons: Ext.Msg.OK,
  188. icon: Ext.MessageBox.INFO,
  189. fn: doLogout
  190. });
  191. };
  192. },
  193. failure: failureAJAXFunction
  194. });
  195. };
  196. var NotificationStack = null;
  197. function tryKeepScreenAlive(minutes) {
  198. navigator.wakeLock.request("screen").then(lock => {
  199. setTimeout(() => lock.release(), minutes * 60 * 1000);
  200. });
  201. }
  202. function showContent( cid ){
  203. var lvl0 = Math.floor( cid / 1000 );
  204. var lvl1 = Math.floor( ( cid % 1000 )/ 100 );
  205. var lvl2 = Math.floor( ( cid % 100 )/ 10 );
  206. var lvl3 = cid % 10;
  207. var refresh = ( lvl0 != content_lvl0 );
  208. if( lvl3 != content_lvl3 ){ content_lvl3 = lvl3; };
  209. if( lvl2 != content_lvl2 ){ content_lvl2 = lvl2; };
  210. if( lvl1 != content_lvl1 ){ content_lvl1 = lvl1; };
  211. if( lvl0 != content_lvl0 ){ content_lvl0 = lvl0; };
  212. updateUserContent();
  213. if( refresh ){
  214. switch( content_lvl0 ){
  215. case 0:{
  216. var tt = Ext.getCmp('tbtn_0');
  217. tt.toggle( true, true );
  218. tt = Ext.getCmp('tbtn_1');
  219. tt.toggle( false, true );
  220. tt = Ext.getCmp('tbtn_2');
  221. tt.toggle( false, true );
  222. var tP = Ext.getCmp('left_side_menu');
  223. tP.setVisible( false );
  224. var tZ = Ext.getCmp('right_side_menu');
  225. tZ.setVisible( false );
  226. initMonitoring();
  227. Ext.getCmp('main_viewport').doLayout();
  228. break;
  229. };
  230. case 1:{
  231. var tt = Ext.getCmp('tbtn_0');
  232. tt.toggle( false, true );
  233. tt = Ext.getCmp('tbtn_1');
  234. tt.toggle( true, true );
  235. tt = Ext.getCmp('tbtn_2');
  236. tt.toggle( false, true );
  237. var tP = Ext.getCmp('left_side_menu');
  238. tP.setVisible( true );
  239. var tZ = Ext.getCmp('right_side_menu');
  240. tZ.setVisible( false );
  241. initReportsView();
  242. Ext.getCmp('main_viewport').doLayout();
  243. break;
  244. };
  245. case 2:{
  246. var tt = Ext.getCmp('tbtn_0');
  247. tt.toggle( false, true );
  248. tt = Ext.getCmp('tbtn_1');
  249. tt.toggle( false, true );
  250. tt = Ext.getCmp('tbtn_2');
  251. tt.toggle( true, true );
  252. var tP = Ext.getCmp('left_side_menu');
  253. tP.setVisible( true );
  254. var tZ = Ext.getCmp('right_side_menu');
  255. tZ.setVisible( false );
  256. initSettingsView();
  257. Ext.getCmp('main_viewport').doLayout();
  258. break;
  259. };
  260. };
  261. };
  262. };
  263. Ext.onReady(function(){
  264. document.body.style.userSelect = 'none';
  265. document.body.style.webkitUserSelect = 'none';
  266. document.addEventListener('selectstart', (e) => {
  267. e.preventDefault();
  268. });
  269. document.addEventListener('dragstart', (e) => {
  270. e.preventDefault();
  271. });
  272. if ('wakeLock' in navigator) {
  273. // Screen Wake Lock API supported
  274. tryKeepScreenAlive(10);
  275. };
  276. doCheckWindowSize();
  277. //initMultiWindows();
  278. loadSystemDevices();
  279. gSessionValidatorInterval = window.setInterval( sessionValidator, 10000 );
  280. NotificationStack = new PNotify.Stack({dir1: 'down', firstpos1: 25});
  281. window.onresize = doCheckWindowSize;
  282. Ext.QuickTips.init();
  283. if( ssEnabled ){
  284. ssSetupTimer();
  285. $(window).focus(function() {
  286. ssResetTimer();
  287. });
  288. $(window).blur(function() {
  289. ssStopTimer();
  290. });
  291. };
  292. if( mWindowID == 0 ){
  293. var viewport = new Ext.Viewport({
  294. id: 'main_viewport',
  295. layout:'border',
  296. frame: false,
  297. border: false,
  298. items: [{
  299. xtype: 'panel',
  300. region: 'north',
  301. baseCls: 'x-plain',
  302. height: 60,
  303. //layout: 'fit',
  304. layout: 'hbox',
  305. frame: false,
  306. border: false,
  307. items:[{
  308. xtype: 'panel',
  309. width: '100%',
  310. layout: 'table',
  311. baseCls: 'x-plain',
  312. layoutConfig: {
  313. columns: 13
  314. },
  315. frame: false,
  316. border: true,
  317. margins: {top:10, right:10, bottom:10, left:10},
  318. items:[{
  319. xtype: 'panel',
  320. baseCls: 'x-plain',
  321. frame: false,
  322. border: false,
  323. margins: {top:5, right:20, bottom:0, left:20},
  324. html: '<img src="/style/assets/argus_logo_text.png" height="42px">'
  325. },{
  326. xtype: 'spacer',
  327. width: 10
  328. },{
  329. xtype: 'button',
  330. text: '<?=$Labels->GetLabel('_MONITORING_');?>',
  331. id: 'tbtn_0',
  332. iconCls: 'mon',
  333. scale: 'large',
  334. enableToggle: true,
  335. //pressed: (Math.floor(initView/100)==0),
  336. allowDepress: false,
  337. toggleGroup: 'gopa_gopa',
  338. toggleHandler: function( bt, state ){
  339. if( state ) showContent( 0 );
  340. }
  341. },{
  342. xtype: 'spacer',
  343. width: 10
  344. },{
  345. xtype: 'button',
  346. text: '<?=$Labels->GetLabel('_REPO_HISTORY_');?>',
  347. id: 'tbtn_1',
  348. iconCls: 'rep',
  349. scale: 'large',
  350. enableToggle: true,
  351. //pressed: (Math.floor(initView/100)==1),
  352. allowDepress: false,
  353. toggleGroup: 'gopa_gopa',
  354. toggleHandler: function( bt, state ){
  355. if( state ) showContent( 1000 );
  356. }
  357. },{
  358. xtype: 'spacer',
  359. width: 10
  360. },{
  361. xtype: 'button',
  362. text: '<?=$Labels->GetLabel('_SETTINGS_');?>',
  363. id: 'tbtn_2',
  364. iconCls: 'cog',
  365. scale: 'large',
  366. enableToggle: true,
  367. allowDepress: false,
  368. toggleGroup: 'gopa_gopa',
  369. toggleHandler: function( bt, state ){
  370. if( state ) showContent( 2000 );
  371. }
  372. },{
  373. xtype: 'spacer',
  374. width: 10
  375. },{
  376. xtype: 'panel',
  377. baseCls: 'x-plain',
  378. frame: false,
  379. border: false,
  380. margins: {top:5, right:0, bottom:0, left:0},
  381. width: PanelW - <?=($AP_DATA['type'] == 1)?'700':'800';?><?=(intval($CUser->Data['language']) == 4)?'-90':'';?>,
  382. html: '<p style="text-align: center;font-family: \'Ubuntu\', \'Arial\';font-size: 24px;">'+ap_title+'</p>'
  383. },{
  384. xtype: 'spacer',
  385. width: 10
  386. },<?php
  387. if( $AP_DATA['type'] == 1 ){
  388. ?>{
  389. xtype: 'button',
  390. id: 'logout_btn',
  391. text: 'Logout',
  392. iconCls: 'lout',
  393. scale: 'large',
  394. style:'text-align: right;',
  395. handler: doLogout
  396. }<?php
  397. } else {
  398. ?>{
  399. xtype: 'button',
  400. id: 'snd_mode_btn',
  401. text: '<?=$Labels->GetLabel('_SOUND_');?>',
  402. iconCls: 'snd'+SoundMode,
  403. scale: 'large',
  404. style:'text-align: right;',
  405. handler: function(){
  406. if( SoundMode == 0 ){
  407. SoundMode = 3;
  408. SoundEnable = true;
  409. } else {
  410. SoundMode --;
  411. if( SoundMode == 0 ) SoundEnable = false;
  412. };
  413. Ext.getCmp('snd_mode_btn').setIconClass( 'snd'+SoundMode );
  414. playSound();
  415. doApplicationOperation( 6, SoundMode );
  416. }
  417. },{
  418. xtype: 'spacer',
  419. width: 10
  420. },{
  421. xtype: 'button',
  422. id: 'logout_btn',
  423. text: '<?=$Labels->GetLabel('_LOGOUT_');?>',
  424. iconCls: 'lout',
  425. scale: 'large',
  426. style:'text-align: right;',
  427. handler: doLogout
  428. }<?php
  429. };
  430. ?>
  431. ]
  432. }]
  433. },{
  434. xtype: 'panel',
  435. id:'left_side_menu',
  436. region:'west',
  437. bsaseCls:'x-plain',
  438. layout: 'fit',
  439. collapsible: true,
  440. split: true,
  441. width: 180,
  442. minWidth: 180,
  443. maxWidth: 180,
  444. hidden: (Math.floor(initView/100)==0),
  445. margins: '5 0 5 5',
  446. cmargins:'5 5 5 5',
  447. items: []
  448. },{
  449. xtype: 'panel',
  450. region:'center',
  451. margins: '5 5 5 0',
  452. id: 'main_content',
  453. //title: '<?=$Labels->GetLabel('_SYS_DASHBOARD_');?>',
  454. items:[{
  455. xtype: 'portal',
  456. id: 'main_portal',
  457. frame: false,
  458. border: false,
  459. items:{
  460. html: ''
  461. }//,
  462. //listeners:{
  463. // drop: function( a ){
  464. // updateDashBoardItemLayout( a.panel.id, a.columnIndex, a.position );
  465. // }
  466. //}
  467. }]
  468. },{
  469. xtype: 'panel',
  470. region:'east',
  471. id:'right_side_menu',
  472. //title: '',
  473. margins: '5 5 5 0',
  474. //id: 'help_content',
  475. frame: false,
  476. border: false,
  477. collapsible: false,
  478. split:true,
  479. width:200,
  480. minWidth: 150,
  481. maxWidth: 200,
  482. items:[]
  483. }]
  484. });
  485. } else {
  486. var viewport = new Ext.Viewport({
  487. id: 'main_viewport',
  488. layout:'border',
  489. frame: false,
  490. border: false,
  491. items: [{
  492. xtype: 'panel',
  493. region: 'north',
  494. baseCls: 'x-plain',
  495. height: 60,
  496. //layout: 'fit',
  497. layout: 'hbox',
  498. frame: false,
  499. border: false,
  500. items:[{
  501. xtype: 'panel',
  502. width: '100%',
  503. layout: 'table',
  504. baseCls: 'x-plain',
  505. layoutConfig: {
  506. columns: 10
  507. },
  508. frame: false,
  509. border: true,
  510. margins: {top:10, right:10, bottom:10, left:10},
  511. items:[{
  512. xtype: 'panel',
  513. baseCls: 'x-plain',
  514. frame: false,
  515. border: false,
  516. margins: {top:5, right:20, bottom:0, left:20},
  517. html: '<img src="/style/assets/argus_logo_text.png" height="42px">'
  518. },{
  519. xtype: 'spacer',
  520. width: 10
  521. },{
  522. xtype: 'button',
  523. text: '<?=$Labels->GetLabel('_MONITORING_');?>',
  524. id: 'tbtn_0',
  525. iconCls: 'mon',
  526. scale: 'large',
  527. menu:{
  528. xtype: 'menu',
  529. activeItem: 0,
  530. items: [{
  531. text: '<?=$Labels->GetLabel('_MONITORING_');?>[0]'//,
  532. //iconCls: 'mon',
  533. //scale: 'large'
  534. },{
  535. text: '<?=$Labels->GetLabel('_MONITORING_');?>[1]'//,
  536. //iconCls: 'mon',
  537. //scale: 'large'
  538. }]
  539. },
  540. enableToggle: true,
  541. //pressed: (Math.floor(initView/100)==0),
  542. allowDepress: false,
  543. toggleGroup: 'gopa_gopa',
  544. toggleHandler: function( bt, state ){
  545. if( state ) showContent( 0 );
  546. }
  547. },{
  548. xtype: 'spacer',
  549. width: 10
  550. },{
  551. xtype: 'button',
  552. text: '<?=$Labels->GetLabel('_REPO_HISTORY_');?>',
  553. id: 'tbtn_1',
  554. iconCls: 'rep',
  555. scale: 'large',
  556. enableToggle: true,
  557. //pressed: (Math.floor(initView/100)==1),
  558. allowDepress: false,
  559. toggleGroup: 'gopa_gopa',
  560. toggleHandler: function( bt, state ){
  561. if( state ) showContent( 1000 );
  562. }
  563. },{
  564. xtype: 'spacer',
  565. width: 10
  566. },{
  567. xtype: 'button',
  568. text: '<?=$Labels->GetLabel('_SETTINGS_');?>',
  569. id: 'tbtn_2',
  570. iconCls: 'cog',
  571. scale: 'large',
  572. enableToggle: true,
  573. allowDepress: false,
  574. toggleGroup: 'gopa_gopa',
  575. toggleHandler: function( bt, state ){
  576. if( state ) showContent( 2000 );
  577. }
  578. },{
  579. xtype: 'spacer',
  580. width: 10
  581. },{
  582. xtype: 'panel',
  583. baseCls: 'x-plain',
  584. frame: false,
  585. border: false,
  586. margins: {top:5, right:0, bottom:0, left:0},
  587. width: PanelW - <?=($AP_DATA['type'] == 1)?'700':'800';?><?=(intval($CUser->Data['language']) == 4)?'-90':'';?>,
  588. html: '<p style="text-align: center;font-family: \'Ubuntu\', \'Arial\';font-size: 24px;">'+ap_title+'</p>'
  589. },{
  590. xtype: 'spacer',
  591. width: 10
  592. }]
  593. }]
  594. },{
  595. xtype: 'panel',
  596. id:'left_side_menu',
  597. region:'west',
  598. bsaseCls:'x-plain',
  599. layout: 'fit',
  600. collapsible: true,
  601. split: true,
  602. width: 180,
  603. minWidth: 180,
  604. maxWidth: 180,
  605. hidden: (Math.floor(initView/100)==0),
  606. margins: '5 0 5 5',
  607. cmargins:'5 5 5 5',
  608. items: []
  609. },{
  610. xtype: 'panel',
  611. region:'center',
  612. margins: '5 5 5 0',
  613. id: 'main_content',
  614. //title: '<?=$Labels->GetLabel('_SYS_DASHBOARD_');?>',
  615. items:[{
  616. xtype: 'portal',
  617. id: 'main_portal',
  618. frame: false,
  619. border: false,
  620. items:{
  621. html: ''
  622. }//,
  623. //listeners:{
  624. // drop: function( a ){
  625. // updateDashBoardItemLayout( a.panel.id, a.columnIndex, a.position );
  626. // }
  627. //}
  628. }]
  629. },{
  630. xtype: 'panel',
  631. region:'east',
  632. id:'right_side_menu',
  633. //title: '',
  634. margins: '5 5 5 0',
  635. //id: 'help_content',
  636. frame: false,
  637. border: false,
  638. collapsible: false,
  639. split:true,
  640. width:200,
  641. minWidth: 150,
  642. maxWidth: 200,
  643. items:[]
  644. }]
  645. });
  646. };
  647. if( initView[mWindowID]!= undefined ){
  648. showContent( initView[mWindowID] );
  649. } else {
  650. initView[mWindowID] = 0;
  651. showContent( initView[mWindowID] );
  652. };
  653. });