1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 18:29:17 +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:
Gunther Brunner 2015-07-06 17:22:05 +09:00
parent c23744a799
commit 22efee786c
2 changed files with 17 additions and 3 deletions

View file

@ -7,6 +7,7 @@ module.exports = function DeviceListDetailsDirective(
, GroupService
, $rootScope
, LightboxImageService
, StandaloneService
) {
return {
restrict: 'E'
@ -47,11 +48,16 @@ module.exports = function DeviceListDetailsDirective(
var id = e.target.parentNode.parentNode.id
var device = mapping[id]
if (e.shiftKey && device.state === 'available') {
if (e.altKey && device.state === 'available') {
inviteDevice(device)
e.preventDefault()
}
if (e.shiftKey && device.state === 'available') {
StandaloneService.open(device)
e.preventDefault()
}
if ($rootScope.adminMode && device.state === 'busy') {
kickDevice(device, true)
e.preventDefault()

View file

@ -138,9 +138,17 @@ module.exports = function DeviceListDetailsDirective(
// //StandaloneService.open()
// e.preventDefault()
//}
var id
if (e.target.classList.contains('device-status')) {
var id = e.target.parentNode.parentNode.id
if (e.target.classList.contains('thumbnail')) {
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]
if (e.altKey && device.state === 'available') {