1
|
|
View Code Duplication |
"use strict"; |
2
|
|
|
app.controller('viewDepartmentController', ['$scope', function ($scope, $rootScope) { |
3
|
|
|
$scope.deptDataList = []; |
4
|
|
|
function Initialize(){ |
5
|
|
|
var entryForm = {}; |
6
|
|
|
var entryForm2 = {}; |
7
|
|
|
|
8
|
|
|
$scope.entryForm = entryForm; |
9
|
|
|
$scope.entryForm2 = entryForm; |
10
|
|
|
} |
11
|
|
|
Initialize(); |
12
|
|
|
|
13
|
|
|
$scope.EventListener = function(scope, iElement, iAttrs, controller){ |
14
|
|
|
console.log("<"+iElement[0].tagName+">" +" Directive overried EventListener()"); |
|
|
|
|
15
|
|
|
|
16
|
|
|
//http://api.jquery.com/Types/#Event |
17
|
|
|
//The standard events in the Document Object Model are: |
18
|
|
|
// blur, focus, load, resize, scroll, unload, beforeunload, |
19
|
|
|
// click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, |
20
|
|
|
// change, select, submit, keydown, keypress, and keyup. |
21
|
|
|
iElement.ready(function() { |
22
|
|
|
|
23
|
|
|
}) |
24
|
|
|
} |
25
|
|
|
|
26
|
|
|
$scope.SetDefaultValue = function(scope, iElement, iAttrs, controller){ |
27
|
|
|
console.log("<"+iElement[0].tagName+">" +" Directive overried SetDefaultValue()"); |
|
|
|
|
28
|
|
|
|
29
|
|
|
// controller.ngModel.gender = "M"; |
30
|
|
|
} |
31
|
|
|
|
32
|
|
|
$scope.StatusChange = function(fieldName, newValue, newObj, scope, iElement, iAttrs, controller){ |
33
|
|
|
console.log("<"+iElement[0].tagName+">" +" Directive overried StatusChange()"); |
|
|
|
|
34
|
|
|
|
35
|
|
|
if(fieldName == "departmentCode") |
36
|
|
|
newObj.DepartmentCode = newObj.DepartmentCode.toUpperCase(); |
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.entryForm2 = sRecord; |
52
|
|
|
} |
53
|
|
|
}]); |