forked from hestiacp/hestiacp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview.js
More file actions
93 lines (75 loc) · 2.61 KB
/
Copy pathview.js
File metadata and controls
93 lines (75 loc) · 2.61 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
App.View.popup = function(content) {
var tpl = App.Templates.get('popup', 'general');
if ('undefined' != typeof App.Templates.html.popup[content]) {
var content = App.Templates.get(content, 'popup').finalize();
}
tpl.set(':content', content);
$('#popup-bg, #popup').remove();
$(document.body).append(tpl.finalize());
}
App.View.closePopup = function(){
$('.black_overlay').remove();
$('.popup_content').remove();
}
App.View.updateInitialInfo = function(key, object) {
var expr = '.'+key;
var object = parseInt(object, 10);
var html = object + ' ' + App.Messages.get(key, (object > 1));
$(expr).html(html);
}
App.View.listItems = function(reply){
var acc = [];
var build_method = App.Env.getWorldName() + '_entry';
$(reply.data).each(function(i, o){
acc[acc.length++] = App.HTML.Build[build_method](o);
});
var html = acc.done().wrapperize('ENTRIES_WRAPPER', 'ip');
App.Ref.CONTENT.html(html);
App.Helpers.updateScreen();
}
/*App.View.start = function(){
};
App.View.showDatabases = function(databases){
var tpl = App.HTML.makeDatabases(databases);
$('#navigation').html(tpl.wrapperize('database_wrap', 'database'));
}
App.View.openDatabase = function(data, ref, db_name){
var tpl = App.HTML.makeDbTableList(data);
$('.databases .tables').remove();
$('.databases .active').removeClass('active');
$(ref).after(tpl.wrapperize('database_table_wrap', 'database'));
$(ref).attr('className', 'active do.closeDatabase('+db_name+')"');
}
App.View.openTable = function(data, ref, table_name){
var tpl = App.HTML.makeDbFieldsList(data);
$(ref).next('.fields').remove();
$(ref).after(tpl.wrapperize('database_field_wrap', 'database'));
$(ref).attr('className', 'active do.closeTable('+table_name+')"');
App.Helpers.updateScreen();
}
App.View.resultReturned = function(reply){
if(reply.result){
$('#results').text(reply.data);
}else{
$('#results').text(reply.message);
}
}
App.View.Pages.IP.list = function(reply){
var acc = [];
$(reply.data).each(function(i, o){
acc[acc.length++] = App.HTML.Build.ip_entry(o);
});
var html = acc.done().wrapperize('ENTRIES_WRAPPER', 'ip');
App.Ref.CONTENT.html(html);
App.Helpers.updateScreen();
}
App.View.Pages.DNS.list = function(reply){
var acc = [];
$(reply.data).each(function(i, o){
acc[acc.length++] = App.HTML.Build.dns_entry(o);
});
var html = acc.done().wrapperize('ENTRIES_WRAPPER', 'dns');
App.Ref.CONTENT.html(html);
App.Helpers.updateScreen();
}
*/