1
|
|
|
"use strict"; |
2
|
|
|
app.controller('licenseEntryController', ['$scope', '$state', 'Security', function ($scope, $state, Security, $rootScope) { |
3
|
|
|
$scope.directiveScopeDict = {}; |
4
|
|
|
$scope.directiveCtrlDict = {}; |
5
|
|
|
|
6
|
|
|
$scope.licenseID = $scope.$resolve.licenseID; |
7
|
|
|
//console.dir($scope); |
8
|
|
|
//console.dir($state.params); |
9
|
|
|
|
10
|
|
|
$scope.licenseID = $state.params.licenseID; |
11
|
|
|
|
12
|
|
|
function Initialize(){ |
13
|
|
|
var entryForm = {}; |
14
|
|
|
|
15
|
|
|
$scope.entryForm = entryForm; |
16
|
|
|
} |
17
|
|
|
Initialize(); |
18
|
|
|
|
19
|
|
|
$scope.BackToParentState = function(){ |
20
|
|
|
//$state.go('rc-51-list-license-terms'); |
21
|
|
|
$state.go('^'); |
22
|
|
|
} |
23
|
|
|
|
24
|
|
|
$scope.EventListener = function(scope, iElement, iAttrs, controller){ |
25
|
|
|
var tagName = iElement[0].tagName.toLowerCase(); |
26
|
|
|
var prgmID = scope.programId; |
27
|
|
|
var scopeID = scope.$id; |
|
|
|
|
28
|
|
|
var hashID = tagName + '_' + prgmID; |
29
|
|
|
|
30
|
|
|
if($scope.directiveScopeDict[hashID] == null || typeof($scope.directiveScopeDict[hashID]) == "undefined"){ |
31
|
|
|
$scope.directiveScopeDict[hashID] = scope; |
32
|
|
|
$scope.directiveCtrlDict[hashID] = controller; |
33
|
|
|
|
34
|
|
|
} |
35
|
|
|
|
36
|
|
|
iElement.ready(function() { |
37
|
|
|
}) |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
$scope.SetDefaultValue = function(scope, iElement, iAttrs, controller){ |
41
|
|
|
var name = "entry_ds50lt" |
42
|
|
|
$scope.directiveCtrlDict[name].ngModel.LicenseID = $scope.licenseID; |
43
|
|
|
|
44
|
|
|
$scope.directiveScopeDict[name].FindData(); |
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
$scope.StatusChange = function(fieldName, newValue, newObj, scope, iElement, iAttrs, controller){ |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
$scope.ValidateBuffer = function(scope, iElement, iAttrs, controller){ |
51
|
|
|
return true; |
52
|
|
|
} |
53
|
|
|
}]); |
54
|
|
|
|