blob: 51bae534f875edd999592cdfcf21f5219e956c48 [file] [log] [blame]
Matteo Scandolobf7c3662016-06-02 20:30:15 -07001(function () {
2 'use strict';
3
4 angular.module('mCord')
5 .directive('eNodeMapPanel', function () {
6 return {
7 restrict: 'E',
8 scope: {
9 eNodeB: '='
10 },
11 bindToController: true,
12 controllerAs: 'vm',
13 templateUrl: 'app/view/home/e-node-map-panel.tpl.html',
Matteo Scandolo05bff8c2016-06-13 16:55:20 -070014 controller: function($scope, $uibModal){
Matteo Scandolobf7c3662016-06-02 20:30:15 -070015 this.close = () => {
16 delete this.eNodeB;
Matteo Scandolo2c2c8af2016-06-03 15:36:02 -070017 };
Matteo Scandolo05bff8c2016-06-13 16:55:20 -070018
19 this.addProfile = () => {
20 const _this = this;
21 this.modalInstance = $uibModal.open({
22 animation: true,
23 templateUrl: 'addProfileToImsi',
24 controllerAs: 'vm',
25 controller: function ($uibModalInstance) {
26 this.modal = $uibModalInstance;
27 this.callback = (profile) => {
28 $scope.$broadcast('profile.add', {targetId: _this.eNodeB.eNBId, profile: profile});
29 };
30 this.eNodeB = _this.eNodeB;
31 }
32 });
33 };
Matteo Scandolobf7c3662016-06-02 20:30:15 -070034 }
35 }
36 });
37}());