Files
stf-DeviceFarmer/res/app/control-panes/info/info-controller.js
Gunther Brunner 743f8becd6 - Finally, most of the unit tests now passes (resolving dependencies also).
- Shims now exports angular module name, however some of them clash with the original.
2014-08-21 22:04:19 +09:00

19 lines
550 B
JavaScript

module.exports = function InfoCtrl($scope, LightboxImageService) {
$scope.openDevicePhoto = function (device) {
var title = device.name
var enhancedPhoto800 = '/static/app/devices/photo/x800/' + device.image
LightboxImageService.open(title, enhancedPhoto800)
}
var getSdStatus = function () {
if ($scope.control) {
$scope.control.getSdStatus().then(function (result) {
$scope.$apply(function () {
$scope.sdCardMounted = (result.lastData === 'sd_mounted')
})
})
}
}
getSdStatus()
}