forked from AntonRzevskiy/TableEdit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpattern.js
More file actions
74 lines (61 loc) · 1.96 KB
/
Copy pathpattern.js
File metadata and controls
74 lines (61 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
$.TableEdid.defaults = {
// functional framework 1
_method: function() {
if (typeof this.methodBefore == 'function' && this.methodBefore() == true) {
// logic here
}
if (typeof this.methodAfter == 'function')
this.methodAfter();
},
methodBefore: function() {
return true;
},
methodAfter: function() {
},
// functional framework 2
_method: function() {
if (
this.hasOwnProperty('methodBefore')
&& typeof this.methodBefore == 'function'
&& this.methodBefore() == true
||
! this.hasOwnProperty('methodBefore')
) {
// logic here
}
if (this.hasOwnProperty('methodAfter') && typeof this.methodAfter == 'function')
this.methodAfter();
},
// functional framework 2 modified
_method: function() {
var name = 'method';
if (
this.hasOwnProperty(name + 'Before')
&& typeof this[name + 'Before'] == 'function'
&& this[name + 'Before']() == true
||
! this.hasOwnProperty(name + 'Before')
) {
// logic here
}
if (this.hasOwnProperty(name + 'After') && typeof this[name + 'After'] == 'function')
this[name + 'After']();
},
// functional framework 3
_method: function() {
var name = 'method';
this.doAction( name + 'Before', arguments, context );
if (
this.hasOwnProperty(name + 'Before')
&& typeof this[name + 'Before'] == 'function'
&& this[name + 'Before']() == true
||
! this.hasOwnProperty(name + 'Before')
) {
// logic here
}
if (this.hasOwnProperty(name + 'After') && typeof this[name + 'After'] == 'function')
this[name + 'After']();
this.doAction( name + 'After', arguments, context );
},
};