mirror of
https://github.com/openstf/stf
synced 2025-10-05 10:39:25 +02:00
Open a new device in Standalone window by pressing SHIFT+CLICK when using a device.
Use a new device without opening any window by pressing ALT+CLICK.
This commit is contained in:
parent
c23744a799
commit
22efee786c
2 changed files with 17 additions and 3 deletions
|
@ -7,6 +7,7 @@ module.exports = function DeviceListDetailsDirective(
|
||||||
, GroupService
|
, GroupService
|
||||||
, $rootScope
|
, $rootScope
|
||||||
, LightboxImageService
|
, LightboxImageService
|
||||||
|
, StandaloneService
|
||||||
) {
|
) {
|
||||||
return {
|
return {
|
||||||
restrict: 'E'
|
restrict: 'E'
|
||||||
|
@ -47,11 +48,16 @@ module.exports = function DeviceListDetailsDirective(
|
||||||
var id = e.target.parentNode.parentNode.id
|
var id = e.target.parentNode.parentNode.id
|
||||||
var device = mapping[id]
|
var device = mapping[id]
|
||||||
|
|
||||||
if (e.shiftKey && device.state === 'available') {
|
if (e.altKey && device.state === 'available') {
|
||||||
inviteDevice(device)
|
inviteDevice(device)
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (e.shiftKey && device.state === 'available') {
|
||||||
|
StandaloneService.open(device)
|
||||||
|
e.preventDefault()
|
||||||
|
}
|
||||||
|
|
||||||
if ($rootScope.adminMode && device.state === 'busy') {
|
if ($rootScope.adminMode && device.state === 'busy') {
|
||||||
kickDevice(device, true)
|
kickDevice(device, true)
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
|
|
@ -138,9 +138,17 @@ module.exports = function DeviceListDetailsDirective(
|
||||||
// //StandaloneService.open()
|
// //StandaloneService.open()
|
||||||
// e.preventDefault()
|
// e.preventDefault()
|
||||||
//}
|
//}
|
||||||
|
var id
|
||||||
|
|
||||||
if (e.target.classList.contains('device-status')) {
|
if (e.target.classList.contains('thumbnail')) {
|
||||||
var id = e.target.parentNode.parentNode.id
|
id = e.target.id
|
||||||
|
} else if (e.target.classList.contains('device-status') ||
|
||||||
|
e.target.classList.contains('device-photo-small') ||
|
||||||
|
e.target.classList.contains('device-name')) {
|
||||||
|
id = e.target.parentNode.parentNode.id
|
||||||
|
}
|
||||||
|
|
||||||
|
if (id) {
|
||||||
var device = mapping[id]
|
var device = mapping[id]
|
||||||
|
|
||||||
if (e.altKey && device.state === 'available') {
|
if (e.altKey && device.state === 'available') {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue