fix monitor pop button on stream window and on event execution
parent
e5579186c8
commit
695ad03b2b
|
|
@ -154,7 +154,7 @@ $.ccio.tm=function(x,d,z,user){
|
|||
"class": "default",
|
||||
"icon": "external-link"
|
||||
},
|
||||
"Pop": {
|
||||
"Zoom In": {
|
||||
"label": lang['Zoom In'],
|
||||
"attr": "monitor=\"zoomStreamWithMouse\"",
|
||||
"class": "default",
|
||||
|
|
|
|||
|
|
@ -409,25 +409,7 @@ $(document).ready(function(e){
|
|||
}
|
||||
break;
|
||||
case'pop':
|
||||
e.fin=function(img){
|
||||
if($.ccio.mon[e.ke+e.mid+user.auth_token].popOut){
|
||||
$.ccio.mon[e.ke+e.mid+user.auth_token].popOut.close()
|
||||
}
|
||||
$.ccio.mon[e.ke+e.mid+user.auth_token].popOut = window.open(getApiPrefix() + '/embed/'+e.ke+'/'+e.mid+'/fullscreen|jquery|relative|gui','pop_'+e.mid+user.auth_token,'height='+img.height+',width='+img.width);
|
||||
}
|
||||
if(e.mon.watch===1){
|
||||
$.ccio.snapshot(e,function(url){
|
||||
$('#temp').html('<img>')
|
||||
var img=$('#temp img')[0]
|
||||
img.onload=function(){
|
||||
e.fin(img)
|
||||
}
|
||||
img.src=url
|
||||
})
|
||||
}else{
|
||||
var img={height:720,width:1280}
|
||||
e.fin(img)
|
||||
}
|
||||
popOutMonitor(e.mid)
|
||||
break;
|
||||
case'mode':
|
||||
e.mode=e.e.attr('mode')
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
var popOutMonitor = function(monitorId){
|
||||
var monitor = $.ccio.mon[$user.ke + monitorId + $user.auth_token]
|
||||
var finish = function(img){
|
||||
if(monitor.popOut){
|
||||
monitor.popOut.close()
|
||||
}
|
||||
monitor.popOut = window.open(getApiPrefix() + '/embed/' + $user.ke + '/' + monitorId + '/fullscreen|jquery|relative|gui','pop_' + monitorId + $user.auth_token,'height='+img.height+',width='+img.width);
|
||||
}
|
||||
if(monitor.watch === 1){
|
||||
$.ccio.snapshot(monitor,function(url){
|
||||
$('#temp').html('<img>')
|
||||
var img=$('#temp img')[0]
|
||||
img.onload=function(){
|
||||
finish(img)
|
||||
}
|
||||
img.src=url
|
||||
})
|
||||
}else{
|
||||
var img={
|
||||
height: 720,
|
||||
width: 1280
|
||||
}
|
||||
finish(img)
|
||||
}
|
||||
}
|
||||
|
|
@ -91,7 +91,7 @@ $.ccio.globalWebsocket=function(d,user){
|
|||
}
|
||||
}
|
||||
if(user.details.event_mon_pop === '1' && (!$.ccio.mon[d.ke+d.id+user.auth_token].popOut || $.ccio.mon[d.ke+d.id+user.auth_token].popOut.closed === true)){
|
||||
d.e.find('[monitor="pop"]').click()
|
||||
popOutMonitor(d.id)
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -183,6 +183,7 @@
|
|||
<script src="<%-window.libURL%>libs/js/basic.js"></script>
|
||||
<script><% include ../libs/js/dash2.config.js %></script>
|
||||
<script src="<%-window.libURL%>libs/js/dash2.basic.js"></script>
|
||||
<script src="<%-window.libURL%>libs/js/dash2.monitorUtils.js"></script>
|
||||
<script src="<%-window.libURL%>libs/js/dash2.confirm.js"></script>
|
||||
<script src="<%-window.libURL%>libs/js/dash2.socketio.js"></script>
|
||||
<script src="<%-window.libURL%>libs/js/material.min.js"></script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue