Matteo Scandolo | bf7c366 | 2016-06-02 20:30:15 -0700 | [diff] [blame] | 1 | (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 Scandolo | 05bff8c | 2016-06-13 16:55:20 -0700 | [diff] [blame] | 14 | controller: function($scope, $uibModal){ |
Matteo Scandolo | bf7c366 | 2016-06-02 20:30:15 -0700 | [diff] [blame] | 15 | this.close = () => { |
| 16 | delete this.eNodeB; |
Matteo Scandolo | 2c2c8af | 2016-06-03 15:36:02 -0700 | [diff] [blame] | 17 | }; |
Matteo Scandolo | 05bff8c | 2016-06-13 16:55:20 -0700 | [diff] [blame] | 18 | |
| 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 Scandolo | bf7c366 | 2016-06-02 20:30:15 -0700 | [diff] [blame] | 34 | } |
| 35 | } |
| 36 | }); |
| 37 | }()); |