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.

39 lines
1.1 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. {
  2. id: 'db_node_%%%NODEID%%%',
  3. layout:'vbox',
  4. tools: [{
  5. id:'gear',
  6. handler: function(){
  7. }
  8. }],
  9. frame: true,
  10. draggable: false,
  11. collapsible: false,
  12. bodyStyle: 'padding: 0px;',
  13. title: '%%%NODENAME%%%',
  14. sukaMineWidth: -1,
  15. items:[{
  16. id: 'db_node_%%%NODEID%%%_pic',
  17. border: true,
  18. width: '100%',
  19. html: '<div id="img-%%%NODEID%%%" style="display: flex;align-items: center;" ><img id="img-img-%%%NODEID%%%" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" src="%%%SELURL%%%" width="100%" /></div>'
  20. }],
  21. listeners:{
  22. resize: function( p, adjWidth, adjHeight, rawWidth, rawHeight ){
  23. if( rawWidth!= undefined ){
  24. if( p.sukaMineWidth != adjWidth ){
  25. p.sukaMineWidth = adjWidth;
  26. var XX = p.sukaMineWidth * %%%HEIGHT%%% / %%%WIDTH%%%;
  27. p.setHeight( XX + 32 );
  28. var z = Ext.getCmp('db_node_%%%NODEID%%%_pic');
  29. z.setHeight( XX );
  30. };
  31. };
  32. },
  33. afterrender: function( p ){
  34. var xx = p.getWidth() * %%%HEIGHT%%% / %%%WIDTH%%%;
  35. p.setHeight( xx + 32 );
  36. var z = Ext.getCmp('db_node_%%%NODEID%%%_pic');
  37. z.setHeight( xx );
  38. }
  39. }
  40. }