1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 02:29:26 +02:00
OpenSTF/res/app/components/stf/device-context-menu/device-context-menu-directive.js
Gunther Brunner 56541ba80e Cleanup.
2014-10-06 17:06:42 +09:00

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'
})
}
}
}
}