Browse Source

Rocopomps

master
Evgeny Gagua 3 years ago
parent
commit
5c372468d8
  1. 14
      lib/controller/dash/node_1.js
  2. 15
      lib/controller/dash/node_3.js
  3. 3
      lib/controller/doApplicationOperation.php
  4. 8
      lib/controller/getDashBoardItems.php
  5. 6
      lib/controller/getHistoryEvents.php
  6. 4
      lib/controller/getReportLayout.php
  7. 15
      lib/controller/report/node_1.js
  8. 17
      lib/controller/report/node_3.js
  9. 2
      lib/javascript/jsapi_dynamic/mojo_reports.js
  10. 8
      lib/javascript/jsapi_dynamic/mojo_settings.js

14
lib/controller/dash/node_1.js

@ -23,12 +23,16 @@
//var expH = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
var W = p.getWidth();
//var H=9*(W/16) - 28;
var H = PanelH - p.ownerCt.getHeight() + 64;
//var H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
if( H > ( W * 0.5625 )+ 32 ){
H = ( W * 0.5625 ) + 32;
var H = 9*(W/16) - 28;
if( %%%APPTYPE%%% == 2 ){
H = PanelH - p.ownerCt.getHeight() + 64;
if( H > ( W * 0.5625 )+ 32 ){
H = ( W * 0.5625 ) + 32;
};
} else {
H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
};
//alert( H );
//var W = 16*(H/9);
//p.ownerCt.setWidth( W );

15
lib/controller/dash/node_3.js

@ -23,13 +23,14 @@
//var expH = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
var W = p.getWidth();
//var H=9*(W/16) - 28;
//var H = PanelH - p.ownerCt.ownerCt.getHeight() + 64;
//var H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
var H = PanelH - p.ownerCt.getHeight() + 64;
//var H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
if( H > ( W * 0.5625 )+ 32 ){
H = ( W * 0.5625 ) + 32;
var H = 9*(W/16) - 28;
if( %%%APPTYPE%%% == 2 ){
H = PanelH - p.ownerCt.getHeight() + 64;
if( H > ( W * 0.5625 )+ 32 ){
H = ( W * 0.5625 ) + 32;
};
} else {
H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
};
//var W = 16*(H/9);
//p.ownerCt.setWidth( W );

3
lib/controller/doApplicationOperation.php

@ -34,6 +34,9 @@
$Data['q'] = $QS;
$Data['success'] = true;
};
case 4:{// Set Report autodelete
};
};
} else {
$Data['msg']='Wrong Parameters!';

8
lib/controller/getDashBoardItems.php

@ -156,6 +156,7 @@ _DATA_BOUNDARY;
$TPL = str_replace('%%%NODENAME%%%', ''. urldecode( $DD['name'] ), $TPL );
$TPL = str_replace('%%%USERID%%%', $UserID, $TPL );
$TPL = str_replace('%%%SESSION%%%', $Session, $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$OUT[]= $STA[$idx] . $TPL . $END;
} else break;
$idx++;
@ -184,6 +185,7 @@ _DATA_BOUNDARY;
$TPL = str_replace('%%%NODENAME%%%', ''.urldecode( $DD['name'] ) , $TPL );
$TPL = str_replace('%%%USERID%%%', $UserID, $TPL );
$TPL = str_replace('%%%SESSION%%%', $Session, $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$QS="SELECT * FROM `nodes` WHERE `id`={$DD['id']}";
$Z=$DATABASE->Query( $QS );
$QS="SELECT * FROM `module_eve` WHERE `id`=1";
@ -270,6 +272,7 @@ _DATA_BOUNDARY;
$TPL = str_replace('%%%NODENAME%%%', ''.html_entity_decode( $DD['name'] ) , $TPL );
$TPL = str_replace('%%%USERID%%%', $UserID, $TPL );
$TPL = str_replace('%%%SESSION%%%', $Session, $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$OUT[]= $STA[$idx] . $TPL . $END;
} else break;
$idx++;
@ -298,6 +301,7 @@ _DATA_BOUNDARY;
$TPL = str_replace('%%%NODENAME%%%', ''.urldecode($DD['name']) , $TPL );
$TPL = str_replace('%%%USERID%%%', $UserID, $TPL );
$TPL = str_replace('%%%SESSION%%%', $Session, $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$QS="SELECT * FROM `nodes` WHERE `id`={$DD['id']}";
$Z=$DATABASE->Query( $QS );
$QS="SELECT * FROM `module_eve` WHERE `id`=1";
@ -385,6 +389,7 @@ _DATA_BOUNDARY;
$TPL = str_replace('%%%NODENAME%%%', ''.html_entity_decode( $DD['name'] ) , $TPL );
$TPL = str_replace('%%%USERID%%%', $UserID, $TPL );
$TPL = str_replace('%%%SESSION%%%', $Session, $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$OUT[]= $STA[$idx] . $TPL . $END;
} else break;
$idx++;
@ -413,6 +418,7 @@ _DATA_BOUNDARY;
$TPL = str_replace('%%%NODENAME%%%', ''.urldecode($DD['name']) , $TPL );
$TPL = str_replace('%%%USERID%%%', $UserID, $TPL );
$TPL = str_replace('%%%SESSION%%%', $Session, $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$QS="SELECT * FROM `nodes` WHERE `id`={$DD['id']}";
$Z=$DATABASE->Query( $QS );
$QS="SELECT * FROM `module_eve` WHERE `id`=1";
@ -492,6 +498,7 @@ _DATA_BOUNDARY;
$TPL = str_replace('%%%NODENAME%%%', ''.urldecode($DD['name']) , $TPL );
$TPL = str_replace('%%%USERID%%%', $UserID, $TPL );
$TPL = str_replace('%%%SESSION%%%', $Session, $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$QS="SELECT * FROM `nodes` WHERE `id`={$DD['id']}";
$Z=$DATABASE->Query( $QS );
$QS="SELECT * FROM `module_eve` WHERE `id`=1";
@ -553,6 +560,7 @@ _DATA_BOUNDARY;
$TPL = str_replace('%%%NODENAME%%%', ''.html_entity_decode( $DD['name'] ) , $TPL );
$TPL = str_replace('%%%USERID%%%', $UserID, $TPL );
$TPL = str_replace('%%%SESSION%%%', $Session, $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$OUT[]= $STA[2+$idx] . $TPL . $END;
} else break;
$idx++;

6
lib/controller/getHistoryEvents.php

@ -34,10 +34,14 @@
$CR['width'] = intval( $REC['area'] );
$CR['video_id'] = intval( $REC['video_id'] );
if( $REC['lat'] != 0 && $REC['lon'] != 0 ){
$CR['geo'] = true;
$CR['geo'] = true;
if( $SP['local_binding'] != 0 ){
//$CHUCHA = ( M_PI / 180 ) * (floatval( $REC['azimuth'] )-40.9);
//$RUR = sqrt( $REC['lon']* $REC['lon'] + $REC['lat']*$REC['lat']);
$CR['lon'] = floatval( $SP['anchor_lon'] ) + floatval( $REC['lon'] );
//$CR['lon'] = floatval( $SP['anchor_lon'] ) + cos( $CHUCHA ) * $RUR;
$CR['lat'] = floatval( $SP['anchor_lat'] ) + floatval( $REC['lat'] );
//$CR['lat'] = floatval( $SP['anchor_lat'] ) + sin( $CHUCHA ) * $RUR;
} else {
$CR['lon'] = floatval( $REC['lon'] );
$CR['lat'] = floatval( $REC['lat'] );

4
lib/controller/getReportLayout.php

@ -143,6 +143,7 @@ _DATA_BOUNDARY;
$TPL = file_get_contents( $TFN );
$TPL = str_replace('%%%NODEID%%%', ''.$DD['id'] , $TPL );
$TPL = str_replace('%%%NODENAME%%%', ''.html_entity_decode( $DD['name'] ) , $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$OUT[]= $STA[$idx] . $TPL . $END;
} else break;
$idx++;
@ -168,6 +169,7 @@ _DATA_BOUNDARY;
$TPL = file_get_contents( $TFN );
$TPL = str_replace('%%%NODEID%%%', ''.$DD['id'] , $TPL );
$TPL = str_replace('%%%NODENAME%%%', ''.urldecode($DD['name']) , $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$QS="SELECT * FROM `nodes` WHERE `id`={$DD['id']}";
$Z=$DATABASE->Query( $QS );
$QS="SELECT * FROM `module_eve` WHERE `id`=1";
@ -222,6 +224,7 @@ _DATA_BOUNDARY;
$TPL = file_get_contents( $TFN );
$TPL = str_replace('%%%NODEID%%%', ''.$DD['id'] , $TPL );
$TPL = str_replace('%%%NODENAME%%%', ''.urldecode($DD['name']) , $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$QS="SELECT * FROM `nodes` WHERE `id`={$DD['id']}";
$Z=$DATABASE->Query( $QS );
$QS="SELECT * FROM `module_eve` WHERE `id`=1";
@ -269,6 +272,7 @@ _DATA_BOUNDARY;
$TPL = file_get_contents( $TFN );
$TPL = str_replace('%%%NODEID%%%', ''.$DD['id'] , $TPL );
$TPL = str_replace('%%%NODENAME%%%', ''.html_entity_decode( $DD['name'] ) , $TPL );
$TPL = str_replace('%%%APPTYPE%%%', $SP['type'], $TPL );
$OUT[]= $STA[2+$idx] . $TPL . $END;
} else break;
$idx++;

15
lib/controller/report/node_1.js

@ -20,9 +20,20 @@
masks_exist[%%%NODEID%%%] = 0;
var W = p.getWidth();
//var H=9*(W/16) - 28;
//var H = PanelH - p.ownerCt.ownerCt.getHeight() + 64;
var H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
var H = 9*(W/16) - 28;
if( %%%APPTYPE%%% == 2 ){
H = PanelH - p.ownerCt.getHeight() + 64;
if( H > ( W * 0.5625 )+ 32 ){
H = ( W * 0.5625 ) + 32;
};
} else {
H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
if( H > W+60 ){
H = W+60;
};
};
//var H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
//var W = 16*(H/9);
//p.ownerCt.setWidth( W );
p.setHeight( H );

17
lib/controller/report/node_3.js

@ -20,14 +20,15 @@
masks_exist[%%%NODEID%%%] = 0;
var W = p.getWidth();
//var H=9*(W/16) - 28;
//var H = PanelH - p.ownerCt.ownerCt.getHeight() + 64;
//var H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
var H = PanelH - p.ownerCt.getHeight() + 64;
//var H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
if( H > W + 32 ){
H = W + 32;
};
var H = 9*(W/16) - 28;
if( %%%APPTYPE%%% == 2 ){
H = PanelH - p.ownerCt.getHeight() + 64;
if( H > W + 60 ){
H = W + 60;
};
} else {
H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
};
//var W = 16*(H/9);
//p.ownerCt.setWidth( W );
p.setHeight( H );

2
lib/javascript/jsapi_dynamic/mojo_reports.js

@ -1609,7 +1609,7 @@ var videoFileDownloadTarget = '';
var videoFileURI = '';
var videoFileFPS = 15;
function setVideoDownloadButton( URI, fps, ts ){
var d = new Date( ts );
var d = new Date( ts*1000 );
videoFileDownloadTarget = d.getFullYear()+'_'+(d.getMonth()+1)+'_'+d.getDate()+'_'+d.getHours()+'-'+d.getMinutes()+'-'+d.getSeconds()+'.mp4';
videoFileURI = URI;
videoFileFPS = fps;

8
lib/javascript/jsapi_dynamic/mojo_settings.js

@ -2674,6 +2674,11 @@ function showSettingsApplication(){
width: 300,
value: <?=intval($AP_DATA['report_cleanup']);?>,
name: 'db_time',
listeners: {
onchange: function( t, b, o){
doApplicationOperation( 4, b );
}
}
},{
xtype: 'spacer',
height: 10
@ -2684,6 +2689,9 @@ function showSettingsApplication(){
value: <?=intval($AP_DATA['preserve_empty']);?>,
width: 300,
name: 'db_space',
onchange: function( t, b, o){
doApplicationOperation( 5, b );
}
},{
xtype: 'spacer',
height: 10

Loading…
Cancel
Save