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