mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:03:30 +02:00
Added translate to everything.
Added new version update modal.
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
module.exports = angular.module('stf.version-update', [
|
||||
require('stf/common-ui/modals/common').name
|
||||
])
|
||||
.factory('VersionUpdateService', require('./version-update-service'))
|
||||
@@ -0,0 +1,27 @@
|
||||
module.exports = function FatalMessageServiceFactory($modal, $location, socket) {
|
||||
var service = {}
|
||||
|
||||
var ModalInstanceCtrl = function ($scope, $modalInstance, device) {
|
||||
$scope.ok = function () {
|
||||
$modalInstance.close(true)
|
||||
$location.path('/')
|
||||
}
|
||||
|
||||
$scope.cancel = function () {
|
||||
$modalInstance.dismiss('cancel')
|
||||
}
|
||||
}
|
||||
|
||||
service.open = function () {
|
||||
var modalInstance = $modal.open({
|
||||
template: require('./version-update.jade'),
|
||||
controller: ModalInstanceCtrl
|
||||
})
|
||||
|
||||
modalInstance.result.then(function (selectedItem) {
|
||||
}, function () {
|
||||
})
|
||||
}
|
||||
|
||||
return service
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
describe('VersionUpdateService', function() {
|
||||
|
||||
beforeEach(module('stf.version-update'));
|
||||
|
||||
it('should ...', inject(function(FatalMessageService) {
|
||||
|
||||
//expect(FatalMessageService.doSomething()).toEqual('something');
|
||||
|
||||
}));
|
||||
|
||||
})
|
||||
@@ -0,0 +1,11 @@
|
||||
.stf-fatal-message.stf-modal
|
||||
.modal-header.dialog-header-notify
|
||||
button(type='button', ng-click='cancel()').close ×
|
||||
h4.modal-title.text-danger
|
||||
i.fa.fa-exclamation-circle.fa-fw
|
||||
span(translate) Version Update
|
||||
.modal-body(translate) A new version of STF is available
|
||||
.modal-footer
|
||||
button.btn.btn-primary(type='button', ng-click='ok()')
|
||||
i.fa.fa-refresh
|
||||
span(translate) Reload
|
||||
Reference in New Issue
Block a user