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.

96 lines
5.0 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: 268,
  9. tools: [{
  10. id:'gear',
  11. handler: function(){
  12. Ext.Msg.alert('Message', 'The Settings tool was clicked.');
  13. }
  14. },{
  15. id:'close',
  16. handler: function(e, target, panel){
  17. panel.ownerCt.remove(panel, true);
  18. }
  19. }],
  20. frame: true,
  21. bodyStyle: 'padding: 0px;',
  22. plr: null,
  23. title: '%%%NODENAME%%%',
  24. items:[{
  25. html: '<img onmouseover="ptzCtrl(\'img-%%%NODEID%%%\');" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" id="img-%%%NODEID%%%" src="%%%SELURL%%%" width="244" height="200" />',
  26. },{
  27. xtype: 'spacer',
  28. height: 5
  29. },{
  30. xtype: 'button',
  31. id: 'ptz_btn_%%%NODEID%%%',
  32. width: '100%',
  33. text: 'PTZ Control',
  34. enableToggle: true,
  35. handler: function(){
  36. var t = Ext.getCmp('db_node_%%%NODEID%%%');
  37. if( Ext.getCmp('ptz_btn_%%%NODEID%%%').pressed ){
  38. t.setSize( 258, 362 );
  39. document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  40. document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  41. document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  42. document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  43. document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  44. document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  45. document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  46. document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  47. document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  48. document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  49. document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  50. document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  51. document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  52. document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  53. document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  54. document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  55. document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  56. document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  57. document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop );
  58. document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove );
  59. document.getElementById('img_btn_020_%%%NODEID%%%').addEventListener( 'mousedown', makePtzStop );
  60. } else {
  61. t.setSize( 258, 268 );
  62. //Ext.Msg.alert('Message', 'The 270 tool was clicked.');
  63. };
  64. t.doLayout();
  65. }
  66. },{
  67. xtype: 'spacer',
  68. height: 3
  69. },{
  70. 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>',
  71. height: 90
  72. }],
  73. listeners:{
  74. afterrender: function( t ){
  75. /*
  76. t.plr = videojs.getPlayer('hls-%%%NODEID%%%');
  77. if( t.plr == null ){
  78. t.plr = videojs('hls-%%%NODEID%%%',{
  79. autoplay: 'muted',
  80. controls: true,
  81. controlBar: {
  82. volumePanel: false,
  83. playToggle: false,
  84. pictureInPictureToggle: false
  85. }
  86. });
  87. };
  88. t.plr.src({type: 'application/x-mpegURL', src: '%%%SELURL%%%'});
  89. */
  90. return true;
  91. },
  92. destroy: function( t ){
  93. if( t.plr != null ) t.plr.dispose();
  94. t.plr = null;
  95. }
  96. }
  97. }