mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 13:01:52 -07:00
export from svn
This commit is contained in:
commit
641ed97fdd
340 changed files with 32404 additions and 0 deletions
52
web/js/old/model.js
Normal file
52
web/js/old/model.js
Normal file
|
@ -0,0 +1,52 @@
|
|||
App.Model.DNS.loadList = function(){
|
||||
App.Ajax.request('DNS.getList', {}, App.View.Pages.DNS.list);
|
||||
}
|
||||
|
||||
App.Model.DNS.update = function(values, source_json) {
|
||||
App.Ajax.request('DNS.update', {
|
||||
'source': source_json,
|
||||
'target': App.Helpers.toJSON(values)
|
||||
}, function(reply){
|
||||
if(!reply.result) {
|
||||
App.Pages.DNS.notSaved(reply);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
App.Model.IP.loadList = function(){
|
||||
App.Ajax.request('IP.getList', {}, App.View.Pages.IP.list);
|
||||
}
|
||||
|
||||
App.Model.IP.update = function(values, source_json) {
|
||||
App.Ajax.request('IP.update', {
|
||||
'source': source_json,
|
||||
'target': App.Helpers.toJSON(values)
|
||||
}, function(reply){
|
||||
if(!reply.result) {
|
||||
App.Pages.IP.ipNotSaved(reply);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
App.Model.IP.add = function(values) {
|
||||
App.Ajax.request('IP.add', {
|
||||
'target': App.Helpers.toJSON(values)
|
||||
}, function(reply){
|
||||
if(!reply.result) {
|
||||
App.Helpers.alert(reply.message)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
App.Model.IP.remove = function(values_json, elm) {
|
||||
App.Ajax.request('IP.remove', {
|
||||
'target': values_json
|
||||
}, function(reply){
|
||||
if(!reply.result) {
|
||||
App.Helpers.alert(reply.message);
|
||||
}
|
||||
else {
|
||||
elm.remove();
|
||||
}
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue