1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 10:39:25 +02:00

Added Chat (disabled for now).

This commit is contained in:
Gunther Brunner 2014-06-19 16:59:25 +09:00
parent c1adb9087a
commit af6fa9fe29
11 changed files with 135 additions and 4 deletions

View file

@ -0,0 +1,43 @@
module.exports = function ServiceFactory($modal, $sce) {
var service = {}
var ModalInstanceCtrl = function ($scope, $modalInstance, url, title, icon) {
$scope.ok = function () {
$modalInstance.close(true)
}
$scope.url = $sce.trustAsResourceUrl(url)
$scope.title = title
$scope.icon = icon
$scope.cancel = function () {
$modalInstance.dismiss('cancel')
}
}
service.open = function (url, title, icon) {
var modalInstance = $modal.open({
template: require('./external-url-modal.jade'),
controller: ModalInstanceCtrl,
// size: 'lg',
windowClass: 'modal-size-80p',
resolve: {
title: function() {
return title
},
url: function () {
return url
},
icon: function () {
return icon
}
}
})
modalInstance.result.then(function () {
}, function () {
})
}
return service
}