mirror of
https://github.com/openstf/stf
synced 2025-10-06 03:50:04 +02:00
Added Chat (disabled for now).
This commit is contained in:
parent
c1adb9087a
commit
af6fa9fe29
11 changed files with 135 additions and 4 deletions
|
@ -0,0 +1,11 @@
|
|||
describe('VersionUpdateService', function() {
|
||||
|
||||
beforeEach(module('stf.version-update'));
|
||||
|
||||
it('should ...', inject(function(VersionUpdateService) {
|
||||
|
||||
//expect(FatalMessageService.doSomething()).toEqual('something');
|
||||
|
||||
}));
|
||||
|
||||
})
|
|
@ -0,0 +1,3 @@
|
|||
.stf-external-url-modal {
|
||||
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
.stf-external-url-modal.stf-modal
|
||||
.modal-header
|
||||
button(type='button', ng-click='cancel()').close ×
|
||||
h4.modal-title(ng-show='title')
|
||||
i.fa.fa-fw(ng-class='icon')
|
||||
span(ng-bind='title')
|
||||
.modal-body
|
||||
iframe(ng-src='{{url}}', width='100%', height='100%', frameborder='0')
|
|
@ -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
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
require('./external-url-modal.css')
|
||||
|
||||
module.exports = angular.module('stf.external-url-modal', [
|
||||
require('stf/common-ui/modals/common').name
|
||||
])
|
||||
.factory('ExternalUrlModalService', require('./external-url-modal'))
|
||||
.directive('onLoadEvent', require('./on-load-event-directive'))
|
|
@ -0,0 +1,10 @@
|
|||
// TODO: Test this
|
||||
module.exports = function () {
|
||||
return function (scope, element, attrs) {
|
||||
scope.$watch(attrs.pageVisible, function () {
|
||||
element.bind('load', function () {
|
||||
scope.$apply(attrs.pageLoad)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue