diff --git a/public/images/icon-play.png b/public/images/icon-play.png new file mode 100644 index 00000000..3459b926 Binary files /dev/null and b/public/images/icon-play.png differ diff --git a/public/styles/style.css b/public/styles/style.css index cadde009..9edfe95a 100644 --- a/public/styles/style.css +++ b/public/styles/style.css @@ -2654,7 +2654,7 @@ a { -ms-grid-row: 4; } -#DeskChatButton, #DeskNotifyButton, #DeskOpenWebButton, #DeskBackgroundButton, #DeskSaveImageButton, #DeskRecordButton, #DeskClipboardInButton, #DeskClipboardOutButton, #DeskRefreshButton, #DeskLockButton, #DeskInputLockedButton, #DeskInputUnLockedButton, #DeskGuestShareButton, #DeskMonitorSelectionSpan { +#DeskRunButton, #DeskChatButton, #DeskNotifyButton, #DeskOpenWebButton, #DeskBackgroundButton, #DeskSaveImageButton, #DeskRecordButton, #DeskClipboardInButton, #DeskClipboardOutButton, #DeskRefreshButton, #DeskLockButton, #DeskInputLockedButton, #DeskInputUnLockedButton, #DeskGuestShareButton, #DeskMonitorSelectionSpan { float: right; margin-top: 1px; margin-right: 4px; diff --git a/views/default.handlebars b/views/default.handlebars index 70856a05..9398a0e8 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -703,6 +703,7 @@   + @@ -5717,17 +5718,21 @@ if (n.agent) { if ((GetNodeRights(n) & 24) == 24) { agenttype = true; } if ((n.agent.id > 0) && (n.agent.id < 5)) { wintype = true; } else { linuxtype = true; } } } if ((wintype == true) || (linuxtype == true) || (agenttype == true)) { + // Fetch run options + var runopt = { type:1, runAs:0, source:1, cmd:'' }; + try { runopt = JSON.parse(getstore('runopt', runopt)); } catch (ex) {} + var x = ''; if (options.title) { x += options.title + '
'; } x += ''; - x += ''; - x += ''; + x += ''; + x += ''; x += ''; x += ''; setDialogMode(2, "Run Commands", 3, d2groupActionFunctionRunCommands, x, options); @@ -5749,6 +5754,7 @@ function d2groupActionFunctionRunCommands(b, options) { var type = 3; try { type = parseInt(Q('d2cmdtype').value); } catch (ex) { } + putstore('runopt', JSON.stringify({ type: type, runAs: parseInt(Q('d2cmduser').value), source: parseInt(Q('d2cmdsource').value), cmd: encodeURIComponent(Q('d2runcmd').value) })); // Save run options var cmd = { action: 'runcommands', nodeids: options.nodeids, type: type, runAsUser: parseInt(Q('d2cmduser').value) }; if (Q('d2cmdsource').value == 0) { // From text box @@ -7668,7 +7674,7 @@ } // Run commands on current device - function runDeviceCmd(nodeid) { if (xxdialogMode) return; d2runCommandDialog({ nodeids: [ decodeURIComponent(nodeid) ] }); } + function runDeviceCmd(nodeid) { if (xxdialogMode) return; d2runCommandDialog({ nodeids: [ decodeURIComponent(nodeid ? nodeid : currentNode._id) ] }); } function writeDeviceEvent(nodeid) { if (xxdialogMode) return; @@ -8602,6 +8608,7 @@ } // Display this only if we have Chat & Notify permissions + QV('DeskRunButton', ((rights & 131072) != 0) && online); QV('DeskSaveImageButton', (deskState == 3) && (Q('Desk')['toBlob'] != null) && ((features2 & 0x400) == 0)); QV('DeskRecordButton', (deskState == 3) && (Q('Desk')['toBlob'] != null) && (desktop.m.StartRecording != null) && ((features2 & 0x400) == 0)); QV('DeskChatButton', ((rights & 16384) != 0) && (browserfullscreen == false) && (inputAllowed) && (currentNode.agent) && online);