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.

91 lines
4.9 KiB

6 years ago
​
​
​
​
​
​
6 years ago
​
​
​
​
​
​
​
​
​
​
6 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
6 years ago
​
​
6 years ago
​
​
​
​
​
​
​
​
​
​
​
​
6 years ago
​
​
​
​
​
​
6 years ago
  1. {
  2. id: 'db_node_%%%NODEID%%%',
  3. //xxtype: 'panel',
  4. xtype: 'portlet',
  5. //columnWidth:.33,
  6. //layout: 'fit',
  7. width: 258,
  8. height: %%%HEIGHT%%%+68,
  9. tools: [{
  10. id:'gear',
  11. handler: function(){
  12. Ext.Msg.alert('Message', 'The Settings tool was clicked.');
  13. }
  14. }],
  15. frame: true,
  16. bodyStyle: 'padding: 0px;',
  17. plr: null,
  18. title: '%%%NODENAME%%%',
  19. items:[{
  20. html: '<img onmouseover="ptzCtrl(\'img-%%%NODEID%%%\');" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" id="img-%%%NODEID%%%" src="%%%SELURL%%%" width="%%%WIDTH%%%" height="%%%HEIGHT%%%"/>',
  21. },{
  22. xtype: 'spacer',
  23. height: 5
  24. },{
  25. xtype: 'button',
  26. id: 'ptz_btn_%%%NODEID%%%',
  27. width: '100%',
  28. text: 'PTZ Control',
  29. enableToggle: true,
  30. handler: function(){
  31. var t = Ext.getCmp('db_node_%%%NODEID%%%');
  32. if( Ext.getCmp('ptz_btn_%%%NODEID%%%').pressed ){
  33. t.setSize( 258, %%%HEIGHT%%%+162 );
  34. document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  35. document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  36. document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  37. document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  38. document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  39. document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  40. document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  41. document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  42. document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  43. document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  44. document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  45. document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  46. document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  47. document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  48. document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  49. document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  50. document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  51. document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  52. document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  53. document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  54. document.getElementById('img_btn_020_%%%NODEID%%%').addEventListener( 'mousedown', makePtzStop );
  55. } else {
  56. t.setSize( 258, %%%HEIGHT%%%+68 );
  57. //Ext.Msg.alert('Message', 'The 270 tool was clicked.');
  58. };
  59. t.doLayout();
  60. }
  61. },{
  62. xtype: 'spacer',
  63. height: 3
  64. },{
  65. html: '<table width="100%" border=0><tr><td width="24"><img id="img_btn_010_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/010.png"></td><td width="24"><img id="img_btn_032_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/032.png"></td><td width="24"><img id="img_btn_033_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/033.png"></td><td width="24"><img id="img_btn_034_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/034.png"></td><td>&nbsp;</td></tr><tr><td><img id="img_btn_011_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/011.png"></td><td><img id="img_btn_031_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/031.png"></td><td><img id="img_btn_020_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/basic/020.png"></td><td><img id="img_btn_027_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/027.png"></td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td><img id="img_btn_030_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/030.png"></td><td><img id="img_btn_029_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/029.png"></td><td><img id="img_btn_028_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/028.png"></td><td>&nbsp;</td></tr></table>',
  66. height: 90
  67. }],
  68. listeners:{
  69. afterrender: function( t ){
  70. /*
  71. t.plr = videojs.getPlayer('hls-%%%NODEID%%%');
  72. if( t.plr == null ){
  73. t.plr = videojs('hls-%%%NODEID%%%',{
  74. autoplay: 'muted',
  75. controls: true,
  76. controlBar: {
  77. volumePanel: false,
  78. playToggle: false,
  79. pictureInPictureToggle: false
  80. }
  81. });
  82. };
  83. t.plr.src({type: 'application/x-mpegURL', src: '%%%SELURL%%%'});
  84. */
  85. return true;
  86. },
  87. destroy: function( t ){
  88. if( t.plr != null ) t.plr.dispose();
  89. t.plr = null;
  90. }
  91. }
  92. }