mirror of
https://github.com/myvesta/vesta
synced 2025-07-12 16:13:34 -07:00
JSON parser improved. Fixed problem with parsing special symbols
This commit is contained in:
parent
c80f12eaa4
commit
b472a367d5
6 changed files with 107 additions and 11 deletions
|
@ -357,6 +357,38 @@ App.HTML.Build.cron_entry = function(o, key)
|
|||
|
||||
return tpl.finalize();
|
||||
}
|
||||
|
||||
|
||||
App.HTML.Build.cron_form = function(options, id)
|
||||
{try{
|
||||
if('undefined' == typeof App.Env.initialParams) {
|
||||
return alert('PLease wait a bit. Some background processes are not yet executed. Thank you for patience.');
|
||||
}
|
||||
var tpl = App.Templates.get('FORM', 'cron');
|
||||
tpl.set(':source', options);
|
||||
|
||||
options = App.Helpers.evalJSON(options) || {};
|
||||
if (App.Helpers.isEmpty(options)) {
|
||||
tpl.set(':title', 'New cron entry');
|
||||
tpl.set(':save_button', 'ADD');
|
||||
}
|
||||
else {
|
||||
tpl.set(':title', 'Edit cron entry');
|
||||
tpl.set(':save_button', 'SAVE');
|
||||
}
|
||||
|
||||
options = !App.Helpers.isEmpty(options) ? options : {DAY:'', MONTH: '', WDAY:'',HOUR:'',CMD:'',MIN:''};
|
||||
tpl = App.HTML.setTplKeys(tpl, options);
|
||||
|
||||
/*tpl.set(':id', id || '');
|
||||
tpl.set(':IP_ADDRESS', options.IP_ADDRESS || '');
|
||||
tpl.set(':NETMASK', options.NETMASK || '');
|
||||
tpl.set(':NAME', options.NAME || '');*/
|
||||
|
||||
//tpl = App.HTML.Build.ip_selects(tpl, options);
|
||||
}catch(e){fb.error(e);}
|
||||
return tpl.finalize();
|
||||
}
|
||||
|
||||
|
||||
App.HTML.Build.dns_records = function(records)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue