Added translate to everything.

Added new version update modal.
This commit is contained in:
Gunther Brunner
2014-05-28 15:58:18 +09:00
parent 1e0a145490
commit 6b67d66a93
22 changed files with 157 additions and 89 deletions

View File

@@ -0,0 +1,39 @@
module.exports = function FatalMessageServiceFactory($modal, $location, $route) {
var FatalMessageService = {}
var ModalInstanceCtrl = function ($scope, $modalInstance, device) {
$scope.ok = function () {
$modalInstance.close(true)
$route.reload()
//$location.path('/control/' + device.serial)
}
$scope.second = function () {
$modalInstance.dismiss()
$location.path('/devices/')
}
$scope.cancel = function () {
$modalInstance.dismiss('cancel')
}
}
FatalMessageService.open = function (device) {
var modalInstance = $modal.open({
template: require('./fatal-message.jade'),
controller: ModalInstanceCtrl,
resolve: {
device: device
}
})
modalInstance.result.then(function (selectedItem) {
}, function () {
})
}
return FatalMessageService
}

View File

@@ -0,0 +1,11 @@
describe('FatalMessageService', function() {
beforeEach(module('stf.fatal-message'));
it('should ...', inject(function(FatalMessageService) {
//expect(FatalMessageService.doSomething()).toEqual('something');
}));
})

View File

@@ -0,0 +1,29 @@
.stf-fatal-message.stf-modal
.modal-header.dialog-header-error
button(type='button', ng-click='cancel()').close ×
h4.modal-title.text-danger
i.fa.fa-warning
span(translate) Device was disconnected
.modal-body.text-danger(translate) Device is not in use anymore
.modal-footer
button.btn.btn-primary(type='button', ng-click='ok()')
i.fa.fa-refresh
span(translate) Try to reconnect
button.btn.btn-success(ng-click='second()')
i.fa.fa-sitemap
span(translate) Go to Device List
//button.btn.btn-warning(ng-click='cancel()') Close
//'<div class="modal-header dialog-header-error">
// <button type="button" class="close" ng-click="close()">&times;</button>
// <h4 class="modal-title text-danger">
// <span class="glyphicon glyphicon-warning-sign"></span>
// <span ng-bind-html="header"></span>
// </h4>
//</div>
//
//<div class="modal-body text-danger" ng-bind-html="msg"></div>
//<div class="modal-footer">
// <button type="button" class="btn btn-default" ng-click="close()">
//'+startSym+'"DIALOGS_CLOSE" | translate'+endSym+'</button>
//</div>'

View File

@@ -0,0 +1,4 @@
module.exports = angular.module('stf.fatal-message', [
require('stf/common-ui/modals/common').name
])
.factory('FatalMessageService', require('./fatal-message-service'))