/
index.js
58 lines (43 loc) · 1.36 KB
/
index.js
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
(function () {
'use strict';
window.Index = function () {
};
window.Index.prototype = {
// Private Fields
_dialogInstance: null,
// Private Event Delegates
_onSuccess: function () {
this.initialize();
},
// Public Properties
// Public Methods
initialize: function () {
$(".page-link").on('click', $.proxy(this.search, this));
$("table .dropdown-toggle").on('click',
function () {
window.core.rowContextMenu();
});
},
search: function () {
window.core.setSuccessPointer($.proxy(this._onSuccess, this));
window.core.gridSearch();
},
submit: function () {
var url = event.currentTarget.dataset.url;
window.core.submit(url, this._dialogInstance, $.proxy(this.search, this));
},
delete: function () {
window.core.update($.proxy(this.search, this));
},
recover: function () {
window.core.update($.proxy(this.search, this));
},
forbidden: function () {
window.core.update($.proxy(this.search, this));
},
normal: function () {
window.core.update($.proxy(this.search, this));
}
// Private Methods
};
})();