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.

698 lines
17 KiB

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