mirror of
https://github.com/openstf/stf
synced 2025-10-05 02:29:26 +02:00
26 lines
624 B
JavaScript
26 lines
624 B
JavaScript
module.exports = function deviceContextMenuDirective($window) {
|
|
return {
|
|
restrict: 'EA',
|
|
replace: false,
|
|
//scope: {
|
|
// control: '&',
|
|
// device: '&'
|
|
//},
|
|
transclude: true,
|
|
template: require('./device-context-menu.jade'),
|
|
link: function (scope) {
|
|
//var device = scope.device()
|
|
//var control = scope.control()
|
|
scope.windowClose = function () {
|
|
$window.close()
|
|
}
|
|
|
|
scope.saveScreenShot = function () {
|
|
scope.control.screenshot().then(function (result) {
|
|
location.href = result.body.href + '?download'
|
|
})
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|