1
|
|
View Code Duplication |
"use strict"; |
2
|
|
|
app.controller('displayMessageController', ['$scope', 'Security', function ($scope, Security, $rootScope) { |
3
|
|
|
$scope.deptDataList = []; |
4
|
|
|
$scope.directiveScopeDict = {}; |
5
|
|
|
function Initialize(){ |
6
|
|
|
var entryForm = {}; |
7
|
|
|
|
8
|
|
|
$scope.entryForm = entryForm; |
9
|
|
|
} |
10
|
|
|
Initialize(); |
11
|
|
|
|
12
|
|
|
$scope.EventListener = function(scope, iElement, iAttrs, controller){ |
13
|
|
|
console.log("<"+iElement[0].tagName+">" +" Directive overried EventListener()"); |
|
|
|
|
14
|
|
|
var prgmID = scope.programId; |
15
|
|
|
if($scope.directiveScopeDict[prgmID] == null || typeof($scope.directiveScopeDict[prgmID]) == "undefined"){ |
16
|
|
|
$scope.directiveScopeDict[prgmID] = scope; |
17
|
|
|
} |
18
|
|
|
|
19
|
|
|
//http://api.jquery.com/Types/#Event |
20
|
|
|
//The standard events in the Document Object Model are: |
21
|
|
|
// blur, focus, load, resize, scroll, unload, beforeunload, |
22
|
|
|
// click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, |
23
|
|
|
// change, select, submit, keydown, keypress, and keyup. |
24
|
|
|
iElement.ready(function() { |
25
|
|
|
|
26
|
|
|
}) |
27
|
|
|
} |
28
|
|
|
|
29
|
|
|
$scope.SetDefaultValue = function(scope, iElement, iAttrs, controller){ |
30
|
|
|
console.log("<"+iElement[0].tagName+">" +" Directive overried SetDefaultValue()"); |
|
|
|
|
31
|
|
|
|
32
|
|
|
// controller.ngModel.gender = "M"; |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
$scope.StatusChange = function(fieldName, newValue, newObj, scope, iElement, iAttrs, controller){ |
36
|
|
|
console.log("<"+iElement[0].tagName+">" +" Directive overried StatusChange()"); |
|
|
|
|
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
$scope.ValidateBuffer = function(scope, iElement, iAttrs, controller){ |
40
|
|
|
console.log("<"+iElement[0].tagName+">" +" Directive overried ValidateBuffer()"); |
|
|
|
|
41
|
|
|
return true; |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
// $scope.CustomPointedToRecord = function(pRecord, rowScope, scope, iElement, controller){ |
45
|
|
|
// console.log("<"+iElement[0].tagName+">" +" Directive overried CustomPointedToRecord()"); |
46
|
|
|
// $scope.entryForm = pRecord; |
47
|
|
|
// } |
48
|
|
|
|
49
|
|
|
$scope.CustomSelectedToRecord = function(sRecord, rowScope, scope, iElement, controller){ |
50
|
|
|
console.log("<"+iElement[0].tagName+">" +" Directive overried CustomPointedToRecord()"); |
|
|
|
|
51
|
|
|
$scope.entryForm = sRecord; |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
$scope.CustomSubmitDataResult = function(responseObj, httpStatusCode, scope, element, attrs, ctrl){ |
55
|
|
|
var prgmID = scope.programId; |
56
|
|
|
if(prgmID == "ds01dp"){ |
57
|
|
|
$scope.directiveScopeDict["dw01dp"].ClearNRefreshData(); |
58
|
|
|
} |
59
|
|
|
} |
60
|
|
|
}]); |