Added display selector on mobile web application.

Ylian Saint-Hilaire committed May 10, 2020 at 17:20 UTC d722b6d7be6e7d8fb327a4462e4bd5d2e16c150b
5 files changed +151 -123
public/scripts/agent-desktop-0.0.2-min.js
+1 -1
@@ -1 +1 @@
1 -var CreateAgentRemoteDesktop=function(e,t){var g={};"string"==typeof(g.CanvasId=e)&&(g.CanvasId=Q(e)),g.Canvas=g.CanvasId.getContext("2d"),g.scrolldiv=t,g.State=0,g.PendingOperations=[],g.tilesReceived=0,g.TilesDrawn=0,g.KillDraw=0,g.ipad=!1,g.tabletKeyboardVisible=!1,g.LastX=0,g.LastY=0,g.touchenabled=0,g.submenuoffset=0,g.touchtimer=null,g.TouchArray={},g.connectmode=0,g.connectioncount=0,g.rotation=0,g.protocol=2,g.debugmode=0,g.firstUpKeys=[],g.stopInput=!1,g.localKeyMap=!0,g.pressedKeys=[],g.sessionid=0,g.username,g.oldie=!1,g.CompressionLevel=50,g.ScalingLevel=1024,g.FrameRateTimer=100,g.FirstDraw=!1,g.ScreenWidth=960,g.ScreenHeight=700,g.width=960,g.height=960,g.onScreenSizeChange=null,g.onMessage=null,g.onConnectCountChanged=null,g.onDebugMessage=null,g.onTouchEnabledChanged=null,g.onDisplayinfo=null,g.accumulator=null;var v=["default","progress","crosshair","pointer","help","text","no-drop","move","nesw-resize","ns-resize","nwse-resize","w-resize","alias","wait","none","not-allowed","col-resize","row-resize","copy","zoom-in","zoom-out"];g.Start=function(){g.State=0,g.accumulator=null},g.Stop=function(){g.setRotation(0),g.UnGrabKeyInput(),g.UnGrabMouseInput(),g.touchenabled=0,null!=g.onScreenSizeChange&&g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight,g.CanvasId),g.Canvas.clearRect(0,0,g.CanvasId.width,g.CanvasId.height)},g.xxStateChange=function(e){if(g.State!=e)switch(g.State=e,g.CanvasId.style.cursor="default",e){case 0:g.Stop()}},g.send=function(e){1<g.debugmode&&console.log("KSend("+e.length+"): "+rstr2hex(e)),null!=g.parent&&g.parent.send(e)},g.ProcessPictureMsg=function(e,t,n){var o=new Image;o.xcount=g.tilesReceived++;var a=g.tilesReceived;o.src="data:image/jpeg;base64,"+btoa(e.substring(4,e.length)),o.onload=function(){if(null!=g.Canvas&&g.KillDraw<a&&0!=g.State)for(g.PendingOperations.push([a,2,o,t,n]);g.DoPendingOperations(););},o.error=function(){console.log("DecodeTileError")}},g.DoPendingOperations=function(){if(0==g.PendingOperations.length)return!1;for(var e=0;e<g.PendingOperations.length;e++){var t=g.PendingOperations[e];if(t[0]==g.TilesDrawn+1)return 1==t[1]?g.ProcessCopyRectMsg(t[2]):2==t[1]&&(g.Canvas.drawImage(t[2],g.rotX(t[3],t[4]),g.rotY(t[3],t[4])),delete t[2]),g.PendingOperations.splice(e,1),delete t,g.TilesDrawn++,g.TilesDrawn==g.tilesReceived&&g.KillDraw<g.TilesDrawn&&(g.KillDraw=g.TilesDrawn=g.tilesReceived=0),!0}return g.oldie&&0<g.PendingOperations.length&&g.TilesDrawn++,!1},g.ProcessCopyRectMsg=function(e){var t=((255&e.charCodeAt(0))<<8)+(255&e.charCodeAt(1)),n=((255&e.charCodeAt(2))<<8)+(255&e.charCodeAt(3)),o=((255&e.charCodeAt(4))<<8)+(255&e.charCodeAt(5)),a=((255&e.charCodeAt(6))<<8)+(255&e.charCodeAt(7)),r=((255&e.charCodeAt(8))<<8)+(255&e.charCodeAt(9)),s=((255&e.charCodeAt(10))<<8)+(255&e.charCodeAt(11));g.Canvas.drawImage(Canvas.canvas,t,n,r,s,o,a,r,s)},g.SendUnPause=function(){g.send(String.fromCharCode(0,8,0,5,0))},g.SendPause=function(){g.send(String.fromCharCode(0,8,0,5,1))},g.SendCompressionLevel=function(e,t,n,o){t&&(g.CompressionLevel=t),n&&(g.ScalingLevel=n),o&&(g.FrameRateTimer=o),g.send(String.fromCharCode(0,5,0,10,e,g.CompressionLevel)+g.shortToStr(g.ScalingLevel)+g.shortToStr(g.FrameRateTimer))},g.SendRefresh=function(){g.send(String.fromCharCode(0,6,0,4))},g.ProcessScreenMsg=function(e,t){for(0<g.debugmode&&console.log("ScreenSize: "+e+" x "+t),g.Canvas.setTransform(1,0,0,1,0,0),g.rotation=0,g.FirstDraw=!0,g.ScreenWidth=g.width=e,g.ScreenHeight=g.height=t,g.KillDraw=g.tilesReceived;0<g.PendingOperations.length;)g.PendingOperations.shift();g.SendCompressionLevel(1),g.SendUnPause(),null!=g.onScreenSizeChange&&g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight,g.CanvasId)},g.ProcessData=function(e){for(var t=0;t<e.length;){var n=g.ProcessDataEx(e.substring(t));if(null==n||0==n)break;t+=n}},g.ProcessDataEx=function(e){if(null!=g.accumulator&&(e=g.accumulator+e,g.accumulator=null),1<g.debugmode&&console.log("KRecv("+e.length+"): "+rstr2hex(e.substring(0,Math.min(e.length,40)))),!(e.length<4)){var t=null,n=0,o=0,a=ReadShort(e,0),r=ReadShort(e,2),s=0;if(null!=g.recordedData&&(g.recordedData.push(p(2,1,e.length)),g.recordedData.push(e)),27==a&&8==r){if(e.length<12)return;if(a=ReadShort(e,8),(r=ReadInt(e,4))+8>e.length)return void(g.accumulator=e);e=e.substring(8),s=8}if(r!=e.length&&0<g.debugmode&&console.log(r,e.length,r==e.length),18<=a&&65!=a&&88!=a)return console.error("Invalid KVM command "+a+" of size "+r),console.log("Invalid KVM data",e.length,rstr2hex(e.substring(0,40))+"..."),void(g.parent&&g.parent.setConsoleMessage&&g.parent.setConsoleMessage("Received invalid network data",5));if(!(r>e.length)){switch(3!=a&&4!=a&&7!=a||(n=((255&(t=e.substring(4,r)).charCodeAt(0))<<8)+(255&t.charCodeAt(1)),o=((255&t.charCodeAt(2))<<8)+(255&t.charCodeAt(3)),0<g.debugmode&&console.log("CMD"+a+" at X="+n+" Y="+o)),a){case 3:g.FirstDraw&&g.onResize(),g.ProcessPictureMsg(t,n,o);break;case 4:g.FirstDraw&&g.onResize(),g.TilesDrawn==g.tilesReceived?g.ProcessCopyRectMsg(t):g.PendingOperations.push([++tilesReceived,1,t]);break;case 7:g.ProcessScreenMsg(n,o),g.SendKeyMsgKC(g.KeyAction.UP,16),g.SendKeyMsgKC(g.KeyAction.UP,17),g.SendKeyMsgKC(g.KeyAction.UP,18),g.SendKeyMsgKC(g.KeyAction.UP,91),g.SendKeyMsgKC(g.KeyAction.UP,92),g.SendKeyMsgKC(g.KeyAction.UP,16),g.send(String.fromCharCode(0,14,0,4));break;case 11:var i=0,c={},u=((255&e.charCodeAt(4))<<8)+(255&e.charCodeAt(5));if(0<u){i=((255&e.charCodeAt(6+2*u))<<8)+(255&e.charCodeAt(7+2*u));for(var l=0;l<u;l++){var d=((255&e.charCodeAt(6+2*l))<<8)+(255&e.charCodeAt(7+2*l));c[d]=65535==d?"All Displays":"Display "+d}}null!=g.onDisplayinfo&&g.onDisplayinfo(g,c,i);break;case 12:break;case 14:g.touchenabled=1,g.TouchArray={},null!=g.onTouchEnabledChanged&&g.onTouchEnabledChanged(g.touchenabled);break;case 15:g.TouchArray={};break;case 16:g.connectioncount=ReadInt(e,4),null!=g.onConnectCountChanged&&g.onConnectCountChanged(g.connectioncount,g);break;case 17:null!=g.onMessage&&g.onMessage(e.substring(4,r),g);break;case 65:"."!=(e=e.substring(4))[0]?(console.log(e),g.parent&&g.parent.setConsoleMessage&&g.parent.setConsoleMessage(e)):console.log("KVM: "+e.substring(1));break;case 88:if(5!=r)break;var h=e.charCodeAt(4);v.length<h&&(h=0),g.CanvasId.style.cursor=v[h]}return r+s}g.accumulator=e}},g.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32},g.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6},g.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15},g.Alternate=0;var o={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};function p(e,t,n){var o=Date.now();return"number"==typeof n?(g.recordedSize+=n,g.shortToStr(e)+g.shortToStr(t)+g.intToStr(n)+g.intToStr(o>>32)+g.intToStr(32&o)):(g.recordedSize+=n.length,g.shortToStr(e)+g.shortToStr(t)+g.intToStr(n.length)+g.intToStr(o>>32)+g.intToStr(32&o)+n)}return g.SendKeyMsg=function(e,t){var n;null!=e&&((t=t||window.event).code&&0==g.localKeyMap?null!=(n=function(e){return e.code.startsWith("Key")&&4==e.code.length?e.code.charCodeAt(3):e.code.startsWith("Digit")&&6==e.code.length?e.code.charCodeAt(5):e.code.startsWith("Numpad")&&7==e.code.length?e.code.charCodeAt(6)+48:o[e.code]}(t))&&g.SendKeyMsgKC(e,n):(59==(n=t.keyCode)?n=186:173==n?n=189:61==n&&(n=187),g.SendKeyMsgKC(e,n)))},g.SendMessage=function(e){3==g.State&&g.send(String.fromCharCode(0,17)+g.shortToStr(4+e.length)+e)},g.SendKeyMsgKC=function(e,t){if(3==g.State)if("object"==typeof e)for(var n in e)g.SendKeyMsgKC(e[n][0],e[n][1]);else{if(1==e)-1==g.pressedKeys.indexOf(t)&&g.pressedKeys.unshift(t);else if(2==e){-1!=(n=g.pressedKeys.indexOf(t))&&g.pressedKeys.splice(n,1)}g.send(String.fromCharCode(0,g.InputType.KEY,0,6,e-1,t))}},g.sendcad=function(){g.SendCtrlAltDelMsg()},g.SendCtrlAltDelMsg=function(){3==g.State&&g.send(String.fromCharCode(0,g.InputType.CTRLALTDEL,0,4))},g.SendEscKey=function(){3==g.State&&g.send(String.fromCharCode(0,g.InputType.KEY,0,6,0,27,0,g.InputType.KEY,0,6,1,27))},g.SendStartMsg=function(){g.SendKeyMsgKC(g.KeyAction.EXDOWN,91),g.SendKeyMsgKC(g.KeyAction.EXUP,91)},g.SendCharmsMsg=function(){g.SendKeyMsgKC(g.KeyAction.EXDOWN,91),g.SendKeyMsgKC(g.KeyAction.DOWN,67),g.SendKeyMsgKC(g.KeyAction.UP,67),g.SendKeyMsgKC(g.KeyAction.EXUP,91)},g.SendTouchMsg1=function(e,t,n,o){3==g.State&&g.send(String.fromCharCode(0,g.InputType.TOUCH)+g.shortToStr(14)+String.fromCharCode(1,e)+g.intToStr(t)+g.shortToStr(n)+g.shortToStr(o))},g.SendTouchMsg2=function(e,t){var n,o="";for(var a in g.TouchArray)a==e?n=t:1==g.TouchArray[a].f?(n=65542,g.TouchArray[a].f=3,"START"+a):2==g.TouchArray[a].f?(n=262144,"STOP"+a):n=131078,o+=String.fromCharCode(a)+g.intToStr(n)+g.shortToStr(g.TouchArray[a].x)+g.shortToStr(g.TouchArray[a].y),2==g.TouchArray[a].f&&delete g.TouchArray[a];3==g.State&&g.send(String.fromCharCode(0,g.InputType.TOUCH)+g.shortToStr(5+o.length)+String.fromCharCode(2)+o),0==Object.keys(g.TouchArray).length&&null!=g.touchtimer&&(clearInterval(g.touchtimer),g.touchtimer=null)},g.SendMouseMsg=function(e,t){if(3==g.State&&null!=e&&null!=g.Canvas){if(!t)t=window.event;var n=g.Canvas.canvas.height/g.CanvasId.clientHeight,o=g.Canvas.canvas.width/g.CanvasId.clientWidth,a=g.GetPositionOfControl(g.Canvas.canvas),r=(t.pageX-a[0])*o,s=(t.pageY-a[1])*n;if(t.addx&&(r+=t.addx),t.addy&&(s+=t.addy),0<=r&&r<=g.Canvas.canvas.width&&0<=s&&s<=g.Canvas.canvas.height){var i=0,c=0;e==g.KeyAction.UP||e==g.KeyAction.DOWN?t.which?i=1==t.which?g.MouseButton.LEFT:2==t.which?g.MouseButton.MIDDLE:g.MouseButton.RIGHT:t.button&&(i=0==t.button?g.MouseButton.LEFT:1==t.button?g.MouseButton.MIDDLE:g.MouseButton.RIGHT):e==g.KeyAction.SCROLL&&(t.detail?c=120*t.detail*-1:t.wheelDelta&&(c=3*t.wheelDelta));var u="";u=e==g.KeyAction.DBLCLICK?String.fromCharCode(0,g.InputType.MOUSE,0,10,0,136,r/256&255,255&r,s/256&255,255&s):e==g.KeyAction.SCROLL?String.fromCharCode(0,g.InputType.MOUSE,0,12,0,0,r/256&255,255&r,s/256&255,255&s,c/256&255,255&c):String.fromCharCode(0,g.InputType.MOUSE,0,10,0,e==g.KeyAction.DOWN?i:2*i&255,r/256&255,255&r,s/256&255,255&s),g.Action==g.KeyAction.NONE?0==g.Alternate||g.ipad?(g.send(u),g.Alternate=1):g.Alternate=0:g.send(u)}}},g.GetDisplayNumbers=function(){g.send(String.fromCharCode(0,11,0,4))},g.SetDisplay=function(e){g.send(String.fromCharCode(0,12,0,6,e>>8,255&e))},g.intToStr=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},g.shortToStr=function(e){return String.fromCharCode(e>>8&255,255&e)},g.onResize=function(){0!=g.ScreenWidth&&0!=g.ScreenHeight&&(g.Canvas.canvas.width==g.ScreenWidth&&g.Canvas.canvas.height==g.ScreenHeight||(g.FirstDraw&&(g.Canvas.canvas.width=g.ScreenWidth,g.Canvas.canvas.height=g.ScreenHeight,g.Canvas.fillRect(0,0,g.ScreenWidth,g.ScreenHeight),null!=g.onScreenSizeChange&&g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight,g.CanvasId)),g.FirstDraw=!1))},g.xxMouseInputGrab=!1,g.xxKeyInputGrab=!1,g.xxMouseMove=function(e){return 3==g.State&&g.SendMouseMsg(g.KeyAction.NONE,e),e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1},g.xxMouseUp=function(e){return 3==g.State&&g.SendMouseMsg(g.KeyAction.UP,e),e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1},g.xxMouseDown=function(e){return 3==g.State&&g.SendMouseMsg(g.KeyAction.DOWN,e),e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1},g.xxMouseDblClick=function(e){return 3==g.State&&g.SendMouseMsg(g.KeyAction.DBLCLICK,e),e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1},g.xxDOMMouseScroll=function(e){return 3!=g.State||(g.SendMouseMsg(g.KeyAction.SCROLL,e),!1)},g.xxMouseWheel=function(e){return 3!=g.State||(g.SendMouseMsg(g.KeyAction.SCROLL,e),!1)},g.xxKeyUp=function(e){return 3==g.State&&g.SendKeyMsg(g.KeyAction.UP,e),e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1},g.xxKeyDown=function(e){return 3==g.State&&g.SendKeyMsg(g.KeyAction.DOWN,e),e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1},g.xxKeyPress=function(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1},g.handleKeys=function(e){return 1!=g.stopInput&&3==desktop.State&&g.xxKeyPress(e)},g.handleKeyUp=function(e){if(1==g.stopInput||3!=desktop.State)return!1;if(g.firstUpKeys.length<5&&(g.firstUpKeys.push(e.keyCode),5==g.firstUpKeys.length)){var t=g.firstUpKeys.join(",");"16,17,91,91,16"!=t&&"16,17,18,91,92"!=t||(g.stopInput=!0)}return g.xxKeyUp(e)},g.handleKeyDown=function(e){return 1!=g.stopInput&&3==desktop.State&&g.xxKeyDown(e)},g.handleReleaseKeys=function(){var e=JSON.parse(JSON.stringify(g.pressedKeys));for(var t in e)g.SendKeyMsgKC(g.KeyAction.UP,e[t])},g.mousedblclick=function(e){return 1!=g.stopInput&&g.xxMouseDblClick(e)},g.mousedown=function(e){return 1!=g.stopInput&&g.xxMouseDown(e)},g.mouseup=function(e){return 1!=g.stopInput&&g.xxMouseUp(e)},g.mousemove=function(e){return 1!=g.stopInput&&g.xxMouseMove(e)},g.mousewheel=function(e){return 1!=g.stopInput&&g.xxMouseWheel(e)},g.xxMsTouchEvent=function(e){if(4!=e.originalEvent.pointerType){if(e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),"MSPointerDown"==e.type||"MSPointerMove"==e.type||"MSPointerUp"==e.type){var t=0,n=e.originalEvent.pointerId%256,o=e.offsetX*(Canvas.canvas.width/g.CanvasId.clientWidth),a=e.offsetY*(Canvas.canvas.height/g.CanvasId.clientHeight);"MSPointerDown"==e.type?t=65542:"MSPointerMove"==e.type?t=131078:"MSPointerUp"==e.type&&(t=262144),g.TouchArray[n]||(g.TouchArray[n]={x:o,y:a}),g.SendTouchMsg2(n,t),"MSPointerUp"==e.type&&delete g.TouchArray[n]}else alert(e.type);return!0}},g.xxTouchStart=function(e){if(3==g.State)if(e.preventDefault&&e.preventDefault(),0==g.touchenabled||1==g.touchenabled){if(1<e.originalEvent.touches.length)return;var t=e.originalEvent.touches[0];e.which=1,g.LastX=e.pageX=t.pageX,g.LastY=e.pageY=t.pageY,g.SendMouseMsg(KeyAction.DOWN,e)}else{var n=g.GetPositionOfControl(Canvas.canvas);for(var o in e.originalEvent.changedTouches)if(e.originalEvent.changedTouches[o].identifier){var a=e.originalEvent.changedTouches[o].identifier%256;g.TouchArray[a]||(g.TouchArray[a]={x:(e.originalEvent.touches[o].pageX-n[0])*(Canvas.canvas.width/g.CanvasId.clientWidth),y:(e.originalEvent.touches[o].pageY-n[1])*(Canvas.canvas.height/g.CanvasId.clientHeight),f:1})}0<Object.keys(g.TouchArray).length&&null==touchtimer&&(g.touchtimer=setInterval(function(){g.SendTouchMsg2(256,0)},50))}},g.xxTouchMove=function(e){if(3==g.State)if(e.preventDefault&&e.preventDefault(),0==g.touchenabled||1==g.touchenabled){if(1<e.originalEvent.touches.length)return;var t=e.originalEvent.touches[0];e.which=1,g.LastX=e.pageX=t.pageX,g.LastY=e.pageY=t.pageY,g.SendMouseMsg(g.KeyAction.NONE,e)}else{var n=g.GetPositionOfControl(Canvas.canvas);for(var o in e.originalEvent.changedTouches)if(e.originalEvent.changedTouches[o].identifier){var a=e.originalEvent.changedTouches[o].identifier%256;g.TouchArray[a]&&(g.TouchArray[a].x=(e.originalEvent.touches[o].pageX-n[0])*(g.Canvas.canvas.width/g.CanvasId.clientWidth),g.TouchArray[a].y=(e.originalEvent.touches[o].pageY-n[1])*(g.Canvas.canvas.height/g.CanvasId.clientHeight))}}},g.xxTouchEnd=function(e){if(3==g.State)if(e.preventDefault&&e.preventDefault(),0==g.touchenabled||1==g.touchenabled){if(1<e.originalEvent.touches.length)return;e.which=1,e.pageX=LastX,e.pageY=LastY,g.SendMouseMsg(KeyAction.UP,e)}else for(var t in e.originalEvent.changedTouches)if(e.originalEvent.changedTouches[t].identifier){var n=e.originalEvent.changedTouches[t].identifier%256;g.TouchArray[n]&&(g.TouchArray[n].f=2)}},g.GrabMouseInput=function(){if(1!=g.xxMouseInputGrab){var e=g.CanvasId;e.onmousemove=g.xxMouseMove,e.onmouseup=g.xxMouseUp,e.onmousedown=g.xxMouseDown,e.touchstart=g.xxTouchStart,e.touchmove=g.xxTouchMove,e.touchend=g.xxTouchEnd,e.MSPointerDown=g.xxMsTouchEvent,e.MSPointerMove=g.xxMsTouchEvent,e.MSPointerUp=g.xxMsTouchEvent,navigator.userAgent.match(/mozilla/i)?e.DOMMouseScroll=g.xxDOMMouseScroll:e.onmousewheel=g.xxMouseWheel,g.xxMouseInputGrab=!0}},g.UnGrabMouseInput=function(){if(0!=g.xxMouseInputGrab){var e=g.CanvasId;e.onmousemove=null,e.onmouseup=null,e.onmousedown=null,e.touchstart=null,e.touchmove=null,e.touchend=null,e.MSPointerDown=null,e.MSPointerMove=null,e.MSPointerUp=null,navigator.userAgent.match(/mozilla/i)?e.DOMMouseScroll=null:e.onmousewheel=null,g.xxMouseInputGrab=!1}},g.GrabKeyInput=function(){1!=g.xxKeyInputGrab&&(document.onkeyup=g.xxKeyUp,document.onkeydown=g.xxKeyDown,document.onkeypress=g.xxKeyPress,g.xxKeyInputGrab=!0)},g.UnGrabKeyInput=function(){0!=g.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,g.xxKeyInputGrab=!1)},g.GetPositionOfControl=function(e){var t=Array(2);for(t[0]=t[1]=0;e;)t[0]+=e.offsetLeft,t[1]+=e.offsetTop,e=e.offsetParent;return t},g.crotX=function(e,t){return 0==g.rotation?e:1==g.rotation?t:2==g.rotation?g.Canvas.canvas.width-e:3==g.rotation?g.Canvas.canvas.height-t:void 0},g.crotY=function(e,t){return 0==g.rotation?t:1==g.rotation?g.Canvas.canvas.width-e:2==g.rotation?g.Canvas.canvas.height-t:3==g.rotation?e:void 0},g.rotX=function(e,t){return 0==g.rotation||1==g.rotation?e:2==g.rotation?e-g.Canvas.canvas.width:3==g.rotation?e-g.Canvas.canvas.height:void 0},g.rotY=function(e,t){return 0==g.rotation||3==g.rotation?t:1==g.rotation?t-g.Canvas.canvas.width:2==g.rotation?t-g.Canvas.canvas.height:void 0},g.tcanvas=null,g.setRotation=function(e){for(;e<0;)e+=4;var t=e%4;if(t==g.rotation)return!0;var n=g.Canvas.canvas.width,o=g.Canvas.canvas.height;1!=g.rotation&&3!=g.rotation||(n=g.Canvas.canvas.height,o=g.Canvas.canvas.width),null==g.tcanvas&&(g.tcanvas=document.createElement("canvas"));var a=g.tcanvas.getContext("2d");return a.setTransform(1,0,0,1,0,0),a.canvas.width=n,a.canvas.height=o,a.rotate(-90*g.rotation*Math.PI/180),0==g.rotation&&a.drawImage(g.Canvas.canvas,0,0),1==g.rotation&&a.drawImage(g.Canvas.canvas,-g.Canvas.canvas.width,0),2==g.rotation&&a.drawImage(g.Canvas.canvas,-g.Canvas.canvas.width,-g.Canvas.canvas.height),3==g.rotation&&a.drawImage(g.Canvas.canvas,0,-g.Canvas.canvas.height),0!=g.rotation&&2!=g.rotation||(g.Canvas.canvas.height=n,g.Canvas.canvas.width=o),1!=g.rotation&&3!=g.rotation||(g.Canvas.canvas.height=o,g.Canvas.canvas.width=n),g.Canvas.setTransform(1,0,0,1,0,0),g.Canvas.rotate(90*t*Math.PI/180),g.rotation=t,g.Canvas.drawImage(g.tcanvas,g.rotX(0,0),g.rotY(0,0)),g.ScreenWidth=g.Canvas.canvas.width,g.ScreenHeight=g.Canvas.canvas.height,null!=g.onScreenSizeChange&&g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight,g.CanvasId),!0},g.StartRecording=function(){null==g.recordedData&&g.CanvasId.toBlob(function(e){var s=new FileReader;s.readAsArrayBuffer(e),s.onload=function(e){for(var t="",n=new Uint8Array(s.result),o=n.byteLength,a=0;a<o;a++)t+=String.fromCharCode(n[a]);g.recordedData=[],g.recordedStart=Date.now(),g.recordedSize=0,g.recordedData.push(p(1,0,JSON.stringify({magic:"MeshCentralRelaySession",ver:1,time:(new Date).toLocaleString(),protocol:2}))),g.recordedData.push(p(2,1,g.shortToStr(7)+g.shortToStr(8)+g.shortToStr(g.ScreenWidth)+g.shortToStr(g.ScreenHeight)));var r=4+t.length;65e3<r?g.recordedData.push(p(2,1,g.shortToStr(27)+g.shortToStr(8)+g.intToStr(r)+g.shortToStr(3)+g.shortToStr(0)+g.shortToStr(0)+g.shortToStr(0)+t)):g.recordedData.push(p(2,1,g.shortToStr(3)+g.shortToStr(r)+g.shortToStr(0)+g.shortToStr(0)+t))}})},g.StopRecording=function(){if(null!=g.recordedData){var e=g.recordedData;return e.push(p(3,0,"MeshCentralMCREC")),delete g.recordedData,delete g.recordedStart,delete g.recordedSize,e}},g.MuchTheSame=function(e,t){return Math.abs(e-t)<4},g.Debug=function(e){console.log(e)},g.getIEVersion=function(){var e=-1;if("Microsoft Internet Explorer"==navigator.appName){var t=navigator.userAgent;null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1))}return e},g.haltEvent=function(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1},g}
\ No newline at end of file
1 +var CreateAgentRemoteDesktop=function(e,t){var g={};"string"==typeof(g.CanvasId=e)&&(g.CanvasId=Q(e)),g.Canvas=g.CanvasId.getContext("2d"),g.scrolldiv=t,g.State=0,g.PendingOperations=[],g.tilesReceived=0,g.TilesDrawn=0,g.KillDraw=0,g.ipad=!1,g.tabletKeyboardVisible=!1,g.LastX=0,g.LastY=0,g.touchenabled=0,g.submenuoffset=0,g.touchtimer=null,g.TouchArray={},g.connectmode=0,g.connectioncount=0,g.rotation=0,g.protocol=2,g.debugmode=0,g.firstUpKeys=[],g.stopInput=!1,g.localKeyMap=!0,g.pressedKeys=[],g.sessionid=0,g.username,g.oldie=!1,g.CompressionLevel=50,g.ScalingLevel=1024,g.FrameRateTimer=100,g.FirstDraw=!1,g.ScreenWidth=960,g.ScreenHeight=700,g.width=960,g.height=960,g.displays=null,g.selectedDisplay=null,g.onScreenSizeChange=null,g.onMessage=null,g.onConnectCountChanged=null,g.onDebugMessage=null,g.onTouchEnabledChanged=null,g.onDisplayinfo=null,g.accumulator=null;var v=["default","progress","crosshair","pointer","help","text","no-drop","move","nesw-resize","ns-resize","nwse-resize","w-resize","alias","wait","none","not-allowed","col-resize","row-resize","copy","zoom-in","zoom-out"];g.Start=function(){g.State=0,g.accumulator=null},g.Stop=function(){g.setRotation(0),g.UnGrabKeyInput(),g.UnGrabMouseInput(),g.touchenabled=0,null!=g.onScreenSizeChange&&g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight,g.CanvasId),g.Canvas.clearRect(0,0,g.CanvasId.width,g.CanvasId.height)},g.xxStateChange=function(e){if(g.State!=e)switch(g.State=e,g.CanvasId.style.cursor="default",e){case 0:g.Stop()}},g.send=function(e){1<g.debugmode&&console.log("KSend("+e.length+"): "+rstr2hex(e)),null!=g.parent&&g.parent.send(e)},g.ProcessPictureMsg=function(e,t,n){var o=new Image;o.xcount=g.tilesReceived++;var a=g.tilesReceived;o.src="data:image/jpeg;base64,"+btoa(e.substring(4,e.length)),o.onload=function(){if(null!=g.Canvas&&g.KillDraw<a&&0!=g.State)for(g.PendingOperations.push([a,2,o,t,n]);g.DoPendingOperations(););},o.error=function(){console.log("DecodeTileError")}},g.DoPendingOperations=function(){if(0==g.PendingOperations.length)return!1;for(var e=0;e<g.PendingOperations.length;e++){var t=g.PendingOperations[e];if(t[0]==g.TilesDrawn+1)return 1==t[1]?g.ProcessCopyRectMsg(t[2]):2==t[1]&&(g.Canvas.drawImage(t[2],g.rotX(t[3],t[4]),g.rotY(t[3],t[4])),delete t[2]),g.PendingOperations.splice(e,1),delete t,g.TilesDrawn++,g.TilesDrawn==g.tilesReceived&&g.KillDraw<g.TilesDrawn&&(g.KillDraw=g.TilesDrawn=g.tilesReceived=0),!0}return g.oldie&&0<g.PendingOperations.length&&g.TilesDrawn++,!1},g.ProcessCopyRectMsg=function(e){var t=((255&e.charCodeAt(0))<<8)+(255&e.charCodeAt(1)),n=((255&e.charCodeAt(2))<<8)+(255&e.charCodeAt(3)),o=((255&e.charCodeAt(4))<<8)+(255&e.charCodeAt(5)),a=((255&e.charCodeAt(6))<<8)+(255&e.charCodeAt(7)),r=((255&e.charCodeAt(8))<<8)+(255&e.charCodeAt(9)),s=((255&e.charCodeAt(10))<<8)+(255&e.charCodeAt(11));g.Canvas.drawImage(Canvas.canvas,t,n,r,s,o,a,r,s)},g.SendUnPause=function(){g.send(String.fromCharCode(0,8,0,5,0))},g.SendPause=function(){g.send(String.fromCharCode(0,8,0,5,1))},g.SendCompressionLevel=function(e,t,n,o){t&&(g.CompressionLevel=t),n&&(g.ScalingLevel=n),o&&(g.FrameRateTimer=o),g.send(String.fromCharCode(0,5,0,10,e,g.CompressionLevel)+g.shortToStr(g.ScalingLevel)+g.shortToStr(g.FrameRateTimer))},g.SendRefresh=function(){g.send(String.fromCharCode(0,6,0,4))},g.ProcessScreenMsg=function(e,t){for(0<g.debugmode&&console.log("ScreenSize: "+e+" x "+t),g.Canvas.setTransform(1,0,0,1,0,0),g.rotation=0,g.FirstDraw=!0,g.ScreenWidth=g.width=e,g.ScreenHeight=g.height=t,g.KillDraw=g.tilesReceived;0<g.PendingOperations.length;)g.PendingOperations.shift();g.SendCompressionLevel(1),g.SendUnPause(),null!=g.onScreenSizeChange&&g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight,g.CanvasId)},g.ProcessData=function(e){for(var t=0;t<e.length;){var n=g.ProcessDataEx(e.substring(t));if(null==n||0==n)break;t+=n}},g.ProcessDataEx=function(e){if(null!=g.accumulator&&(e=g.accumulator+e,g.accumulator=null),1<g.debugmode&&console.log("KRecv("+e.length+"): "+rstr2hex(e.substring(0,Math.min(e.length,40)))),!(e.length<4)){var t=null,n=0,o=0,a=ReadShort(e,0),r=ReadShort(e,2),s=0;if(null!=g.recordedData&&(g.recordedData.push(p(2,1,e.length)),g.recordedData.push(e)),27==a&&8==r){if(e.length<12)return;if(a=ReadShort(e,8),(r=ReadInt(e,4))+8>e.length)return void(g.accumulator=e);e=e.substring(8),s=8}if(r!=e.length&&0<g.debugmode&&console.log(r,e.length,r==e.length),18<=a&&65!=a&&88!=a)return console.error("Invalid KVM command "+a+" of size "+r),console.log("Invalid KVM data",e.length,rstr2hex(e.substring(0,40))+"..."),void(g.parent&&g.parent.setConsoleMessage&&g.parent.setConsoleMessage("Received invalid network data",5));if(!(r>e.length)){switch(3!=a&&4!=a&&7!=a||(n=((255&(t=e.substring(4,r)).charCodeAt(0))<<8)+(255&t.charCodeAt(1)),o=((255&t.charCodeAt(2))<<8)+(255&t.charCodeAt(3)),0<g.debugmode&&console.log("CMD"+a+" at X="+n+" Y="+o)),a){case 3:g.FirstDraw&&g.onResize(),g.ProcessPictureMsg(t,n,o);break;case 4:g.FirstDraw&&g.onResize(),g.TilesDrawn==g.tilesReceived?g.ProcessCopyRectMsg(t):g.PendingOperations.push([++tilesReceived,1,t]);break;case 7:g.ProcessScreenMsg(n,o),g.SendKeyMsgKC(g.KeyAction.UP,16),g.SendKeyMsgKC(g.KeyAction.UP,17),g.SendKeyMsgKC(g.KeyAction.UP,18),g.SendKeyMsgKC(g.KeyAction.UP,91),g.SendKeyMsgKC(g.KeyAction.UP,92),g.SendKeyMsgKC(g.KeyAction.UP,16),g.send(String.fromCharCode(0,14,0,4));break;case 11:var i=0,c={},u=((255&e.charCodeAt(4))<<8)+(255&e.charCodeAt(5));if(0<u){i=((255&e.charCodeAt(6+2*u))<<8)+(255&e.charCodeAt(7+2*u));for(var l=0;l<u;l++){var d=((255&e.charCodeAt(6+2*l))<<8)+(255&e.charCodeAt(7+2*l));c[d]=65535==d?"All Displays":"Display "+d}}g.displays=c,g.selectedDisplay=i,null!=g.onDisplayinfo&&g.onDisplayinfo(g,c,i);break;case 12:break;case 14:g.touchenabled=1,g.TouchArray={},null!=g.onTouchEnabledChanged&&g.onTouchEnabledChanged(g.touchenabled);break;case 15:g.TouchArray={};break;case 16:g.connectioncount=ReadInt(e,4),null!=g.onConnectCountChanged&&g.onConnectCountChanged(g.connectioncount,g);break;case 17:null!=g.onMessage&&g.onMessage(e.substring(4,r),g);break;case 65:"."!=(e=e.substring(4))[0]?(console.log(e),g.parent&&g.parent.setConsoleMessage&&g.parent.setConsoleMessage(e)):console.log("KVM: "+e.substring(1));break;case 88:if(5!=r)break;var h=e.charCodeAt(4);v.length<h&&(h=0),g.CanvasId.style.cursor=v[h]}return r+s}g.accumulator=e}},g.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32},g.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6},g.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15},g.Alternate=0;var o={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};function p(e,t,n){var o=Date.now();return"number"==typeof n?(g.recordedSize+=n,g.shortToStr(e)+g.shortToStr(t)+g.intToStr(n)+g.intToStr(o>>32)+g.intToStr(32&o)):(g.recordedSize+=n.length,g.shortToStr(e)+g.shortToStr(t)+g.intToStr(n.length)+g.intToStr(o>>32)+g.intToStr(32&o)+n)}return g.SendKeyMsg=function(e,t){var n;null!=e&&((t=t||window.event).code&&0==g.localKeyMap?null!=(n=function(e){return e.code.startsWith("Key")&&4==e.code.length?e.code.charCodeAt(3):e.code.startsWith("Digit")&&6==e.code.length?e.code.charCodeAt(5):e.code.startsWith("Numpad")&&7==e.code.length?e.code.charCodeAt(6)+48:o[e.code]}(t))&&g.SendKeyMsgKC(e,n):(59==(n=t.keyCode)?n=186:173==n?n=189:61==n&&(n=187),g.SendKeyMsgKC(e,n)))},g.SendMessage=function(e){3==g.State&&g.send(String.fromCharCode(0,17)+g.shortToStr(4+e.length)+e)},g.SendKeyMsgKC=function(e,t){if(3==g.State)if("object"==typeof e)for(var n in e)g.SendKeyMsgKC(e[n][0],e[n][1]);else{if(1==e)-1==g.pressedKeys.indexOf(t)&&g.pressedKeys.unshift(t);else if(2==e){-1!=(n=g.pressedKeys.indexOf(t))&&g.pressedKeys.splice(n,1)}g.send(String.fromCharCode(0,g.InputType.KEY,0,6,e-1,t))}},g.sendcad=function(){g.SendCtrlAltDelMsg()},g.SendCtrlAltDelMsg=function(){3==g.State&&g.send(String.fromCharCode(0,g.InputType.CTRLALTDEL,0,4))},g.SendEscKey=function(){3==g.State&&g.send(String.fromCharCode(0,g.InputType.KEY,0,6,0,27,0,g.InputType.KEY,0,6,1,27))},g.SendStartMsg=function(){g.SendKeyMsgKC(g.KeyAction.EXDOWN,91),g.SendKeyMsgKC(g.KeyAction.EXUP,91)},g.SendCharmsMsg=function(){g.SendKeyMsgKC(g.KeyAction.EXDOWN,91),g.SendKeyMsgKC(g.KeyAction.DOWN,67),g.SendKeyMsgKC(g.KeyAction.UP,67),g.SendKeyMsgKC(g.KeyAction.EXUP,91)},g.SendTouchMsg1=function(e,t,n,o){3==g.State&&g.send(String.fromCharCode(0,g.InputType.TOUCH)+g.shortToStr(14)+String.fromCharCode(1,e)+g.intToStr(t)+g.shortToStr(n)+g.shortToStr(o))},g.SendTouchMsg2=function(e,t){var n,o="";for(var a in g.TouchArray)a==e?n=t:1==g.TouchArray[a].f?(n=65542,g.TouchArray[a].f=3,"START"+a):2==g.TouchArray[a].f?(n=262144,"STOP"+a):n=131078,o+=String.fromCharCode(a)+g.intToStr(n)+g.shortToStr(g.TouchArray[a].x)+g.shortToStr(g.TouchArray[a].y),2==g.TouchArray[a].f&&delete g.TouchArray[a];3==g.State&&g.send(String.fromCharCode(0,g.InputType.TOUCH)+g.shortToStr(5+o.length)+String.fromCharCode(2)+o),0==Object.keys(g.TouchArray).length&&null!=g.touchtimer&&(clearInterval(g.touchtimer),g.touchtimer=null)},g.SendMouseMsg=function(e,t){if(3==g.State&&null!=e&&null!=g.Canvas){if(!t)t=window.event;var n=g.Canvas.canvas.height/g.CanvasId.clientHeight,o=g.Canvas.canvas.width/g.CanvasId.clientWidth,a=g.GetPositionOfControl(g.Canvas.canvas),r=(t.pageX-a[0])*o,s=(t.pageY-a[1])*n;if(t.addx&&(r+=t.addx),t.addy&&(s+=t.addy),0<=r&&r<=g.Canvas.canvas.width&&0<=s&&s<=g.Canvas.canvas.height){var i=0,c=0;e==g.KeyAction.UP||e==g.KeyAction.DOWN?t.which?i=1==t.which?g.MouseButton.LEFT:2==t.which?g.MouseButton.MIDDLE:g.MouseButton.RIGHT:t.button&&(i=0==t.button?g.MouseButton.LEFT:1==t.button?g.MouseButton.MIDDLE:g.MouseButton.RIGHT):e==g.KeyAction.SCROLL&&(t.detail?c=120*t.detail*-1:t.wheelDelta&&(c=3*t.wheelDelta));var u="";u=e==g.KeyAction.DBLCLICK?String.fromCharCode(0,g.InputType.MOUSE,0,10,0,136,r/256&255,255&r,s/256&255,255&s):e==g.KeyAction.SCROLL?String.fromCharCode(0,g.InputType.MOUSE,0,12,0,0,r/256&255,255&r,s/256&255,255&s,c/256&255,255&c):String.fromCharCode(0,g.InputType.MOUSE,0,10,0,e==g.KeyAction.DOWN?i:2*i&255,r/256&255,255&r,s/256&255,255&s),g.Action==g.KeyAction.NONE?0==g.Alternate||g.ipad?(g.send(u),g.Alternate=1):g.Alternate=0:g.send(u)}}},g.GetDisplayNumbers=function(){g.send(String.fromCharCode(0,11,0,4))},g.SetDisplay=function(e){g.send(String.fromCharCode(0,12,0,6,e>>8,255&e))},g.intToStr=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},g.shortToStr=function(e){return String.fromCharCode(e>>8&255,255&e)},g.onResize=function(){0!=g.ScreenWidth&&0!=g.ScreenHeight&&(g.Canvas.canvas.width==g.ScreenWidth&&g.Canvas.canvas.height==g.ScreenHeight||(g.FirstDraw&&(g.Canvas.canvas.width=g.ScreenWidth,g.Canvas.canvas.height=g.ScreenHeight,g.Canvas.fillRect(0,0,g.ScreenWidth,g.ScreenHeight),null!=g.onScreenSizeChange&&g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight,g.CanvasId)),g.FirstDraw=!1))},g.xxMouseInputGrab=!1,g.xxKeyInputGrab=!1,g.xxMouseMove=function(e){return 3==g.State&&g.SendMouseMsg(g.KeyAction.NONE,e),e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1},g.xxMouseUp=function(e){return 3==g.State&&g.SendMouseMsg(g.KeyAction.UP,e),e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1},g.xxMouseDown=function(e){return 3==g.State&&g.SendMouseMsg(g.KeyAction.DOWN,e),e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1},g.xxMouseDblClick=function(e){return 3==g.State&&g.SendMouseMsg(g.KeyAction.DBLCLICK,e),e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1},g.xxDOMMouseScroll=function(e){return 3!=g.State||(g.SendMouseMsg(g.KeyAction.SCROLL,e),!1)},g.xxMouseWheel=function(e){return 3!=g.State||(g.SendMouseMsg(g.KeyAction.SCROLL,e),!1)},g.xxKeyUp=function(e){return 3==g.State&&g.SendKeyMsg(g.KeyAction.UP,e),e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1},g.xxKeyDown=function(e){return 3==g.State&&g.SendKeyMsg(g.KeyAction.DOWN,e),e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1},g.xxKeyPress=function(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1},g.handleKeys=function(e){return 1!=g.stopInput&&3==desktop.State&&g.xxKeyPress(e)},g.handleKeyUp=function(e){if(1==g.stopInput||3!=desktop.State)return!1;if(g.firstUpKeys.length<5&&(g.firstUpKeys.push(e.keyCode),5==g.firstUpKeys.length)){var t=g.firstUpKeys.join(",");"16,17,91,91,16"!=t&&"16,17,18,91,92"!=t||(g.stopInput=!0)}return g.xxKeyUp(e)},g.handleKeyDown=function(e){return 1!=g.stopInput&&3==desktop.State&&g.xxKeyDown(e)},g.handleReleaseKeys=function(){var e=JSON.parse(JSON.stringify(g.pressedKeys));for(var t in e)g.SendKeyMsgKC(g.KeyAction.UP,e[t])},g.mousedblclick=function(e){return 1!=g.stopInput&&g.xxMouseDblClick(e)},g.mousedown=function(e){return 1!=g.stopInput&&g.xxMouseDown(e)},g.mouseup=function(e){return 1!=g.stopInput&&g.xxMouseUp(e)},g.mousemove=function(e){return 1!=g.stopInput&&g.xxMouseMove(e)},g.mousewheel=function(e){return 1!=g.stopInput&&g.xxMouseWheel(e)},g.xxMsTouchEvent=function(e){if(4!=e.originalEvent.pointerType){if(e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),"MSPointerDown"==e.type||"MSPointerMove"==e.type||"MSPointerUp"==e.type){var t=0,n=e.originalEvent.pointerId%256,o=e.offsetX*(Canvas.canvas.width/g.CanvasId.clientWidth),a=e.offsetY*(Canvas.canvas.height/g.CanvasId.clientHeight);"MSPointerDown"==e.type?t=65542:"MSPointerMove"==e.type?t=131078:"MSPointerUp"==e.type&&(t=262144),g.TouchArray[n]||(g.TouchArray[n]={x:o,y:a}),g.SendTouchMsg2(n,t),"MSPointerUp"==e.type&&delete g.TouchArray[n]}else alert(e.type);return!0}},g.xxTouchStart=function(e){if(3==g.State)if(e.preventDefault&&e.preventDefault(),0==g.touchenabled||1==g.touchenabled){if(1<e.originalEvent.touches.length)return;var t=e.originalEvent.touches[0];e.which=1,g.LastX=e.pageX=t.pageX,g.LastY=e.pageY=t.pageY,g.SendMouseMsg(KeyAction.DOWN,e)}else{var n=g.GetPositionOfControl(Canvas.canvas);for(var o in e.originalEvent.changedTouches)if(e.originalEvent.changedTouches[o].identifier){var a=e.originalEvent.changedTouches[o].identifier%256;g.TouchArray[a]||(g.TouchArray[a]={x:(e.originalEvent.touches[o].pageX-n[0])*(Canvas.canvas.width/g.CanvasId.clientWidth),y:(e.originalEvent.touches[o].pageY-n[1])*(Canvas.canvas.height/g.CanvasId.clientHeight),f:1})}0<Object.keys(g.TouchArray).length&&null==touchtimer&&(g.touchtimer=setInterval(function(){g.SendTouchMsg2(256,0)},50))}},g.xxTouchMove=function(e){if(3==g.State)if(e.preventDefault&&e.preventDefault(),0==g.touchenabled||1==g.touchenabled){if(1<e.originalEvent.touches.length)return;var t=e.originalEvent.touches[0];e.which=1,g.LastX=e.pageX=t.pageX,g.LastY=e.pageY=t.pageY,g.SendMouseMsg(g.KeyAction.NONE,e)}else{var n=g.GetPositionOfControl(Canvas.canvas);for(var o in e.originalEvent.changedTouches)if(e.originalEvent.changedTouches[o].identifier){var a=e.originalEvent.changedTouches[o].identifier%256;g.TouchArray[a]&&(g.TouchArray[a].x=(e.originalEvent.touches[o].pageX-n[0])*(g.Canvas.canvas.width/g.CanvasId.clientWidth),g.TouchArray[a].y=(e.originalEvent.touches[o].pageY-n[1])*(g.Canvas.canvas.height/g.CanvasId.clientHeight))}}},g.xxTouchEnd=function(e){if(3==g.State)if(e.preventDefault&&e.preventDefault(),0==g.touchenabled||1==g.touchenabled){if(1<e.originalEvent.touches.length)return;e.which=1,e.pageX=LastX,e.pageY=LastY,g.SendMouseMsg(KeyAction.UP,e)}else for(var t in e.originalEvent.changedTouches)if(e.originalEvent.changedTouches[t].identifier){var n=e.originalEvent.changedTouches[t].identifier%256;g.TouchArray[n]&&(g.TouchArray[n].f=2)}},g.GrabMouseInput=function(){if(1!=g.xxMouseInputGrab){var e=g.CanvasId;e.onmousemove=g.xxMouseMove,e.onmouseup=g.xxMouseUp,e.onmousedown=g.xxMouseDown,e.touchstart=g.xxTouchStart,e.touchmove=g.xxTouchMove,e.touchend=g.xxTouchEnd,e.MSPointerDown=g.xxMsTouchEvent,e.MSPointerMove=g.xxMsTouchEvent,e.MSPointerUp=g.xxMsTouchEvent,navigator.userAgent.match(/mozilla/i)?e.DOMMouseScroll=g.xxDOMMouseScroll:e.onmousewheel=g.xxMouseWheel,g.xxMouseInputGrab=!0}},g.UnGrabMouseInput=function(){if(0!=g.xxMouseInputGrab){var e=g.CanvasId;e.onmousemove=null,e.onmouseup=null,e.onmousedown=null,e.touchstart=null,e.touchmove=null,e.touchend=null,e.MSPointerDown=null,e.MSPointerMove=null,e.MSPointerUp=null,navigator.userAgent.match(/mozilla/i)?e.DOMMouseScroll=null:e.onmousewheel=null,g.xxMouseInputGrab=!1}},g.GrabKeyInput=function(){1!=g.xxKeyInputGrab&&(document.onkeyup=g.xxKeyUp,document.onkeydown=g.xxKeyDown,document.onkeypress=g.xxKeyPress,g.xxKeyInputGrab=!0)},g.UnGrabKeyInput=function(){0!=g.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,g.xxKeyInputGrab=!1)},g.GetPositionOfControl=function(e){var t=Array(2);for(t[0]=t[1]=0;e;)t[0]+=e.offsetLeft,t[1]+=e.offsetTop,e=e.offsetParent;return t},g.crotX=function(e,t){return 0==g.rotation?e:1==g.rotation?t:2==g.rotation?g.Canvas.canvas.width-e:3==g.rotation?g.Canvas.canvas.height-t:void 0},g.crotY=function(e,t){return 0==g.rotation?t:1==g.rotation?g.Canvas.canvas.width-e:2==g.rotation?g.Canvas.canvas.height-t:3==g.rotation?e:void 0},g.rotX=function(e,t){return 0==g.rotation||1==g.rotation?e:2==g.rotation?e-g.Canvas.canvas.width:3==g.rotation?e-g.Canvas.canvas.height:void 0},g.rotY=function(e,t){return 0==g.rotation||3==g.rotation?t:1==g.rotation?t-g.Canvas.canvas.width:2==g.rotation?t-g.Canvas.canvas.height:void 0},g.tcanvas=null,g.setRotation=function(e){for(;e<0;)e+=4;var t=e%4;if(t==g.rotation)return!0;var n=g.Canvas.canvas.width,o=g.Canvas.canvas.height;1!=g.rotation&&3!=g.rotation||(n=g.Canvas.canvas.height,o=g.Canvas.canvas.width),null==g.tcanvas&&(g.tcanvas=document.createElement("canvas"));var a=g.tcanvas.getContext("2d");return a.setTransform(1,0,0,1,0,0),a.canvas.width=n,a.canvas.height=o,a.rotate(-90*g.rotation*Math.PI/180),0==g.rotation&&a.drawImage(g.Canvas.canvas,0,0),1==g.rotation&&a.drawImage(g.Canvas.canvas,-g.Canvas.canvas.width,0),2==g.rotation&&a.drawImage(g.Canvas.canvas,-g.Canvas.canvas.width,-g.Canvas.canvas.height),3==g.rotation&&a.drawImage(g.Canvas.canvas,0,-g.Canvas.canvas.height),0!=g.rotation&&2!=g.rotation||(g.Canvas.canvas.height=n,g.Canvas.canvas.width=o),1!=g.rotation&&3!=g.rotation||(g.Canvas.canvas.height=o,g.Canvas.canvas.width=n),g.Canvas.setTransform(1,0,0,1,0,0),g.Canvas.rotate(90*t*Math.PI/180),g.rotation=t,g.Canvas.drawImage(g.tcanvas,g.rotX(0,0),g.rotY(0,0)),g.ScreenWidth=g.Canvas.canvas.width,g.ScreenHeight=g.Canvas.canvas.height,null!=g.onScreenSizeChange&&g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight,g.CanvasId),!0},g.StartRecording=function(){null==g.recordedData&&g.CanvasId.toBlob(function(e){var s=new FileReader;s.readAsArrayBuffer(e),s.onload=function(e){for(var t="",n=new Uint8Array(s.result),o=n.byteLength,a=0;a<o;a++)t+=String.fromCharCode(n[a]);g.recordedData=[],g.recordedStart=Date.now(),g.recordedSize=0,g.recordedData.push(p(1,0,JSON.stringify({magic:"MeshCentralRelaySession",ver:1,time:(new Date).toLocaleString(),protocol:2}))),g.recordedData.push(p(2,1,g.shortToStr(7)+g.shortToStr(8)+g.shortToStr(g.ScreenWidth)+g.shortToStr(g.ScreenHeight)));var r=4+t.length;65e3<r?g.recordedData.push(p(2,1,g.shortToStr(27)+g.shortToStr(8)+g.intToStr(r)+g.shortToStr(3)+g.shortToStr(0)+g.shortToStr(0)+g.shortToStr(0)+t)):g.recordedData.push(p(2,1,g.shortToStr(3)+g.shortToStr(r)+g.shortToStr(0)+g.shortToStr(0)+t))}})},g.StopRecording=function(){if(null!=g.recordedData){var e=g.recordedData;return e.push(p(3,0,"MeshCentralMCREC")),delete g.recordedData,delete g.recordedStart,delete g.recordedSize,e}},g.MuchTheSame=function(e,t){return Math.abs(e-t)<4},g.Debug=function(e){console.log(e)},g.getIEVersion=function(){var e=-1;if("Microsoft Internet Explorer"==navigator.appName){var t=navigator.userAgent;null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1))}return e},g.haltEvent=function(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1},g}
\ No newline at end of file
public/scripts/agent-desktop-0.0.2.js
+4
@@ -47,6 +47,9 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
47 obj.width = 960;
48 obj.height = 960;
49
50 + obj.displays = null;
51 + obj.selectedDisplay = null;
52 +
53 obj.onScreenSizeChange = null;
54 obj.onMessage = null;
55 obj.onConnectCountChanged = null;
@@ -266,6 +269,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) {
269 }
270 }
271 //console.log('Get Displays', displays, selectedDisplay, rstr2hex(str));
272 + obj.displays = displays; obj.selectedDisplay = selectedDisplay;
273 if (obj.onDisplayinfo != null) { obj.onDisplayinfo(obj, displays, selectedDisplay); }
274 break;
275 case 12: // SetDisplay
public/scripts/amt-wsman-0.2.0-min.js
+1 -1
@@ -1 +1 @@
1 -var WsmanStackCreateService=function(e,s,r,a,o,t){var p={};function l(e){if(!e)return"";var s=" ";for(var r in e)e.hasOwnProperty(r)&&0===r.indexOf("@")&&(s+=r.substring(1)+'="'+e[r]+'" ');return s}function w(e){if(!e)return"";if("string"==typeof e)return e;if(e.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+e.InstanceID+"</w:Selector></w:SelectorSet>";var s="<w:SelectorSet>";for(var r in e)if(e.hasOwnProperty(r)){if(s+='<w:Selector Name="'+r+'">',e[r].ReferenceParameters){s+="<a:EndpointReference>",s+="<a:Address>"+e[r].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+e[r].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var a=e[r].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(a))for(var o=0;o<a.length;o++)s+="<w:Selector"+l(a[o])+">"+a[o].Value+"</w:Selector>";else s+="<w:Selector"+l(a)+">"+a.Value+"</w:Selector>";s+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else s+=e[r];s+="</w:Selector>"}return s+="</w:SelectorSet>"}return p.NextMessageId=1,p.Address="/wsman",p.comm=CreateWsmanComm(e,s,r,a,o,t),p.PerformAjax=function(e,o,s,r,a){null==a&&(a=""),p.comm.PerformAjax('<?xml version=\"1.0\" encoding=\"utf-8\"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+a+"><Header><a:Action>"+e,function(e,s,r){if(200==s){var a=p.ParseWsman(e);a&&null!=a?o(p,a.Header.ResourceURI,a,200,r):o(p,null,{Header:{HttpError:s}},601,r)}else o(p,null,{Header:{HttpError:s}},s,r)},s,r)},p.CancelAllQueries=function(e){p.comm.CancelAllQueries(e)},p.GetNameFromUrl=function(e){var s=e.lastIndexOf("/");return-1==s?e:e.substring(s+1)},p.ExecSubscribe=function(e,s,r,a,o,t,n,l,d,c){var m="",i="";null!=d&&null!=c&&(m="<t:IssuedTokens><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>"+d+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+c+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",i='<Auth Profile="http://schemas.xmlsoap.org/ws/2004/08/eventing/DeliveryModes/secprofile/http/digest"/>'),l=null!=l&&null!=l?"<a:ReferenceParameters>"+l+"</a:ReferenceParameters>":"";var u="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+e+"</w:ResourceURI><a:MessageID>"+p.NextMessageId+++"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+w(n)+m+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.dmtf.org/wbem/wsman/1/wsman/'+s+'"><e:NotifyTo><a:Address>'+r+"</a:Address></e:NotifyTo>"+i+"</e:Delivery><e:Expires>PT0.000000S</e:Expires></e:Subscribe>";p.PerformAjax(u+"</Body></Envelope>",a,o,t,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:m="http://x.com"')},p.ExecUnSubscribe=function(e,s,r,a,o){var t="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+e+"</w:ResourceURI><a:MessageID>"+p.NextMessageId+++"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+w(o)+"</Header><Body><e:Unsubscribe/>";p.PerformAjax(t+"</Body></Envelope>",s,r,a,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')},p.ExecPut=function(e,s,r,a,o,t){var n="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+e+"</w:ResourceURI><a:MessageID>"+p.NextMessageId+++"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+w(t)+"</Header><Body>"+function(e,s){if(!e||null==s)return"";var r=p.GetNameFromUrl(e),a="<r:"+r+' xmlns:r="'+e+'">';for(var o in s)if(s.hasOwnProperty(o)&&0!==o.indexOf("__")&&0!==o.indexOf("@")&&void 0!==s[o]&&null!==s[o]&&"function"!=typeof s[o])if("object"==typeof s[o]&&s[o].ReferenceParameters){a+="<r:"+o+"><a:Address>"+s[o].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+s[o].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var t=s[o].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(t))for(var n=0;n<t.length;n++)a+="<w:Selector"+l(t[n])+">"+t[n].Value+"</w:Selector>";else a+="<w:Selector"+l(t)+">"+t.Value+"</w:Selector>";a+="</w:SelectorSet></a:ReferenceParameters></r:"+o+">"}else if(Array.isArray(s[o]))for(n=0;n<s[o].length;n++)a+="<r:"+o+">"+s[o][n].toString()+"</r:"+o+">";else a+="<r:"+o+">"+s[o].toString()+"</r:"+o+">";return a+="</r:"+r+">"}(e,s);p.PerformAjax(n+"</Body></Envelope>",r,a,o)},p.ExecCreate=function(e,s,r,a,o,t){var n=p.GetNameFromUrl(e),l="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+e+"</w:ResourceURI><a:MessageID>"+p.NextMessageId+++"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+w(t)+"</Header><Body><g:"+n+' xmlns:g="'+e+'">';for(var d in s)l+="<g:"+d+">"+s[d]+"</g:"+d+">";p.PerformAjax(l+"</g:"+n+"></Body></Envelope>",r,a,o)},p.ExecCreateXml=function(e,s,r,a,o){var t=p.GetNameFromUrl(e);p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+e+"</w:ResourceURI><a:MessageID>"+p.NextMessageId+++"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout></Header><Body><r:"+t+' xmlns:r="'+e+'">'+s+"</r:"+t+"></Body></Envelope>",r,a,o)},p.ExecDelete=function(e,s,r,a,o){var t="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+e+"</w:ResourceURI><a:MessageID>"+p.NextMessageId+++"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+w(s)+"</Header><Body /></Envelope>";p.PerformAjax(t,r,a,o)},p.ExecGet=function(e,s,r,a){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+e+"</w:ResourceURI><a:MessageID>"+p.NextMessageId+++"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",s,r,a)},p.ExecMethod=function(e,s,r,a,o,t,n){var l="";for(var d in r)if(null!=r[d])if(Array.isArray(r[d]))for(var c in r[d])l+="<r:"+d+">"+r[d][c]+"</r:"+d+">";else l+="<r:"+d+">"+r[d]+"</r:"+d+">";p.ExecMethodXml(e,s,l,a,o,t,n)},p.ExecMethodXml=function(e,s,r,a,o,t,n){p.PerformAjax(e+"/"+s+"</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+e+"</w:ResourceURI><a:MessageID>"+p.NextMessageId+++"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+w(n)+"</Header><Body><r:"+s+'_INPUT xmlns:r="'+e+'">'+r+"</r:"+s+"_INPUT></Body></Envelope>",a,o,t)},p.ExecEnum=function(e,s,r,a){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+e+"</w:ResourceURI><a:MessageID>"+p.NextMessageId+++'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',s,r,a)},p.ExecPull=function(e,s,r,a,o){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+e+"</w:ResourceURI><a:MessageID>"+p.NextMessageId+++'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+s+"</EnumerationContext><MaxElements>999</MaxElements><MaxCharacters>99999</MaxCharacters></Pull></Body></Envelope>",r,a,o)},p.ParseWsman=function(s){try{s.childNodes||(s=function(e){{if(window.DOMParser)return(new DOMParser).parseFromString(e,"text/xml");var s=new ActiveXObject("Microsoft.XMLDOM");return s.async=!1,s.loadXML(e),s}}(s));var e,r={Header:{}},a=s.getElementsByTagName("Header")[0];if(!(a=a||s.getElementsByTagName("a:Header")[0]))return null;for(var o=0;o<a.childNodes.length;o++){var t=a.childNodes[o];r.Header[t.localName]=t.textContent}var n=s.getElementsByTagName("Body")[0];return(n=n||s.getElementsByTagName("a:Body")[0])?(0<n.childNodes.length&&((e=n.childNodes[0].localName).indexOf("_OUTPUT")==e.length-7&&(e=e.substring(0,e.length-7)),r.Header.Method=e,r.Body=function e(s){var r,a={};for(var o=0;o<s.childNodes.length;o++){var t=s.childNodes[o];"true"==(r=0==t.childElementCount?t.textContent:e(t))&&(r=!0),"false"==r&&(r=!1);var n=r;if(0<t.attributes.length){n={Value:r};for(var l=0;l<t.attributes.length;l++)n["@"+t.attributes[l].name]=t.attributes[l].value}a[t.localName]instanceof Array?a[t.localName].push(n):null==a[t.localName]?a[t.localName]=n:a[t.localName]=[a[t.localName],n]}return a}(n.childNodes[0])),r):null}catch(e){return console.log("Unable to parse XML: "+s),null}},p}
\ No newline at end of file
1 +var WsmanStackCreateService=function(e,s,r,a,o,t){var p={};function l(e){if(!e)return"";var s=" ";for(var r in e)e.hasOwnProperty(r)&&0===r.indexOf("@")&&(s+=r.substring(1)+'="'+e[r]+'" ');return s}function w(e){if(!e)return"";if("string"==typeof e)return e;if(e.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+e.InstanceID+"</w:Selector></w:SelectorSet>";var s="<w:SelectorSet>";for(var r in e)if(e.hasOwnProperty(r)){if(s+='<w:Selector Name="'+r+'">',e[r].ReferenceParameters){s+="<a:EndpointReference>",s+="<a:Address>"+e[r].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+e[r].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var a=e[r].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(a))for(var o=0;o<a.length;o++)s+="<w:Selector"+l(a[o])+">"+a[o].Value+"</w:Selector>";else s+="<w:Selector"+l(a)+">"+a.Value+"</w:Selector>";s+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else s+=e[r];s+="</w:Selector>"}return s+="</w:SelectorSet>"}return p.NextMessageId=1,p.Address="/wsman",p.comm=CreateWsmanComm(e,s,r,a,o,t),p.PerformAjax=function(e,o,s,r,a){null==a&&(a=""),p.comm.PerformAjax('<?xml version=\"1.0\" encoding=\"utf-8\"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+a+"><Header><a:Action>"+e,function(e,s,r){if(200==s){var a=p.ParseWsman(e);a&&null!=a?o(p,a.Header.ResourceURI,a,200,r):o(p,null,{Header:{HttpError:s}},601,r)}else o(p,null,{Header:{HttpError:s}},s,r)},s,r)},p.CancelAllQueries=function(e){p.comm.CancelAllQueries(e)},p.GetNameFromUrl=function(e){var s=e.lastIndexOf("/");return-1==s?e:e.substring(s+1)},p.ExecSubscribe=function(e,s,r,a,o,t,n,l,c,d){var m="",i="";null!=c&&null!=d&&(m="<t:IssuedTokens><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>"+c+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+d+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",i='<Auth Profile="http://schemas.xmlsoap.org/ws/2004/08/eventing/DeliveryModes/secprofile/http/digest"/>'),l=null!=l&&null!=l?"<a:ReferenceParameters>"+l+"</a:ReferenceParameters>":"";var u="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+e+"</w:ResourceURI><a:MessageID>"+p.NextMessageId+++"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+w(n)+m+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.dmtf.org/wbem/wsman/1/wsman/'+s+'"><e:NotifyTo><a:Address>'+r+"</a:Address></e:NotifyTo>"+i+"</e:Delivery><e:Expires>PT0.000000S</e:Expires></e:Subscribe>";p.PerformAjax(u+"</Body></Envelope>",a,o,t,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:m="http://x.com"')},p.ExecUnSubscribe=function(e,s,r,a,o){var t="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+e+"</w:ResourceURI><a:MessageID>"+p.NextMessageId+++"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+w(o)+"</Header><Body><e:Unsubscribe/>";p.PerformAjax(t+"</Body></Envelope>",s,r,a,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')},p.ExecPut=function(e,s,r,a,o,t){var n="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+e+"</w:ResourceURI><a:MessageID>"+p.NextMessageId+++"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+w(t)+"</Header><Body>"+function(e,s){if(!e||null==s)return"";var r=p.GetNameFromUrl(e),a="<r:"+r+' xmlns:r="'+e+'">';for(var o in s)if(s.hasOwnProperty(o)&&0!==o.indexOf("__")&&0!==o.indexOf("@")&&void 0!==s[o]&&null!==s[o]&&"function"!=typeof s[o])if("object"==typeof s[o]&&s[o].ReferenceParameters){a+="<r:"+o+"><a:Address>"+s[o].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+s[o].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var t=s[o].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(t))for(var n=0;n<t.length;n++)a+="<w:Selector"+l(t[n])+">"+t[n].Value+"</w:Selector>";else a+="<w:Selector"+l(t)+">"+t.Value+"</w:Selector>";a+="</w:SelectorSet></a:ReferenceParameters></r:"+o+">"}else if(Array.isArray(s[o]))for(n=0;n<s[o].length;n++)a+="<r:"+o+">"+s[o][n].toString()+"</r:"+o+">";else a+="<r:"+o+">"+s[o].toString()+"</r:"+o+">";return a+="</r:"+r+">"}(e,s);p.PerformAjax(n+"</Body></Envelope>",r,a,o)},p.ExecCreate=function(e,s,r,a,o,t){var n=p.GetNameFromUrl(e),l="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+e+"</w:ResourceURI><a:MessageID>"+p.NextMessageId+++"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+w(t)+"</Header><Body><g:"+n+' xmlns:g="'+e+'">';for(var c in s)l+="<g:"+c+">"+s[c]+"</g:"+c+">";p.PerformAjax(l+"</g:"+n+"></Body></Envelope>",r,a,o)},p.ExecCreateXml=function(e,s,r,a,o){var t=p.GetNameFromUrl(e);p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+e+"</w:ResourceURI><a:MessageID>"+p.NextMessageId+++"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout></Header><Body><r:"+t+' xmlns:r="'+e+'">'+s+"</r:"+t+"></Body></Envelope>",r,a,o)},p.ExecDelete=function(e,s,r,a,o){var t="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+e+"</w:ResourceURI><a:MessageID>"+p.NextMessageId+++"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+w(s)+"</Header><Body /></Envelope>";p.PerformAjax(t,r,a,o)},p.ExecGet=function(e,s,r,a){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+e+"</w:ResourceURI><a:MessageID>"+p.NextMessageId+++"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",s,r,a)},p.ExecMethod=function(e,s,r,a,o,t,n){var l="";for(var c in r)if(null!=r[c])if(Array.isArray(r[c]))for(var d in r[c])l+="<r:"+c+">"+r[c][d]+"</r:"+c+">";else l+="<r:"+c+">"+r[c]+"</r:"+c+">";p.ExecMethodXml(e,s,l,a,o,t,n)},p.ExecMethodXml=function(e,s,r,a,o,t,n){p.PerformAjax(e+"/"+s+"</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+e+"</w:ResourceURI><a:MessageID>"+p.NextMessageId+++"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+w(n)+"</Header><Body><r:"+s+'_INPUT xmlns:r="'+e+'">'+r+"</r:"+s+"_INPUT></Body></Envelope>",a,o,t)},p.ExecEnum=function(e,s,r,a){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+e+"</w:ResourceURI><a:MessageID>"+p.NextMessageId+++'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',s,r,a)},p.ExecPull=function(e,s,r,a,o){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+e+"</w:ResourceURI><a:MessageID>"+p.NextMessageId+++'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+s+"</EnumerationContext><MaxElements>999</MaxElements><MaxCharacters>99999</MaxCharacters></Pull></Body></Envelope>",r,a,o)},p.ParseWsman=function(s){try{s.childNodes||(s=function(e){{if(window.DOMParser)return(new DOMParser).parseFromString(e,"text/xml");var s=new ActiveXObject("Microsoft.XMLDOM");return s.async=!1,s.loadXML(e),s}}(s));var e,r={Header:{}},a=s.getElementsByTagName("Header")[0];if(!(a=a||s.getElementsByTagName("a:Header")[0]))return null;for(var o=0;o<a.childNodes.length;o++){var t=a.childNodes[o];r.Header[t.localName]=t.textContent}var n=s.getElementsByTagName("Body")[0];return(n=n||s.getElementsByTagName("a:Body")[0])?(0<n.childNodes.length&&((e=n.childNodes[0].localName).indexOf("_OUTPUT")==e.length-7&&(e=e.substring(0,e.length-7)),r.Header.Method=e,r.Body=function e(s){var r,a={};for(var o=0;o<s.childNodes.length;o++){var t=s.childNodes[o];"true"==(r=0==t.childElementCount?t.textContent:e(t))&&(r=!0),"false"==r&&(r=!1);var n=r;if(0<t.attributes.length){n={Value:r};for(var l=0;l<t.attributes.length;l++)n["@"+t.attributes[l].name]=t.attributes[l].value}a[t.localName]instanceof Array?a[t.localName].push(n):null==a[t.localName]?a[t.localName]=n:a[t.localName]=[a[t.localName],n]}return a}(n.childNodes[0])),r):null}catch(e){return console.log("Unable to parse XML: "+s),null}},p}
\ No newline at end of file
translate/translate.json
+125 -105
@@ -407,7 +407,7 @@
407 "ru": ", ",
408 "zh-chs": ",",
409 "xloc": [
410 - "default-mobile.handlebars->9->335",
410 + "default-mobile.handlebars->9->336",
411 "default.handlebars->25->1306"
412 ]
413 },
@@ -478,7 +478,7 @@
478 "zh-chs": ",WebRTC",
479 "xloc": [
480 "default-mobile.handlebars->9->238",
481 - "default-mobile.handlebars->9->246",
481 + "default-mobile.handlebars->9->247",
482 "default.handlebars->25->689",
483 "default.handlebars->25->720",
484 "default.handlebars->25->732",
@@ -611,7 +611,7 @@
611 "ru": "...",
612 "zh-chs": "...",
613 "xloc": [
614 - "default-mobile.handlebars->9->248",
614 + "default-mobile.handlebars->9->249",
615 "default-mobile.handlebars->9->77",
616 "default.handlebars->25->1347",
617 "default.handlebars->25->1687",
@@ -680,7 +680,7 @@
680 "ru": "1 байт",
681 "zh-chs": "1個字節",
682 "xloc": [
683 - "default-mobile.handlebars->9->339",
683 + "default-mobile.handlebars->9->340",
684 "default-mobile.handlebars->9->87",
685 "default.handlebars->25->1366"
686 ]
@@ -1148,7 +1148,7 @@
1148 "pt": "3",
1149 "ru": "3",
1150 "xloc": [
1151 - "default-mobile.handlebars->9->274"
1151 + "default-mobile.handlebars->9->275"
1152 ]
1153 },
1154 {
@@ -2471,7 +2471,7 @@
2471 "ru": "Добавить пользователя",
2472 "zh-chs": "添加用戶",
2473 "xloc": [
2474 - "default-mobile.handlebars->9->285",
2474 + "default-mobile.handlebars->9->286",
2475 "default.handlebars->25->557"
2476 ]
2477 },
@@ -2536,7 +2536,7 @@
2536 "nl": "Gebruiker toevoegen aan apparaatgroep",
2537 "zh-chs": "将用户添加到设备组",
2538 "xloc": [
2539 - "default-mobile.handlebars->9->314"
2539 + "default-mobile.handlebars->9->315"
2540 ]
2541 },
2542 {
@@ -2952,7 +2952,7 @@
2952 "ru": "Консоль агента",
2953 "zh-chs": "代理控制台",
2954 "xloc": [
2955 - "default-mobile.handlebars->9->320",
2955 + "default-mobile.handlebars->9->321",
2956 "default.handlebars->25->1289"
2957 ]
2958 },
@@ -3196,8 +3196,8 @@
3196 "ru": "Все",
3197 "zh-chs": "所有",
3198 "xloc": [
3199 - "default-mobile.handlebars->9->249",
3200 - "default-mobile.handlebars->9->251",
3199 + "default-mobile.handlebars->9->250",
3200 + "default-mobile.handlebars->9->252",
3201 "default-mobile.handlebars->9->86"
3202 ]
3203 },
@@ -3213,10 +3213,7 @@
3213 "nl": "Alle schermen",
3214 "pt": "Todas as telas",
3215 "ru": "Все экраны",
3216 - "zh-chs": "所有顯示",
3217 - "xloc": [
3218 - "default-mobile.handlebars->9->241"
3219 - ]
3216 + "zh-chs": "所有顯示"
3217 },
3218 {
3219 "cs": "Zaměřit vše",
@@ -3915,7 +3912,7 @@
3912 "ru": "Вы действительно хотите удалить группу \\\"{0}\\\"? Удаление группы приведет к удалению всей информации связанной с устройствами в этой группе.",
3913 "zh-chs": "您確定要刪除組{0}嗎?刪除設備組還將刪除該組中有關設備的所有信息。",
3914 "xloc": [
3918 - "default-mobile.handlebars->9->291",
3915 + "default-mobile.handlebars->9->292",
3916 "default.handlebars->25->1216"
3917 ]
3918 },
@@ -5215,8 +5212,8 @@
5212 "ru": "Чаты и уведомления",
5213 "zh-chs": "聊天並通知",
5214 "xloc": [
5218 - "default-mobile.handlebars->9->312",
5219 - "default-mobile.handlebars->9->330",
5215 + "default-mobile.handlebars->9->313",
5216 + "default-mobile.handlebars->9->331",
5217 "default.handlebars->25->1266",
5218 "default.handlebars->25->1300"
5219 ]
@@ -5489,10 +5486,10 @@
5486 "zh-chs": "明確",
5487 "xloc": [
5488 "default-mobile.handlebars->9->101",
5492 - "default-mobile.handlebars->9->267",
5493 - "default-mobile.handlebars->9->269",
5494 - "default-mobile.handlebars->9->271",
5495 - "default-mobile.handlebars->9->273",
5489 + "default-mobile.handlebars->9->268",
5490 + "default-mobile.handlebars->9->270",
5491 + "default-mobile.handlebars->9->272",
5492 + "default-mobile.handlebars->9->274",
5493 "default-mobile.handlebars->9->28",
5494 "default.handlebars->25->1381",
5495 "default.handlebars->25->753",
@@ -5887,7 +5884,7 @@
5884 "zh-chs": "確認",
5885 "xloc": [
5886 "default-mobile.handlebars->9->230",
5890 - "default-mobile.handlebars->9->292",
5887 + "default-mobile.handlebars->9->293",
5888 "default.handlebars->25->1217",
5889 "default.handlebars->25->1430",
5890 "default.handlebars->25->1495",
@@ -5912,7 +5909,7 @@
5909 "ru": "Подтвердить копирование 1 записи в это расположение?",
5910 "zh-chs": "確認將1個副本複製到此位置?",
5911 "xloc": [
5915 - "default-mobile.handlebars->9->262",
5912 + "default-mobile.handlebars->9->263",
5913 "default.handlebars->25->748"
5914 ]
5915 },
@@ -5930,7 +5927,7 @@
5927 "ru": "Подтвердить копирование {0} записей в это расположение?",
5928 "zh-chs": "確認{0}個條目的副本到此位置?",
5929 "xloc": [
5933 - "default-mobile.handlebars->9->261",
5930 + "default-mobile.handlebars->9->262",
5931 "default.handlebars->25->747"
5932 ]
5933 },
@@ -6038,7 +6035,7 @@
6035 "ru": "Подтвердить перемещение 1 записи в это расположение?",
6036 "zh-chs": "確認將1個入口移動到此位置?",
6037 "xloc": [
6041 - "default-mobile.handlebars->9->264",
6038 + "default-mobile.handlebars->9->265",
6039 "default.handlebars->25->750"
6040 ]
6041 },
@@ -6056,7 +6053,7 @@
6053 "ru": "Подтвердить перемещение {0} записей в это расположение?",
6054 "zh-chs": "確認將{0}個條目移到此位置?",
6055 "xloc": [
6059 - "default-mobile.handlebars->9->263",
6056 + "default-mobile.handlebars->9->264",
6057 "default.handlebars->25->749"
6058 ]
6059 },
@@ -6262,7 +6259,7 @@
6259 "ru": "Подтвердить удаление пользователя {0}?",
6260 "zh-chs": "確認刪除用戶{0}?",
6261 "xloc": [
6265 - "default-mobile.handlebars->9->338"
6262 + "default-mobile.handlebars->9->339"
6263 ]
6264 },
6265 {
@@ -6279,7 +6276,7 @@
6276 "ru": "Подключиться",
6277 "zh-chs": "連接",
6278 "xloc": [
6282 - "default-mobile.handlebars->9->244",
6279 + "default-mobile.handlebars->9->245",
6280 "default-mobile.handlebars->container->page_content->column_l->p10->p10desktop->deskarea1->1->3",
6281 "default-mobile.handlebars->container->page_content->column_l->p10->p10files->p13toolbar->1->0->1->3",
6282 "default.handlebars->25->1156",
@@ -6463,7 +6460,7 @@
6460 "zh-chs": "正在連線...",
6461 "xloc": [
6462 "default-mobile.handlebars->9->2",
6466 - "default-mobile.handlebars->9->277",
6463 + "default-mobile.handlebars->9->278",
6464 "default-mobile.handlebars->9->6",
6465 "default.handlebars->25->204",
6466 "default.handlebars->25->207",
@@ -7422,7 +7419,7 @@
7419 "ru": "Удалить",
7420 "zh-chs": "刪除",
7421 "xloc": [
7425 - "default-mobile.handlebars->9->254",
7422 + "default-mobile.handlebars->9->255",
7423 "default-mobile.handlebars->9->91",
7424 "default-mobile.handlebars->container->page_content->column_l->p10->p10files->p13toolbar->1->2->1->1",
7425 "default-mobile.handlebars->container->page_content->column_l->p5->p5myfiles->p5toolbar->1->0->1->1",
@@ -7501,8 +7498,8 @@
7498 "ru": "Удалить группу",
7499 "zh-chs": "刪除群組",
7500 "xloc": [
7504 - "default-mobile.handlebars->9->290",
7505 - "default-mobile.handlebars->9->293",
7501 + "default-mobile.handlebars->9->291",
7502 + "default-mobile.handlebars->9->294",
7503 "default.handlebars->25->1188",
7504 "default.handlebars->25->1218"
7505 ]
@@ -7689,7 +7686,7 @@
7686 "ru": "Удалить выбранные элементы?",
7687 "zh-chs": "刪除所選項目?",
7688 "xloc": [
7692 - "default-mobile.handlebars->9->256",
7689 + "default-mobile.handlebars->9->257",
7690 "default-mobile.handlebars->9->93",
7691 "default.handlebars->25->1372",
7692 "default.handlebars->25->742"
@@ -7726,7 +7723,7 @@
7723 "ru": "Удалить {0} выбранных элементов?",
7724 "zh-chs": "刪除{0}個所選項目?",
7725 "xloc": [
7729 - "default-mobile.handlebars->9->255",
7726 + "default-mobile.handlebars->9->256",
7727 "default-mobile.handlebars->9->92",
7728 "default.handlebars->25->1371",
7729 "default.handlebars->25->741"
@@ -7839,8 +7836,8 @@
7836 "default-mobile.handlebars->9->151",
7837 "default-mobile.handlebars->9->152",
7838 "default-mobile.handlebars->9->234",
7842 - "default-mobile.handlebars->9->282",
7843 - "default-mobile.handlebars->9->295",
7839 + "default-mobile.handlebars->9->283",
7840 + "default-mobile.handlebars->9->296",
7841 "default-mobile.handlebars->9->70",
7842 "default.handlebars->25->1111",
7843 "default.handlebars->25->1137",
@@ -8126,7 +8123,7 @@
8123 "ru": "Пользователь группы устройств",
8124 "zh-chs": "設備組用戶",
8125 "xloc": [
8129 - "default-mobile.handlebars->9->336",
8126 + "default-mobile.handlebars->9->337",
8127 "default.handlebars->25->1307"
8128 ]
8129 },
@@ -8620,7 +8617,7 @@
8617 "ru": "Разъединить",
8618 "zh-chs": "斷開",
8619 "xloc": [
8623 - "default-mobile.handlebars->9->245",
8620 + "default-mobile.handlebars->9->246",
8621 "default-mobile.handlebars->container->page_content->column_l->p10->p10desktop->deskarea1->1->3",
8622 "default.handlebars->25->1157",
8623 "default.handlebars->25->731",
@@ -8881,7 +8878,7 @@
8878 "ru": "Скачать файл",
8879 "zh-chs": "下載文件",
8880 "xloc": [
8884 - "default-mobile.handlebars->9->275",
8881 + "default-mobile.handlebars->9->276",
8882 "default.handlebars->25->760"
8883 ]
8884 },
@@ -9529,9 +9526,9 @@
9526 "ru": "Редактировать группу устройств",
9527 "zh-chs": "編輯設備組",
9528 "xloc": [
9532 - "default-mobile.handlebars->9->296",
9533 - "default-mobile.handlebars->9->298",
9534 - "default-mobile.handlebars->9->316",
9529 + "default-mobile.handlebars->9->297",
9530 + "default-mobile.handlebars->9->299",
9531 + "default-mobile.handlebars->9->317",
9532 "default.handlebars->25->1221",
9533 "default.handlebars->25->1251",
9534 "default.handlebars->25->1273",
@@ -9604,7 +9601,7 @@
9601 "ru": "Редактировать примечания устройства",
9602 "zh-chs": "編輯設備說明",
9603 "xloc": [
9607 - "default-mobile.handlebars->9->310",
9604 + "default-mobile.handlebars->9->311",
9605 "default.handlebars->25->1264"
9606 ]
9607 },
@@ -9689,7 +9686,7 @@
9686 "ru": "Редактировать примечания",
9687 "zh-chs": "編輯筆記",
9688 "xloc": [
9692 - "default-mobile.handlebars->9->323",
9689 + "default-mobile.handlebars->9->324",
9690 "default.handlebars->25->1292"
9691 ]
9692 },
@@ -10861,7 +10858,7 @@
10858 "ru": "Редактор файлов",
10859 "zh-chs": "文件編輯器",
10860 "xloc": [
10864 - "default-mobile.handlebars->9->259",
10861 + "default-mobile.handlebars->9->260",
10862 "default.handlebars->25->424",
10863 "default.handlebars->25->745"
10864 ]
@@ -11407,9 +11404,9 @@
11404 "ru": "Администратор с полным доступом",
11405 "zh-chs": "正式管理員",
11406 "xloc": [
11410 - "default-mobile.handlebars->9->288",
11411 - "default-mobile.handlebars->9->297",
11412 - "default-mobile.handlebars->9->315",
11407 + "default-mobile.handlebars->9->289",
11408 + "default-mobile.handlebars->9->298",
11409 + "default-mobile.handlebars->9->316",
11410 "default-mobile.handlebars->9->74",
11411 "default.handlebars->25->1120",
11412 "default.handlebars->25->1250",
@@ -12325,7 +12322,7 @@
12322 "ru": "Задержана 1 запись для копирования",
12323 "zh-chs": "持有1份副本",
12324 "xloc": [
12328 - "default-mobile.handlebars->9->268",
12325 + "default-mobile.handlebars->9->269",
12326 "default.handlebars->25->754"
12327 ]
12328 },
@@ -12343,7 +12340,7 @@
12340 "ru": "Задержана 1 запись для перемещения",
12341 "zh-chs": "持有1個搬家公司",
12342 "xloc": [
12346 - "default-mobile.handlebars->9->272",
12343 + "default-mobile.handlebars->9->273",
12344 "default.handlebars->25->758"
12345 ]
12346 },
@@ -12361,7 +12358,7 @@
12358 "ru": "Задержано {0} записей для копирования",
12359 "zh-chs": "保留{0}個條目進行複制",
12360 "xloc": [
12364 - "default-mobile.handlebars->9->266",
12361 + "default-mobile.handlebars->9->267",
12362 "default.handlebars->25->752"
12363 ]
12364 },
@@ -12379,7 +12376,7 @@
12376 "ru": "Задержано {0} записей для перемещения",
12377 "zh-chs": "保留{0}個條目以進行移動",
12378 "xloc": [
12382 - "default-mobile.handlebars->9->270",
12379 + "default-mobile.handlebars->9->271",
12380 "default.handlebars->25->756"
12381 ]
12382 },
@@ -12799,7 +12796,7 @@
12796 "ru": "Ввод",
12797 "zh-chs": "輸入值",
12798 "xloc": [
12802 - "default-mobile.handlebars->container->page_content->column_l->p10->p10desktop->deskarea4->1->3->11->DeskControlSpan",
12799 + "default-mobile.handlebars->container->page_content->column_l->p10->p10desktop->deskarea4->1->3->13->DeskControlSpan",
12800 "default.handlebars->container->column_l->p11->deskarea0->deskarea4->3->9->DeskControlSpan"
12801 ]
12802 },
@@ -13398,7 +13395,7 @@
13395 "ru": "Только Intel&reg; AMT, без агента",
13396 "zh-chs": "僅限英特爾&reg;AMT,無代理",
13397 "xloc": [
13401 - "default-mobile.handlebars->9->279",
13398 + "default-mobile.handlebars->9->280",
13399 "default.handlebars->25->1110",
13400 "default.handlebars->25->1134"
13401 ]
@@ -14192,6 +14189,12 @@
14189 "default-mobile.handlebars->container->page_content->column_l->p10->p10desktop->deskarea4->1->3"
14190 ]
14191 },
14192 + {
14193 + "en": "Keys",
14194 + "xloc": [
14195 + "default-mobile.handlebars->container->page_content->column_l->p10->p10desktop->deskarea4->1->3"
14196 + ]
14197 + },
14198 {
14199 "cs": "khmerština",
14200 "de": "Khmer",
@@ -14893,7 +14896,7 @@
14896 "ru": "Ограниченный ввод",
14897 "zh-chs": "有限輸入",
14898 "xloc": [
14896 - "default-mobile.handlebars->9->328",
14899 + "default-mobile.handlebars->9->329",
14900 "default.handlebars->25->1298",
14901 "default.handlebars->25->570",
14902 "default.handlebars->25->589"
@@ -14913,7 +14916,7 @@
14916 "ru": "Ограничить элементы ввода",
14917 "zh-chs": "僅限於輸入",
14918 "xloc": [
14916 - "default-mobile.handlebars->9->303",
14919 + "default-mobile.handlebars->9->304",
14920 "default.handlebars->25->1256"
14921 ]
14922 },
@@ -16024,8 +16027,8 @@
16027 "ru": "Управление компьютерами группы устройств",
16028 "zh-chs": "管理設備組計算機",
16029 "xloc": [
16027 - "default-mobile.handlebars->9->300",
16028 - "default-mobile.handlebars->9->318",
16030 + "default-mobile.handlebars->9->301",
16031 + "default-mobile.handlebars->9->319",
16032 "default.handlebars->25->1253",
16033 "default.handlebars->25->1287"
16034 ]
@@ -16044,8 +16047,8 @@
16047 "ru": "Управление пользователями группы устройств",
16048 "zh-chs": "管理設備組用戶",
16049 "xloc": [
16047 - "default-mobile.handlebars->9->299",
16048 - "default-mobile.handlebars->9->317",
16050 + "default-mobile.handlebars->9->300",
16051 + "default-mobile.handlebars->9->318",
16052 "default.handlebars->25->1252",
16053 "default.handlebars->25->1286"
16054 ]
@@ -16243,7 +16246,7 @@
16246 "ru": "Управляется с помощью программного агента",
16247 "zh-chs": "使用軟件代理進行管理",
16248 "xloc": [
16246 - "default-mobile.handlebars->9->280",
16249 + "default-mobile.handlebars->9->281",
16250 "default.handlebars->25->1135"
16251 ]
16252 },
@@ -16480,7 +16483,7 @@
16483 "ru": "Консоль Mesh Agent",
16484 "zh-chs": "網格代理控制台",
16485 "xloc": [
16483 - "default-mobile.handlebars->9->307",
16486 + "default-mobile.handlebars->9->308",
16487 "default.handlebars->25->1261"
16488 ]
16489 },
@@ -17439,8 +17442,8 @@
17442 "zh-chs": "名稱",
17443 "xloc": [
17444 "default-mobile.handlebars->9->145",
17442 - "default-mobile.handlebars->9->281",
17443 - "default-mobile.handlebars->9->294",
17445 + "default-mobile.handlebars->9->282",
17446 + "default-mobile.handlebars->9->295",
17447 "default-mobile.handlebars->9->66",
17448 "default-mobile.handlebars->container->page_content->column_l->p10->p10desktop->deskarea3->deskarea3x->DeskTools->5->1->1",
17449 "default.handlebars->25->1107",
@@ -17664,7 +17667,7 @@
17667 "ru": "Новая папка",
17668 "zh-chs": "新建文件夾",
17669 "xloc": [
17667 - "default-mobile.handlebars->9->252",
17670 + "default-mobile.handlebars->9->253",
17671 "default-mobile.handlebars->9->89",
17672 "default.handlebars->25->1368",
17673 "default.handlebars->25->738",
@@ -17864,7 +17867,7 @@
17867 "ru": "Нет доступа к файлам",
17868 "zh-chs": "沒有文件訪問",
17869 "xloc": [
17867 - "default-mobile.handlebars->9->305",
17870 + "default-mobile.handlebars->9->306",
17871 "default.handlebars->25->1259"
17872 ]
17873 },
@@ -17882,7 +17885,7 @@
17885 "ru": "Файлов нет",
17886 "zh-chs": "沒有文件",
17887 "xloc": [
17885 - "default-mobile.handlebars->9->326",
17888 + "default-mobile.handlebars->9->327",
17889 "default.handlebars->25->1296",
17890 "default.handlebars->25->568",
17891 "default.handlebars->25->587"
@@ -17919,8 +17922,8 @@
17922 "ru": "Нет Intel&reg; AMT",
17923 "zh-chs": "沒有英特爾&reg;AMT",
17924 "xloc": [
17922 - "default-mobile.handlebars->9->306",
17923 - "default-mobile.handlebars->9->327",
17925 + "default-mobile.handlebars->9->307",
17926 + "default-mobile.handlebars->9->328",
17927 "default.handlebars->25->1260",
17928 "default.handlebars->25->1297"
17929 ]
@@ -18043,8 +18046,8 @@
18046 "ru": "Нет прав",
18047 "zh-chs": "沒有權利",
18048 "xloc": [
18046 - "default-mobile.handlebars->9->289",
18047 - "default-mobile.handlebars->9->332",
18049 + "default-mobile.handlebars->9->290",
18050 + "default-mobile.handlebars->9->333",
18051 "default-mobile.handlebars->9->75",
18052 "default.handlebars->25->1121",
18053 "default.handlebars->25->1302",
@@ -18085,7 +18088,7 @@
18088 "ru": "Нет терминала",
18089 "zh-chs": "沒有終端",
18090 "xloc": [
18088 - "default-mobile.handlebars->9->325",
18091 + "default-mobile.handlebars->9->326",
18092 "default.handlebars->25->1295",
18093 "default.handlebars->25->567",
18094 "default.handlebars->25->586"
@@ -18105,7 +18108,7 @@
18108 "ru": "Нет доступа к терминалу",
18109 "zh-chs": "沒有終端訪問",
18110 "xloc": [
18108 - "default-mobile.handlebars->9->304",
18111 + "default-mobile.handlebars->9->305",
18112 "default.handlebars->25->1258"
18113 ]
18114 },
@@ -18534,8 +18537,8 @@
18537 "default-mobile.handlebars->9->148",
18538 "default-mobile.handlebars->9->150",
18539 "default-mobile.handlebars->9->206",
18537 - "default-mobile.handlebars->9->250",
18538 - "default-mobile.handlebars->9->283",
18540 + "default-mobile.handlebars->9->251",
18541 + "default-mobile.handlebars->9->284",
18542 "default-mobile.handlebars->9->85",
18543 "default.handlebars->25->1131",
18544 "default.handlebars->25->1138",
@@ -19075,7 +19078,7 @@
19078 "ru": "Редактировать файлы можно только размером менее 200КБ.",
19079 "zh-chs": "只能編輯小於200k的文件。",
19080 "xloc": [
19078 - "default-mobile.handlebars->9->260",
19081 + "default-mobile.handlebars->9->261",
19082 "default.handlebars->25->425",
19083 "default.handlebars->25->746"
19084 ]
@@ -19443,7 +19446,7 @@
19446 "ru": "Частичные права",
19447 "zh-chs": "部分權利",
19448 "xloc": [
19446 - "default-mobile.handlebars->9->287",
19449 + "default-mobile.handlebars->9->288",
19450 "default-mobile.handlebars->9->73",
19451 "default.handlebars->25->1119"
19452 ]
@@ -19730,7 +19733,7 @@
19733 "ru": "Вставить",
19734 "zh-chs": "糊",
19735 "xloc": [
19733 - "default-mobile.handlebars->9->265",
19736 + "default-mobile.handlebars->9->266",
19737 "default-mobile.handlebars->9->97",
19738 "default-mobile.handlebars->container->page_content->column_l->p10->p10files->p13toolbar->1->2->1->3",
19739 "default-mobile.handlebars->container->page_content->column_l->p5->p5myfiles->p5toolbar->1->0->1->3",
@@ -19897,7 +19900,7 @@
19900 "ru": "Права",
19901 "zh-chs": "權限",
19902 "xloc": [
19900 - "default-mobile.handlebars->9->334",
19903 + "default-mobile.handlebars->9->335",
19904 "default.handlebars->25->1305",
19905 "default.handlebars->25->1398"
19906 ]
@@ -20462,7 +20465,7 @@
20465 "ru": "Управление процессами",
20466 "zh-chs": "過程控制",
20467 "xloc": [
20465 - "default-mobile.handlebars->9->242",
20468 + "default-mobile.handlebars->9->243",
20469 "default.handlebars->25->716"
20470 ]
20471 },
@@ -20943,7 +20946,7 @@
20946 "ru": "Рекурсивное удаление",
20947 "zh-chs": "遞歸刪除",
20948 "xloc": [
20946 - "default-mobile.handlebars->9->253",
20949 + "default-mobile.handlebars->9->254",
20950 "default-mobile.handlebars->9->90",
20951 "default.handlebars->25->1369",
20952 "default.handlebars->25->739"
@@ -21205,8 +21208,8 @@
21208 "ru": "Удаленное управление",
21209 "zh-chs": "遙控",
21210 "xloc": [
21208 - "default-mobile.handlebars->9->301",
21209 - "default-mobile.handlebars->9->319",
21211 + "default-mobile.handlebars->9->302",
21212 + "default-mobile.handlebars->9->320",
21213 "default.handlebars->25->1254",
21214 "default.handlebars->25->1288"
21215 ]
@@ -21261,7 +21264,7 @@
21264 "ru": "Удаленный пользователь Mesh",
21265 "zh-chs": "遠程網狀用戶",
21266 "xloc": [
21264 - "default-mobile.handlebars->9->337"
21267 + "default-mobile.handlebars->9->338"
21268 ]
21269 },
21270 {
@@ -21292,8 +21295,8 @@
21295 "ru": "Только просмотр экрана без ввода",
21296 "zh-chs": "僅遠程查看",
21297 "xloc": [
21295 - "default-mobile.handlebars->9->302",
21296 - "default-mobile.handlebars->9->324",
21298 + "default-mobile.handlebars->9->303",
21299 + "default-mobile.handlebars->9->325",
21300 "default.handlebars->25->1255",
21301 "default.handlebars->25->1293"
21302 ]
@@ -21678,7 +21681,7 @@
21681 "ru": "Переименовать",
21682 "zh-chs": "改名",
21683 "xloc": [
21681 - "default-mobile.handlebars->9->257",
21684 + "default-mobile.handlebars->9->258",
21685 "default-mobile.handlebars->9->94",
21686 "default-mobile.handlebars->container->page_content->column_l->p10->p10files->p13toolbar->1->2->1->1",
21687 "default-mobile.handlebars->container->page_content->column_l->p5->p5myfiles->p5toolbar->1->0->1->1",
@@ -22033,7 +22036,7 @@
22036 "ru": "Root/Корень",
22037 "zh-chs": "根",
22038 "xloc": [
22036 - "default-mobile.handlebars->9->247",
22039 + "default-mobile.handlebars->9->248",
22040 "default-mobile.handlebars->9->76",
22041 "default.handlebars->25->1346",
22042 "default.handlebars->25->733"
@@ -22481,6 +22484,24 @@
22484 "default.handlebars->25->250"
22485 ]
22486 },
22487 + {
22488 + "en": "Screen",
22489 + "xloc": [
22490 + "default-mobile.handlebars->9->241"
22491 + ]
22492 + },
22493 + {
22494 + "en": "Screen Selection",
22495 + "xloc": [
22496 + "default-mobile.handlebars->9->242"
22497 + ]
22498 + },
22499 + {
22500 + "en": "Screens",
22501 + "xloc": [
22502 + "default-mobile.handlebars->container->page_content->column_l->p10->p10desktop->deskarea4->1->3"
22503 + ]
22504 + },
22505 {
22506 "cs": "Hledat",
22507 "de": "Suche",
@@ -22808,7 +22829,7 @@
22829 "ru": "Только собственные события",
22830 "zh-chs": "僅自我事件",
22831 "xloc": [
22811 - "default-mobile.handlebars->9->329",
22832 + "default-mobile.handlebars->9->330",
22833 "default.handlebars->25->1299"
22834 ]
22835 },
@@ -23141,8 +23162,8 @@
23162 "ru": "Серверные файлы",
23163 "zh-chs": "服務器文件",
23164 "xloc": [
23144 - "default-mobile.handlebars->9->308",
23145 - "default-mobile.handlebars->9->321",
23165 + "default-mobile.handlebars->9->309",
23166 + "default-mobile.handlebars->9->322",
23167 "default.handlebars->25->1262",
23168 "default.handlebars->25->1290",
23169 "default.handlebars->25->1470",
@@ -23740,7 +23761,7 @@
23761 "ru": "Показывать только собственные события",
23762 "zh-chs": "只顯示自己的事件",
23763 "xloc": [
23743 - "default-mobile.handlebars->9->311",
23764 + "default-mobile.handlebars->9->312",
23765 "default.handlebars->25->1265"
23766 ]
23767 },
@@ -24688,8 +24709,7 @@
24709 "ru": "Специальные клавиши",
24710 "zh-chs": "特殊鍵",
24711 "xloc": [
24691 - "default-mobile.handlebars->9->240",
24692 - "default-mobile.handlebars->container->page_content->column_l->p10->p10desktop->deskarea4->1->3"
24712 + "default-mobile.handlebars->9->240"
24713 ]
24714 },
24715 {
@@ -24833,7 +24853,7 @@
24853 "ru": "Прервать процесс #{0} \\\"{1}\\\"?",
24854 "zh-chs": "停止進程#{0} \\“ {1} \\”?",
24855 "xloc": [
24836 - "default-mobile.handlebars->9->243",
24856 + "default-mobile.handlebars->9->244",
24857 "default.handlebars->25->717"
24858 ]
24859 },
@@ -26439,7 +26459,7 @@
26459 "ru": "Удаленный ввод",
26460 "zh-chs": "類型",
26461 "xloc": [
26442 - "default-mobile.handlebars->9->284",
26462 + "default-mobile.handlebars->9->285",
26463 "default-mobile.handlebars->9->67",
26464 "default.handlebars->25->1108",
26465 "default.handlebars->25->1139",
@@ -26692,7 +26712,7 @@
26712 "ru": "Удаление",
26713 "zh-chs": "卸載",
26714 "xloc": [
26695 - "default-mobile.handlebars->9->331",
26715 + "default-mobile.handlebars->9->332",
26716 "default.handlebars->25->1301",
26717 "default.handlebars->25->579",
26718 "default.handlebars->25->598"
@@ -26712,7 +26732,7 @@
26732 "ru": "Удаление агента",
26733 "zh-chs": "卸載代理",
26734 "xloc": [
26715 - "default-mobile.handlebars->9->313",
26735 + "default-mobile.handlebars->9->314",
26736 "default.handlebars->25->1267",
26737 "default.handlebars->25->383",
26738 "default.handlebars->25->612"
@@ -26783,7 +26803,7 @@
26803 "ru": "Неизвестно #{0}",
26804 "zh-chs": "未知#{0}",
26805 "xloc": [
26786 - "default-mobile.handlebars->9->278",
26806 + "default-mobile.handlebars->9->279",
26807 "default.handlebars->25->1133"
26808 ]
26809 },
@@ -27016,8 +27036,8 @@
27036 "ru": "Загрузить файл",
27037 "zh-chs": "上傳文件",
27038 "xloc": [
27019 - "default-mobile.handlebars->9->258",
27020 - "default-mobile.handlebars->9->276",
27039 + "default-mobile.handlebars->9->259",
27040 + "default-mobile.handlebars->9->277",
27041 "default-mobile.handlebars->9->95",
27042 "default.handlebars->25->1374",
27043 "default.handlebars->25->1382",
@@ -27246,7 +27266,7 @@
27266 "ru": "Пользователь",
27267 "zh-chs": "用戶",
27268 "xloc": [
27249 - "default-mobile.handlebars->9->333",
27269 + "default-mobile.handlebars->9->334",
27270 "default.handlebars->25->1187",
27271 "default.handlebars->25->1410",
27272 "default.handlebars->25->1516",
@@ -27323,7 +27343,7 @@
27343 "ru": "Полномочия пользователя",
27344 "zh-chs": "用戶授權",
27345 "xloc": [
27326 - "default-mobile.handlebars->9->286",
27346 + "default-mobile.handlebars->9->287",
27347 "default.handlebars->25->1185",
27348 "default.handlebars->25->559"
27349 ]
@@ -28133,8 +28153,8 @@
28153 "ru": "Разбудить устройства",
28154 "zh-chs": "喚醒設備",
28155 "xloc": [
28136 - "default-mobile.handlebars->9->309",
28137 - "default-mobile.handlebars->9->322",
28156 + "default-mobile.handlebars->9->310",
28157 + "default-mobile.handlebars->9->323",
28158 "default.handlebars->25->1263",
28159 "default.handlebars->25->1291"
28160 ]
views/default-mobile.handlebars
+20 -16
@@ -415,7 +415,6 @@
415 <div id=deskarea4 style="position:absolute;bottom:0px;width:100%;height:25px">
416 <div style=padding-top:2px;padding-bottom:2px;background:#C0C0C0>
417 <div style=float:right;text-align:right>
418 - <select id=termdisplays style=display:none onchange=deskSetDisplay(event) onclick=deskGetDisplayNumbers(event)></select>&nbsp;
418 <span id=DeskToastButton><img src='images/icon-notify.png' onclick=deviceToastFunction() height=16 width=16 style=padding-top:2px /></span>&nbsp;
419 <!--<input id=DeskToolsButton type=button value=Tools onkeypress="return false" onkeydown="return false" onclick="toggleDeskTools()">&nbsp;-->
420 </div>
@@ -423,8 +422,9 @@
422 <input id="deskActionsBtn" type=button style="margin-left:3px" onkeypress="return false" onkeydown="return false" value=Actions onclick=deviceActionFunction() />
423 <input type="button" value="Settings" onkeypress="return false" onkeydown="return false" onclick="showDesktopSettings()">
424 <input type="button" onkeypress="return false" onkeydown="return false" value="Power Actions..." onclick="showPowerActionDlg()" style="display:none">
426 - <input id="DeskSpecialKeys" type="button" value="Special Keys" onkeypress="return false" onkeydown="return false" onclick="sendSpecialKeys()">
427 - <input id="DeskSoftKeys" type="button" value="Keyboard" onkeypress="return false" onkeydown="return false" onclick="toggleSoftKeys(1)">
425 + <input type="button" id="DeskSpecialKeys" value="Keys" onkeypress="return false" onkeydown="return false" onclick="sendSpecialKeys()">
426 + <input type="button" id="DeskSoftKeys" value="Keyboard" onkeypress="return false" onkeydown="return false" onclick="toggleSoftKeys(1)">
427 + <input type="button" id="DeskScreens" value="Screens" onkeypress="return false" onkeydown="return false" onclick="deskSelectScreens()" style="display:none">
428 <label><span id="DeskControlSpan" style="display:none"><input id="DeskControl" type="checkbox" onkeypress="return false" onkeydown="return false">Input</span></label>
429 </div>
430 </div>
@@ -2482,7 +2482,7 @@
2482 // Disconnect and clean up the remote desktop
2483 desktop.Stop();
2484 desktopNode = desktop = null;
2485 - QV('termdisplays', false);
2485 + QV('DeskScreens', false);
2486 if (fullscreen == true) { deskToggleFull(); }
2487 break;
2488 case 2:
@@ -2711,7 +2711,6 @@
2711 if (Q('DeskTools').nodeid != message.nodeid) return;
2712 var p = [], processes = null;
2713 try { processes = JSON.parse(message.value); } catch (e) { }
2714 - console.log(processes);
2714 if (processes != null) {
2715 for (var pid in processes) { p.push({ p: parseInt(pid), c: processes[pid].cmd, d: processes[pid].cmd.toLowerCase(), u: processes[pid].user }); }
2716 if (deskTools.sort == 0) { p.sort(sortProcessPid); } else if (deskTools.sort == 1) { p.sort(sortProcessName); }
@@ -2726,22 +2725,26 @@
2725 setSessionActivity();
2726 if (xxdialogMode || desktop == null || desktop.State != 3) return;
2727 var d = new Date(), n = 'Desktop-' + currentNode.name + '-' + d.getFullYear() + '-' + ('0' + (d.getMonth() + 1)).slice(-2) + '-' + ('0' + d.getDate()).slice(-2) + '-' + ('0' + d.getHours()).slice(-2) + '-' + ('0' + d.getMinutes()).slice(-2);
2729 - Q('Desk')['toBlob'](function (blob) { saveAs(blob, n + '.jpg'); });
2728 + Q('Desk')['toBlob'](function (blob) { saveAs(blob, n + '.png'); });
2729 }
2730
2732 - function deskDisplayInfo(sender, info, selDisplay, selItem) {
2733 - var txt = Q('termdisplays').value;
2734 - if (info.length > 0) { var options = ''; for (var x in info) { options += '<option' + ((txt == info[x]) ? ' selected' : '') + '>' + info[x] + '</option>'; } QH('termdisplays', options); }
2735 - QV('termdisplays', info.length > 0);
2731 + function deskSelectScreens() {
2732 + if (xxdialogMode || desktop == null || desktop.State != 3) return;
2733 + var x = '', info = desktop.m.displays;
2734 + for (var i in info) { x += '<option value=' + i + ' ' + ((desktop.m.selectedDisplay == i) ? ' selected' : '') + '>' + info[i] + '</option>'; }
2735 + x = addHtmlValue4("Screen", '<select style=width:100% id=deskdisplays>' + x + '</select>');
2736 + setDialogMode(2, "Screen Selection", 3, deskSelectScreensEx, x);
2737 }
2738
2738 - function deskGetDisplayNumbers(e) { desktop.m.GetDisplayNumbers(); }
2739 + function deskSelectScreensEx() {
2740 + if (desktop == null || desktop.State != 3) return;
2741 + desktop.m.SetDisplay(parseInt(Q('deskdisplays').value));
2742 + }
2743
2740 - function deskSetDisplay(e) {
2741 - setSessionActivity();
2742 - var display = 0, txt = Q('termdisplays').value;
2743 - if (txt == "All Displays") display = 65535; else display = parseInt(txt.substring(8));
2744 - desktop.m.SetDisplay(display);
2744 + function deskDisplayInfo(sender, info, selDisplay, selItem) {
2745 + var displayCount = 0;
2746 + for (var x in info) { displayCount++; }
2747 + QV('DeskScreens', displayCount > 1);
2748 }
2749
2750 function dmousedown(e) { setSessionActivity(); if ((!xxdialogMode && desktop != null)) desktop.m.mousedown(e) }
@@ -3652,6 +3655,7 @@
3655 function getNodeFromId(id) { for (var i in nodes) { if (nodes[i]._id == id) return nodes[i]; } return null; }
3656 function addHtmlValue(t, v) { return '<table><td style=width:120px>' + t + '<td><b>' + v + '</b></table>'; }
3657 function addHtmlValue2(t, v) { return '<div><div style=display:inline-block;float:right>' + v + '</div><div style=display:inline-block>' + t + '</div></div>'; }
3658 + function addHtmlValue4(t, v) { return '<table style=width:100%><td style=width:120px>' + t + '<td style=text-align:right><b>' + v + '</b></table>'; }
3659 function addLink(x, f) { return '<a style=cursor:pointer;color:darkblue;text-decoration:none onclick=\'' + f + '\'>&diams; ' + x + '</a>'; }
3660 function addLinkConditional(x, f, c) { if (c) return addLink(x, f); return x; }
3661 function passwordcheck(p) { var re = /(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()]).{8,}/; return re.test(p); }